Skip to content

Commit fb0c027

Browse files
authored
Drop Node.js 18 support (#5926)
* build!: require Node.js 20 for development BREAKING CHANGE: Rush Stack development and CI now require Node.js 20.9 or newer. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8ebd5bf2-c44b-42d5-be25-e7936d4b0a14 * refactor!: remove Node.js 18 workarounds BREAKING CHANGE: Node.js 18 is no longer supported by these runtime paths. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8ebd5bf2-c44b-42d5-be25-e7936d4b0a14 * build(heft-node-rig): expose ES2022 libs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8ebd5bf2-c44b-42d5-be25-e7936d4b0a14 * fix: align pnpm lockfile settings Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8ebd5bf2-c44b-42d5-be25-e7936d4b0a14 --------- Copilot-Session: 8ebd5bf2-c44b-42d5-be25-e7936d4b0a14
1 parent 5cfa6d0 commit fb0c027

32 files changed

Lines changed: 373 additions & 401 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,6 @@ jobs:
1212
fail-fast: false
1313
matrix:
1414
include:
15-
# When Node 18 is removed, remove the special cases in
16-
# - build-tests-samples/heft-storybook-v9-react-tutorial/build.js
17-
# - build-tests-samples/heft-storybook-v9-react-tutorial-app/build.js
18-
# - The "globalOverrides" entry for "@vscode/vsce>cheerio" in common/config/rush/pnpm-config.json
19-
# - libraries/module-minifier/src/cryptoPolyfill.ts
20-
- NodeVersion: 18.20.x
21-
NodeVersionDisplayName: 18
22-
OS: ubuntu-latest
2315
- NodeVersion: 20.18.x
2416
NodeVersionDisplayName: 20
2517
OS: ubuntu-latest

.github/workflows/file-doc-tickets.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Use nodejs
2626
uses: actions/setup-node@v6
2727
with:
28-
node-version: 16
28+
node-version: 20
2929
- name: Parse PR body
3030
run: |
3131
cat <<-"EOF" > event.json

build-tests-samples/heft-storybook-v9-react-tutorial-app/build.js

Lines changed: 0 additions & 32 deletions
This file was deleted.

build-tests-samples/heft-storybook-v9-react-tutorial-app/config/rush-project.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
"operationSettings": [
66
{
77
"operationName": "_phase:lite-build",
8-
"outputFolderNames": ["dist"],
9-
// This project builds differently between Node 18 and other versions of Node
10-
"dependsOnNodeVersion": "major"
8+
"outputFolderNames": ["dist"]
119
}
1210
]
1311
}

build-tests-samples/heft-storybook-v9-react-tutorial-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"private": true,
66
"scripts": {
77
"build": "heft build --clean --storybook",
8-
"_phase:lite-build": "node ./build"
8+
"_phase:lite-build": "heft run --only build -- --clean --storybook"
99
},
1010
"dependencies": {
1111
"heft-storybook-v9-react-tutorial": "workspace: *"

build-tests-samples/heft-storybook-v9-react-tutorial/build.js

Lines changed: 0 additions & 32 deletions
This file was deleted.

build-tests-samples/heft-storybook-v9-react-tutorial/config/rush-project.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
"operationSettings": [
66
{
77
"operationName": "_phase:build",
8-
"outputFolderNames": [".heft", "lib-esm", "lib-commonjs", "dist"],
9-
// This project builds differently between Node 18 and other versions of Node
10-
"dependsOnNodeVersion": "major"
8+
"outputFolderNames": [".heft", "lib-esm", "lib-commonjs", "dist"]
119
},
1210
{
1311
"operationName": "_phase:test",

build-tests-samples/heft-storybook-v9-react-tutorial/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"start": "heft build-watch",
99
"storybook": "heft build-watch --serve --storybook",
1010
"build-storybook": "heft build --storybook",
11-
"_phase:build": "node ./build",
11+
"_phase:build": "heft run --only build -- --clean --storybook",
1212
"_phase:test": "heft run --only test -- --clean"
1313
},
1414
"dependencies": {

build-tests/rush-package-manager-integration-test/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Tests Rush yarn mode by:
3535
Before running these tests:
3636
1. Build Rush locally: `rush build --to rush`
3737
2. Build this test project: `rush build --to rush-package-manager-integration-test`
38-
3. Ensure you have Node.js 18+ installed
38+
3. Ensure you have Node.js 20+ installed
3939

4040
## Running the Tests
4141

build-tests/rush-package-manager-integration-test/src/TestHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export class TestHelper {
8585
];
8686

8787
// Update nodeSupportedVersionRange to match current environment
88-
rushJson.nodeSupportedVersionRange = '>=18.0.0';
88+
rushJson.nodeSupportedVersionRange = '>=20.0.0';
8989

9090
await JsonFile.saveAsync(rushJson, rushJsonPath, { updateExistingFile: true });
9191
}

0 commit comments

Comments
 (0)