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 1 commit
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@v3
with:
node-version: '20.12.2'
node-version: '18.0.0'
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@v3
with:
node-version: '20.12.2'
node-version: '18.0.0'
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.12.2'
NODE_VERSION: '18.0.0'

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@v3
with:
node-version: '20.12.2'
node-version: '18.0.0'
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
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,8 @@
"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.12.2",
"node": "22.7.0",
Copy link
Collaborator Author

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.

Copy link
Contributor

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.

"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": ">=18"
},
"main": "dist/index.cjs.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
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": ">=18"
},
"main": "dist/index.cjs.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
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": ">=18"
},
"main": "dist/index.cjs.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
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": ">=18"
},
"main": "dist/index.cjs.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
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": ">=18"
},
"main": "dist/index.cjs.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
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": ">=18"
},
"main": "dist/index.cjs.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
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": ">=18"
},
"main": "dist/index.cjs.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
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": ">=18"
},
"main": "dist/index.cjs.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
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": ">=18"
},
"main": "dist/index.cjs.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
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": ">=18"
},
"main": "dist/index.cjs.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
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": ">=18"
},
"main": "dist/index.cjs.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
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": ">=18"
},
"main": "dist/index.cjs.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
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": ">=18"
},
"main": "dist/index.cjs.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
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": ">=18"
},
"main": "dist/index.cjs.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
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": ">=18"
},
"main": "dist/index.cjs.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
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": ">=18"
},
"main": "dist/index.cjs.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
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": ">=18"
},
"main": "dist/index.cjs.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
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": ">=18"
},
"types": "index.d.ts",
"files": [
"*.d.ts"
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": ">=18"
},
"main": "dist/index.cjs.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
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: '>=18',
},
...buildProps,
dependencies,
devDependencies,
Expand Down
Loading