diff --git a/.github/actions/next-integration-stat/package.json b/.github/actions/next-integration-stat/package.json index da91748725f9..52a0ef0f936d 100644 --- a/.github/actions/next-integration-stat/package.json +++ b/.github/actions/next-integration-stat/package.json @@ -21,7 +21,7 @@ "strip-ansi": "^7.0.1" }, "engines": { - "node": ">=18.18.0" + "node": ">=20.9.0" }, "packageManager": "pnpm@9.6.0" } diff --git a/.github/actions/next-stats-action/Dockerfile b/.github/actions/next-stats-action/Dockerfile index 1ba64a913211..9eb8e8b16d11 100644 --- a/.github/actions/next-stats-action/Dockerfile +++ b/.github/actions/next-stats-action/Dockerfile @@ -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 diff --git a/.github/actions/next-stats-action/package.json b/.github/actions/next-stats-action/package.json index cbfbe244ad73..e24f5fbc2cfc 100644 --- a/.github/actions/next-stats-action/package.json +++ b/.github/actions/next-stats-action/package.json @@ -18,7 +18,7 @@ "typescript": "5.1.6" }, "engines": { - "node": ">=18.18.0" + "node": ">=20.9.0" }, "packageManager": "pnpm@9.6.0" } diff --git a/.github/actions/upload-turboyet-data/package.json b/.github/actions/upload-turboyet-data/package.json index 5646ee484f49..b7458f2d14cb 100644 --- a/.github/actions/upload-turboyet-data/package.json +++ b/.github/actions/upload-turboyet-data/package.json @@ -12,7 +12,7 @@ "@vercel/ncc": "^0.36.0" }, "engines": { - "node": ">=18.18.0" + "node": ">=20.9.0" }, "packageManager": "pnpm@9.6.0" } diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 6814860559ec..7abd7990e0ce 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -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: @@ -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 @@ -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 @@ -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 @@ -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 @@ -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" @@ -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 @@ -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" @@ -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] uses: ./.github/workflows/build_reusable.yml with: @@ -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: @@ -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 \ @@ -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 }}" @@ -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" @@ -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 diff --git a/.github/workflows/code_freeze.yml b/.github/workflows/code_freeze.yml index b4012396a92f..06df04595202 100644 --- a/.github/workflows/code_freeze.yml +++ b/.github/workflows/code_freeze.yml @@ -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: | diff --git a/.github/workflows/create_release_branch.yml b/.github/workflows/create_release_branch.yml index e39d3411c4f0..75f5f9a21d6f 100644 --- a/.github/workflows/create_release_branch.yml +++ b/.github/workflows/create_release_branch.yml @@ -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 diff --git a/.github/workflows/integration_tests_reusable.yml b/.github/workflows/integration_tests_reusable.yml index 32f289d2641d..bf201f5375f3 100644 --- a/.github/workflows/integration_tests_reusable.yml +++ b/.github/workflows/integration_tests_reusable.yml @@ -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` diff --git a/.github/workflows/test_examples.yml b/.github/workflows/test_examples.yml index e0a88fe51b50..38a6b1f49f77 100644 --- a/.github/workflows/test_examples.yml +++ b/.github/workflows/test_examples.yml @@ -25,7 +25,7 @@ jobs: strategy: fail-fast: false matrix: - node: [18, 20] + node: [20, 22] steps: - uses: actions/checkout@v4 with: @@ -37,7 +37,7 @@ jobs: - name: Setup node uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 check-latest: true - name: Setup corepack run: | diff --git a/.github/workflows/trigger_release.yml b/.github/workflows/trigger_release.yml index e1bd2db73702..23d2d3421cd8 100644 --- a/.github/workflows/trigger_release.yml +++ b/.github/workflows/trigger_release.yml @@ -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 diff --git a/package.json b/package.json index 98bd6ef883f2..1ba7c2b2ab79 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index d761d182b68e..74f096af753b 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -50,6 +50,6 @@ "validate-npm-package-name": "5.0.1" }, "engines": { - "node": ">=18.18.0" + "node": ">=20.9.0" } } diff --git a/packages/next/package.json b/packages/next/package.json index 3986d07b0058..2dccbd184218 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -369,6 +369,6 @@ "vercel" ], "engines": { - "node": "^18.18.0 || ^19.8.0 || >= 20.0.0" + "node": ">=20.9.0" } } diff --git a/test/.stats-app/package.json b/test/.stats-app/package.json index 2612a28637ad..14fffcffe8f3 100644 --- a/test/.stats-app/package.json +++ b/test/.stats-app/package.json @@ -8,7 +8,7 @@ "react-dom": "19.1.1" }, "engines": { - "node": ">=18.18.0" + "node": ">=20.9.0" }, "packageManager": "pnpm@9.6.0" } diff --git a/test/unit/next-swc.test.ts b/test/unit/next-swc.test.ts index fe07207bcefa..46663d9639c0 100644 --- a/test/unit/next-swc.test.ts +++ b/test/unit/next-swc.test.ts @@ -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./ ) }) })