Unverified Commit 607cce95 authored by Jiwon Choi's avatar Jiwon Choi Committed by GitHub

Revert "Revert "[Breaking] Bump minimum Node.js version to >=20.9.0" ( #83243)" (#83411)

Reverts vercel/next.js#83243

x-ref: [slack
thread](https://vercel.slack.com/archives/C02CDC2ALJH/p1756938180494949?thread_ts=1756307884.016309&cid=C02CDC2ALJH)
parent db1de21e
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
"strip-ansi": "^7.0.1" "strip-ansi": "^7.0.1"
}, },
"engines": { "engines": {
"node": ">=18.18.0" "node": ">=20.9.0"
}, },
"packageManager": "pnpm@9.6.0" "packageManager": "pnpm@9.6.0"
} }
...@@ -11,7 +11,7 @@ RUN apt install unzip wget curl nano htop screen build-essential pkg-config libs ...@@ -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 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 npm i -g corepack@0.31
RUN corepack enable RUN corepack enable
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
"typescript": "5.1.6" "typescript": "5.1.6"
}, },
"engines": { "engines": {
"node": ">=18.18.0" "node": ">=20.9.0"
}, },
"packageManager": "pnpm@9.6.0" "packageManager": "pnpm@9.6.0"
} }
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"@vercel/ncc": "^0.36.0" "@vercel/ncc": "^0.36.0"
}, },
"engines": { "engines": {
"node": ">=18.18.0" "node": ">=20.9.0"
}, },
"packageManager": "pnpm@9.6.0" "packageManager": "pnpm@9.6.0"
} }
...@@ -11,8 +11,8 @@ on: ...@@ -11,8 +11,8 @@ on:
# of that workflow. Environment variables are not automatically passed to # of that workflow. Environment variables are not automatically passed to
# reusable workflows. # reusable workflows.
env: env:
NODE_MAINTENANCE_VERSION: 18 NODE_MAINTENANCE_VERSION: 20
NODE_LTS_VERSION: 20 NODE_LTS_VERSION: 22
jobs: jobs:
optimize-ci: optimize-ci:
...@@ -109,7 +109,7 @@ jobs: ...@@ -109,7 +109,7 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: 18 node-version: 20
- name: Setup corepack - name: Setup corepack
run: | run: |
npm i -g corepack@0.31 npm i -g corepack@0.31
...@@ -275,7 +275,7 @@ jobs: ...@@ -275,7 +275,7 @@ jobs:
react: [''] react: ['']
uses: ./.github/workflows/build_reusable.yml uses: ./.github/workflows/build_reusable.yml
with: with:
nodeVersion: 18.18.2 nodeVersion: 20.9.0
afterBuild: | afterBuild: |
export IS_TURBOPACK_TEST=1 export IS_TURBOPACK_TEST=1
export TURBOPACK_DEV=1 export TURBOPACK_DEV=1
...@@ -308,7 +308,7 @@ jobs: ...@@ -308,7 +308,7 @@ jobs:
react: ['', '18.3.1'] react: ['', '18.3.1']
uses: ./.github/workflows/build_reusable.yml uses: ./.github/workflows/build_reusable.yml
with: with:
nodeVersion: 18.18.2 nodeVersion: 20.9.0
afterBuild: | afterBuild: |
export IS_TURBOPACK_TEST=1 export IS_TURBOPACK_TEST=1
export TURBOPACK_BUILD=1 export TURBOPACK_BUILD=1
...@@ -330,7 +330,7 @@ jobs: ...@@ -330,7 +330,7 @@ jobs:
group: [1/7, 2/7, 3/7, 4/7, 5/7, 6/7, 7/7] group: [1/7, 2/7, 3/7, 4/7, 5/7, 6/7, 7/7]
uses: ./.github/workflows/build_reusable.yml uses: ./.github/workflows/build_reusable.yml
with: with:
nodeVersion: 18.18.2 nodeVersion: 20.9.0
afterBuild: | afterBuild: |
export IS_TURBOPACK_TEST=1 export IS_TURBOPACK_TEST=1
export TURBOPACK_BUILD=1 export TURBOPACK_BUILD=1
...@@ -381,7 +381,7 @@ jobs: ...@@ -381,7 +381,7 @@ jobs:
group: [1/6, 2/6, 3/6, 4/6, 5/6, 6/6] group: [1/6, 2/6, 3/6, 4/6, 5/6, 6/6]
uses: ./.github/workflows/build_reusable.yml uses: ./.github/workflows/build_reusable.yml
with: with:
nodeVersion: 18.18.2 nodeVersion: 20.9.0
afterBuild: | afterBuild: |
export NEXT_EXTERNAL_TESTS_FILTERS="$(pwd)/test/rspack-dev-tests-manifest.json" export NEXT_EXTERNAL_TESTS_FILTERS="$(pwd)/test/rspack-dev-tests-manifest.json"
...@@ -414,7 +414,7 @@ jobs: ...@@ -414,7 +414,7 @@ jobs:
# Empty value uses default # Empty value uses default
uses: ./.github/workflows/build_reusable.yml uses: ./.github/workflows/build_reusable.yml
with: with:
nodeVersion: 18.18.2 nodeVersion: 20.9.0
afterBuild: | afterBuild: |
export NEXT_EXTERNAL_TESTS_FILTERS="$(pwd)/test/rspack-build-tests-manifest.json" export NEXT_EXTERNAL_TESTS_FILTERS="$(pwd)/test/rspack-build-tests-manifest.json"
export NEXT_TEST_MODE=start export NEXT_TEST_MODE=start
...@@ -441,7 +441,7 @@ jobs: ...@@ -441,7 +441,7 @@ jobs:
group: [1/7, 2/7, 3/7, 4/7, 5/7, 6/7, 7/7] group: [1/7, 2/7, 3/7, 4/7, 5/7, 6/7, 7/7]
uses: ./.github/workflows/build_reusable.yml uses: ./.github/workflows/build_reusable.yml
with: with:
nodeVersion: 18.18.2 nodeVersion: 20.9.0
afterBuild: | afterBuild: |
export NEXT_EXTERNAL_TESTS_FILTERS="$(pwd)/test/rspack-build-tests-manifest.json" export NEXT_EXTERNAL_TESTS_FILTERS="$(pwd)/test/rspack-build-tests-manifest.json"
...@@ -511,7 +511,7 @@ jobs: ...@@ -511,7 +511,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: 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 uses: ./.github/workflows/build_reusable.yml
with: with:
...@@ -529,7 +529,7 @@ jobs: ...@@ -529,7 +529,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: 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 uses: ./.github/workflows/build_reusable.yml
with: with:
...@@ -680,7 +680,7 @@ jobs: ...@@ -680,7 +680,7 @@ jobs:
uses: ./.github/workflows/build_reusable.yml uses: ./.github/workflows/build_reusable.yml
with: with:
nodeVersion: 18.18.2 nodeVersion: 20.9.0
afterBuild: | afterBuild: |
node run-tests.js \ node run-tests.js \
--concurrency 4 \ --concurrency 4 \
...@@ -775,7 +775,7 @@ jobs: ...@@ -775,7 +775,7 @@ jobs:
react: [''] react: ['']
uses: ./.github/workflows/build_reusable.yml uses: ./.github/workflows/build_reusable.yml
with: with:
nodeVersion: 18.18.2 nodeVersion: 20.9.0
afterBuild: | afterBuild: |
export NEXT_TEST_REACT_VERSION="${{ matrix.react }}" export NEXT_TEST_REACT_VERSION="${{ matrix.react }}"
...@@ -821,7 +821,7 @@ jobs: ...@@ -821,7 +821,7 @@ jobs:
uses: ./.github/workflows/build_reusable.yml uses: ./.github/workflows/build_reusable.yml
with: with:
nodeVersion: 18.18.2 nodeVersion: 20.9.0
afterBuild: | afterBuild: |
export __NEXT_EXPERIMENTAL_PPR=true export __NEXT_EXPERIMENTAL_PPR=true
export NEXT_EXTERNAL_TESTS_FILTERS="test/ppr-tests-manifest.json" export NEXT_EXTERNAL_TESTS_FILTERS="test/ppr-tests-manifest.json"
...@@ -887,7 +887,7 @@ jobs: ...@@ -887,7 +887,7 @@ jobs:
uses: ./.github/workflows/build_reusable.yml uses: ./.github/workflows/build_reusable.yml
with: with:
nodeVersion: 18.18.2 nodeVersion: 20.9.0
afterBuild: | afterBuild: |
export __NEXT_EXPERIMENTAL_PPR=true # for compatibility with the existing tests export __NEXT_EXPERIMENTAL_PPR=true # for compatibility with the existing tests
export __NEXT_EXPERIMENTAL_CACHE_COMPONENTS=true export __NEXT_EXPERIMENTAL_CACHE_COMPONENTS=true
......
...@@ -29,7 +29,7 @@ jobs: ...@@ -29,7 +29,7 @@ jobs:
- name: Setup node - name: Setup node
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: 18 node-version: 20
check-latest: true check-latest: true
- name: Setup corepack - name: Setup corepack
run: | run: |
......
...@@ -36,7 +36,7 @@ jobs: ...@@ -36,7 +36,7 @@ jobs:
- name: Setup node - name: Setup node
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: 18 node-version: 20
check-latest: true check-latest: true
- name: Clone Next.js repository - name: Clone Next.js repository
......
...@@ -119,7 +119,7 @@ jobs: ...@@ -119,7 +119,7 @@ jobs:
group: ${{ fromJSON(needs.generate-matrices.outputs.integration) }} group: ${{ fromJSON(needs.generate-matrices.outputs.integration) }}
uses: ./.github/workflows/build_reusable.yml uses: ./.github/workflows/build_reusable.yml
with: with:
nodeVersion: 18.18.2 nodeVersion: 20.9.0
afterBuild: | afterBuild: |
# legacy integration tests with `node run-tests.js` # legacy integration tests with `node run-tests.js`
......
...@@ -25,7 +25,7 @@ jobs: ...@@ -25,7 +25,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
node: [18, 20] node: [20, 22]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
...@@ -37,7 +37,7 @@ jobs: ...@@ -37,7 +37,7 @@ jobs:
- name: Setup node - name: Setup node
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: 18 node-version: 20
check-latest: true check-latest: true
- name: Setup corepack - name: Setup corepack
run: | run: |
......
...@@ -53,7 +53,7 @@ jobs: ...@@ -53,7 +53,7 @@ jobs:
- name: Setup node - name: Setup node
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: 18 node-version: 20
check-latest: true check-latest: true
- name: Clone Next.js repository - name: Clone Next.js repository
......
...@@ -286,7 +286,7 @@ ...@@ -286,7 +286,7 @@
"yargs": "16.2.0" "yargs": "16.2.0"
}, },
"engines": { "engines": {
"node": ">=18.18.0", "node": ">=20.9.0",
"pnpm": "9.6.0" "pnpm": "9.6.0"
}, },
"packageManager": "pnpm@9.6.0", "packageManager": "pnpm@9.6.0",
......
...@@ -50,6 +50,6 @@ ...@@ -50,6 +50,6 @@
"validate-npm-package-name": "5.0.1" "validate-npm-package-name": "5.0.1"
}, },
"engines": { "engines": {
"node": ">=18.18.0" "node": ">=20.9.0"
} }
} }
...@@ -369,6 +369,6 @@ ...@@ -369,6 +369,6 @@
"vercel" "vercel"
], ],
"engines": { "engines": {
"node": "^18.18.0 || ^19.8.0 || >= 20.0.0" "node": ">=20.9.0"
} }
} }
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"react-dom": "19.1.1" "react-dom": "19.1.1"
}, },
"engines": { "engines": {
"node": ">=18.18.0" "node": ">=20.9.0"
}, },
"packageManager": "pnpm@9.6.0" "packageManager": "pnpm@9.6.0"
} }
...@@ -125,7 +125,7 @@ describe('next/swc', () => { ...@@ -125,7 +125,7 @@ describe('next/swc', () => {
'__NEXT_REQUIRED_NODE_VERSION_RANGE' '__NEXT_REQUIRED_NODE_VERSION_RANGE'
) )
expect(nextEntryContent).toMatch( 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./
) )
}) })
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment