Skip to content
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
2 changes: 1 addition & 1 deletion .github/actions/next-integration-stat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"strip-ansi": "^7.0.1"
},
"engines": {
"node": ">=18.18.0"
"node": ">=20.9.0"
},
"packageManager": "pnpm@9.6.0"
}
2 changes: 1 addition & 1 deletion .github/actions/next-stats-action/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN apt install unzip wget curl nano htop screen build-essential pkg-config libs

RUN ln $(which python3) /usr/bin/python

RUN curl -sfLS https://install-node.vercel.app/v18.18.2 | bash -s -- -f
RUN curl -sfLS https://install-node.vercel.app/v20.9.0 | bash -s -- -f
RUN npm i -g corepack@0.31
RUN corepack enable

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/next-stats-action/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"typescript": "5.1.6"
},
"engines": {
"node": ">=18.18.0"
"node": ">=20.9.0"
},
"packageManager": "pnpm@9.6.0"
}
2 changes: 1 addition & 1 deletion .github/actions/upload-turboyet-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@vercel/ncc": "^0.36.0"
},
"engines": {
"node": ">=18.18.0"
"node": ">=20.9.0"
},
"packageManager": "pnpm@9.6.0"
}
30 changes: 15 additions & 15 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ on:
# of that workflow. Environment variables are not automatically passed to
# reusable workflows.
env:
NODE_MAINTENANCE_VERSION: 18
NODE_LTS_VERSION: 20
NODE_MAINTENANCE_VERSION: 20
NODE_LTS_VERSION: 22

jobs:
optimize-ci:
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
- name: Setup corepack
run: |
npm i -g corepack@0.31
Expand Down Expand Up @@ -275,7 +275,7 @@ jobs:
react: ['']
uses: ./.github/workflows/build_reusable.yml
with:
nodeVersion: 18.18.2
nodeVersion: 20.9.0
afterBuild: |
export IS_TURBOPACK_TEST=1
export TURBOPACK_DEV=1
Expand Down Expand Up @@ -308,7 +308,7 @@ jobs:
react: ['', '18.3.1']
uses: ./.github/workflows/build_reusable.yml
with:
nodeVersion: 18.18.2
nodeVersion: 20.9.0
afterBuild: |
export IS_TURBOPACK_TEST=1
export TURBOPACK_BUILD=1
Expand All @@ -330,7 +330,7 @@ jobs:
group: [1/7, 2/7, 3/7, 4/7, 5/7, 6/7, 7/7]
uses: ./.github/workflows/build_reusable.yml
with:
nodeVersion: 18.18.2
nodeVersion: 20.9.0
afterBuild: |
export IS_TURBOPACK_TEST=1
export TURBOPACK_BUILD=1
Expand Down Expand Up @@ -381,7 +381,7 @@ jobs:
group: [1/6, 2/6, 3/6, 4/6, 5/6, 6/6]
uses: ./.github/workflows/build_reusable.yml
with:
nodeVersion: 18.18.2
nodeVersion: 20.9.0
afterBuild: |
export NEXT_EXTERNAL_TESTS_FILTERS="$(pwd)/test/rspack-dev-tests-manifest.json"
Expand Down Expand Up @@ -414,7 +414,7 @@ jobs:
# Empty value uses default
uses: ./.github/workflows/build_reusable.yml
with:
nodeVersion: 18.18.2
nodeVersion: 20.9.0
afterBuild: |
export NEXT_EXTERNAL_TESTS_FILTERS="$(pwd)/test/rspack-build-tests-manifest.json"
export NEXT_TEST_MODE=start
Expand All @@ -441,7 +441,7 @@ jobs:
group: [1/7, 2/7, 3/7, 4/7, 5/7, 6/7, 7/7]
uses: ./.github/workflows/build_reusable.yml
with:
nodeVersion: 18.18.2
nodeVersion: 20.9.0
afterBuild: |
export NEXT_EXTERNAL_TESTS_FILTERS="$(pwd)/test/rspack-build-tests-manifest.json"
Expand Down Expand Up @@ -511,7 +511,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [18, 20] # TODO: use env var like [env.NODE_MAINTENANCE_VERSION, env.NODE_LTS_VERSION]
node: [20, 22] # TODO: use env var like [env.NODE_MAINTENANCE_VERSION, env.NODE_LTS_VERSION]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There's a TODO comment indicating that the hardcoded node version matrix should use environment variables instead.

View Details

Analysis

The modified line contains a TODO comment that suggests replacing the hardcoded node version array [20, 22] with environment variables like [env.NODE_MAINTENANCE_VERSION, env.NODE_LTS_VERSION]. While the environment variables are already defined at the top of the file (NODE_MAINTENANCE_VERSION: 20 and NODE_LTS_VERSION: 22), they're not being used in the matrix configuration. This creates a maintenance burden as version updates require changes in multiple places, and the TODO indicates the developers want to address this technical debt.

The same TODO pattern appears on line 532 as well. Implementing this change would centralize version management and reduce the risk of inconsistencies during future Node.js version updates.

@devjiwonchoi devjiwonchoi Aug 27, 2025 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The env.NODE_MAINTENANCE_VERSION is actually never used yet. Will follow up to use envs for versions.

Since both are LTS, NODE_ACTIVE_LTS_VERSION and NODE_MAINTENANCE_LTS_VERSION makes sense to me.


uses: ./.github/workflows/build_reusable.yml
with:
Expand All @@ -529,7 +529,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [18, 20] # TODO: use env var like [env.NODE_MAINTENANCE_VERSION, env.NODE_LTS_VERSION]
node: [20, 22] # TODO: use env var like [env.NODE_MAINTENANCE_VERSION, env.NODE_LTS_VERSION]

uses: ./.github/workflows/build_reusable.yml
with:
Expand Down Expand Up @@ -680,7 +680,7 @@ jobs:

uses: ./.github/workflows/build_reusable.yml
with:
nodeVersion: 18.18.2
nodeVersion: 20.9.0
afterBuild: |
node run-tests.js \
--concurrency 4 \
Expand Down Expand Up @@ -775,7 +775,7 @@ jobs:
react: ['']
uses: ./.github/workflows/build_reusable.yml
with:
nodeVersion: 18.18.2
nodeVersion: 20.9.0
afterBuild: |
export NEXT_TEST_REACT_VERSION="${{ matrix.react }}"
Expand Down Expand Up @@ -821,7 +821,7 @@ jobs:

uses: ./.github/workflows/build_reusable.yml
with:
nodeVersion: 18.18.2
nodeVersion: 20.9.0
afterBuild: |
export __NEXT_EXPERIMENTAL_PPR=true
export NEXT_EXTERNAL_TESTS_FILTERS="test/ppr-tests-manifest.json"
Expand Down Expand Up @@ -887,7 +887,7 @@ jobs:

uses: ./.github/workflows/build_reusable.yml
with:
nodeVersion: 18.18.2
nodeVersion: 20.9.0
afterBuild: |
export __NEXT_EXPERIMENTAL_PPR=true # for compatibility with the existing tests
export __NEXT_EXPERIMENTAL_CACHE_COMPONENTS=true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code_freeze.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: 18
node-version: 20
check-latest: true
- name: Setup corepack
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create_release_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
check-latest: true

- name: Clone Next.js repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration_tests_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
group: ${{ fromJSON(needs.generate-matrices.outputs.integration) }}
uses: ./.github/workflows/build_reusable.yml
with:
nodeVersion: 18.18.2
nodeVersion: 20.9.0
afterBuild: |
# legacy integration tests with `node run-tests.js`
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [18, 20]
node: [20, 22]
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -37,7 +37,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
Comment thread
devjiwonchoi marked this conversation as resolved.
check-latest: true
- name: Setup corepack
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trigger_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
check-latest: true

- name: Clone Next.js repository
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
"yargs": "16.2.0"
},
"engines": {
"node": ">=18.18.0",
"node": ">=20.9.0",
"pnpm": "9.6.0"
},
"packageManager": "pnpm@9.6.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-next-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@
"validate-npm-package-name": "5.0.1"
},
"engines": {
"node": ">=18.18.0"
"node": ">=20.9.0"
}
}
2 changes: 1 addition & 1 deletion packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,6 @@
"vercel"
],
"engines": {
"node": "^18.18.0 || ^19.8.0 || >= 20.0.0"
"node": ">=20.9.0"
}
}
2 changes: 1 addition & 1 deletion test/.stats-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"react-dom": "19.1.1"
},
"engines": {
"node": ">=18.18.0"
"node": ">=20.9.0"
},
"packageManager": "pnpm@9.6.0"
}
2 changes: 1 addition & 1 deletion test/unit/next-swc.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ describe('next/swc', () => {
'__NEXT_REQUIRED_NODE_VERSION_RANGE'
)
expect(nextEntryContent).toMatch(
/For Next.js, Node.js version "\$\{"\^\d+\.\d+\.\d* \|\| \^\d+\.\d+\.\d* \|\| >= \d+\.\d+\.\d*"\}" is required./
/For Next.js, Node.js version "\$\{">=\d+\.\d+\.\d*"\}" is required./
)
})
})
Expand Down
Loading