-
Notifications
You must be signed in to change notification settings - Fork 392
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
fix: require Node v20+ #4484
base: master
Are you sure you want to change the base?
fix: require Node v20+ #4484
Conversation
"volta": { | ||
"node": "20.12.2", | ||
"node": "22.7.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Locally, we may as well use a recent Node version. CI tests can still fail if we use something that doesn't work in Node 18.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I usually prefer to use the oldest supported version. We're more likely to introduce code that works in a new version, but not an old one, than we are the reverse, and I don't like waiting for CI for an annoying (and usually trivial) error.
@@ -87,11 +87,8 @@ | |||
"packages/lwc", | |||
"playground" | |||
], | |||
"engines": { | |||
"node": ">=10" | |||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This config does nothing since the root monorepo package.json
is private.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotta love a good commit history 🧑🍳🤌
@@ -24,7 +24,7 @@ jobs: | |||
- name: Setup Node | |||
uses: actions/setup-node@v3 | |||
with: | |||
node-version: '20.12.2' | |||
node-version: '20.9.0' # earliest node version we support (via "engines" in package.json) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any way we could read this from a file, so that we don't have to maintain it in multiple places? (Or just a single GHA env var...)
"volta": { | ||
"node": "20.12.2", | ||
"node": "22.7.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I usually prefer to use the oldest supported version. We're more likely to introduce code that works in a new version, but not an old one, than we are the reverse, and I don't like waiting for CI for an annoying (and usually trivial) error.
@@ -106,6 +106,9 @@ for (const dir of globSync('./packages/@lwc/*')) { | |||
bugs: { url: 'https://github.com/salesforce/lwc/issues' }, | |||
license: 'MIT', | |||
publishConfig: { access: 'public' }, | |||
engines: { | |||
node: '>=20.9.0', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How strict is this version? Does the code fail to execute on 20.8
or earlier or is this just treadmilling?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will fail to npm install
, so it's kind of a blocker for people with older Node versions.
The reason for 20.9.0 is that this limit is set by our devDependencies
(I forget which one).
Technically devDeps don't matter for our consumers, but IME it's a huge pain to try to define one minimum Node version for your deps and another for your devDeps.
Details
BREAKING CHANGE: require Node v20+.
Node support calendar for reference.
This also updates our CI tests to test in the earliest version of Node that we can possibly support.
Does this pull request introduce a breaking change?
Does this pull request introduce an observable change?