Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add engines.node to package.json #227

Merged
merged 2 commits into from
Jan 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"type": "git",
"url": "https://github.com/nodejs/corepack.git"
},
"engines": {
"node": ">=14.14.0"
},
"license": "MIT",
"packageManager": "[email protected]+sha224.7fa5c1d1875b041cea8fcbf9a364667e398825364bf5c5c8cd5f6601",
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
"moduleResolution": "node",
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"lib": ["dom", "es2017", "esnext.asynciterable"],
"lib": ["ES2020"],
"module": "commonjs",
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"target": "es2017"
"target": "ES2020"
Copy link
Member Author

@merceyz merceyz Jan 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to https://node.green/#ES2020 Node.js v14.14.0 doesn't fully support ES2020 but we're not using spread parameters after optional chaining so that's fine, if we ever do use it the CI will catch it assuming v14 doesn't update to a version of v8 that supports it.
In a future PR I'll ensure spread parameters after optional chaining is transpiled.

},
"ts-node": {
"transpileOnly": true
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = {
loader: `ts-loader`,
options: {
compilerOptions: {
module: `es2020`,
module: `ES2020`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this should read from tsconfig.json here to keep them in sync?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good idea however my next PR will replace webpack with esbuild so they shouldn't have time to go out of sync.

noEmit: false,
},
},
Expand Down