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

fix: require Node v20.9.0+ [BREAKING CHANGE] #4484

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.18.1'
node-version: '20.9.0' # earliest node version we support (via "engines" in package.json)
Copy link
Contributor

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...)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sadly I could not find a way to do this in GHA.

cache: 'yarn'

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.18.1'
node-version: '20.9.0' # earliest node version we support (via "engines" in package.json)
cache: 'yarn'

# Needed for local browser integration tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/karma.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ env:
PUPPETEER_SKIP_DOWNLOAD: 'true' # only needed for @best/runner-local, unused here
GITHUB_RUN_ID: ${{github.run_id}}
COVERAGE: '1'
NODE_VERSION: '20.18.1'
NODE_VERSION: '20.9.0' # earliest node version we support (via "engines" in package.json)

jobs:
run-karma-tests-group-1:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.18.1'
node-version: '20.9.0' # earliest node version we support (via "engines" in package.json)
cache: 'yarn'

# Needed for perf smoke tests, matches the chromedriver version installed by tachometer (https://github.com/google/tachometer/blob/main/README.md#on-demand-dependencies)
Expand Down
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,9 @@
"packages/lwc",
"playground"
],
"engines": {
"node": ">=10"
},
Copy link
Collaborator Author

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.

"volta": {
"node": "20.18.1",
"//": "Earliest node version we support (via \"engines\" in package.json)",
"node": "20.9.0",
"yarn": "1.22.22"
},
"resolutions": {
Expand Down
3 changes: 3 additions & 0 deletions packages/@lwc/aria-reflection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=20.9.0"
},
"volta": {
"extends": "../../../package.json"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/@lwc/babel-plugin-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=20.9.0"
},
"volta": {
"extends": "../../../package.json"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/@lwc/compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=20.9.0"
},
"volta": {
"extends": "../../../package.json"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/@lwc/engine-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=20.9.0"
},
"volta": {
"extends": "../../../package.json"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/@lwc/engine-dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=20.9.0"
},
"volta": {
"extends": "../../../package.json"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/@lwc/engine-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=20.9.0"
},
"volta": {
"extends": "../../../package.json"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/@lwc/errors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=20.9.0"
},
"volta": {
"extends": "../../../package.json"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/@lwc/features/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=20.9.0"
},
"volta": {
"extends": "../../../package.json"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/@lwc/module-resolver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=20.9.0"
},
"volta": {
"extends": "../../../package.json"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/@lwc/rollup-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=20.9.0"
},
"volta": {
"extends": "../../../package.json"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/@lwc/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=20.9.0"
},
"volta": {
"extends": "../../../package.json"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/@lwc/signals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=20.9.0"
},
"volta": {
"extends": "../../../package.json"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/@lwc/ssr-compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=20.9.0"
},
"volta": {
"extends": "../../../package.json"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/@lwc/ssr-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=20.9.0"
},
"volta": {
"extends": "../../../package.json"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/@lwc/style-compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=20.9.0"
},
"volta": {
"extends": "../../../package.json"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/@lwc/synthetic-shadow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=20.9.0"
},
"volta": {
"extends": "../../../package.json"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/@lwc/template-compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=20.9.0"
},
"volta": {
"extends": "../../../package.json"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/@lwc/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=20.9.0"
},
"volta": {
"extends": "../../../package.json"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/@lwc/wire-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=20.9.0"
},
"volta": {
"extends": "../../../package.json"
},
Expand Down
3 changes: 3 additions & 0 deletions scripts/tasks/check-and-rewrite-package-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Copy link
Contributor

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?

Copy link
Collaborator Author

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.

},
// Use the same volta config in every subdirectory so that we always get the same node/yarn versions
// See: https://docs.volta.sh/advanced/workspaces
volta: {
Expand Down