diff --git a/.github/actions/next-stats-action/Dockerfile b/.github/actions/next-stats-action/Dockerfile index acdb4b43b92ff..216fad1266413 100644 --- a/.github/actions/next-stats-action/Dockerfile +++ b/.github/actions/next-stats-action/Dockerfile @@ -9,7 +9,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.17.0 | bash -s -- -f +RUN curl -sfLS https://install-node.vercel.app/v21 | bash -s -- -f RUN corepack enable WORKDIR /next-stats diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 599ba653c36c1..96df9d6f25432 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -8,7 +8,7 @@ on: env: NAPI_CLI_VERSION: 2.16.2 TURBO_VERSION: 1.10.9 - NODE_LTS_VERSION: 20 + NODE_LTS_VERSION: 21 CARGO_PROFILE_RELEASE_LTO: 'true' TURBO_TEAM: 'vercel' TURBO_REMOTE_ONLY: 'true' diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 37b1639ceedf7..09181c4be25d4 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -9,7 +9,7 @@ on: env: NAPI_CLI_VERSION: 2.14.7 TURBO_VERSION: 1.10.9 - NODE_LTS_VERSION: 20 + NODE_LTS_VERSION: 21 TEST_CONCURRENCY: 8 # disable backtrace for test snapshots RUST_BACKTRACE: 0 @@ -146,7 +146,7 @@ jobs: group: [1, 2, 3, 4, 5] uses: ./.github/workflows/build_reusable.yml with: - nodeVersion: 18.17.0 + nodeVersion: 21 skipForDocsOnly: 'yes' afterBuild: RUST_BACKTRACE=0 NEXT_EXTERNAL_TESTS_FILTERS="$(pwd)/test/turbopack-tests-manifest.json" TURBOPACK=1 node run-tests.js --timings -g ${{ matrix.group }}/5 -c ${TEST_CONCURRENCY} --type integration secrets: inherit @@ -211,7 +211,7 @@ jobs: uses: ./.github/workflows/build_reusable.yml with: - nodeVersion: 18.17.0 + nodeVersion: 21 skipForDocsOnly: 'yes' afterBuild: node run-tests.js --timings -g ${{ matrix.group }}/12 -c ${TEST_CONCURRENCY} --type integration secrets: inherit diff --git a/.github/workflows/build_reusable.yml b/.github/workflows/build_reusable.yml index 849580725961a..3d8a5265fce8c 100644 --- a/.github/workflows/build_reusable.yml +++ b/.github/workflows/build_reusable.yml @@ -57,7 +57,7 @@ on: env: NAPI_CLI_VERSION: 2.14.7 TURBO_VERSION: 1.10.9 - NODE_LTS_VERSION: 20 + NODE_LTS_VERSION: 21 TEST_CONCURRENCY: 8 # disable backtrace for test snapshots RUST_BACKTRACE: 0 diff --git a/.github/workflows/code_freeze.yml b/.github/workflows/code_freeze.yml index e7813a5b1868e..08ca48b3b6da9 100644 --- a/.github/workflows/code_freeze.yml +++ b/.github/workflows/code_freeze.yml @@ -18,7 +18,7 @@ name: Code Freeze env: NAPI_CLI_VERSION: 2.14.7 TURBO_VERSION: 1.10.9 - NODE_LTS_VERSION: 20 + NODE_LTS_VERSION: 21 jobs: start: diff --git a/.github/workflows/pull_request_stats.yml b/.github/workflows/pull_request_stats.yml index c88e5a76ad256..6b249a3b2f250 100644 --- a/.github/workflows/pull_request_stats.yml +++ b/.github/workflows/pull_request_stats.yml @@ -7,7 +7,7 @@ name: Generate Pull Request Stats env: NAPI_CLI_VERSION: 2.14.7 TURBO_VERSION: 1.10.9 - NODE_LTS_VERSION: 20 + NODE_LTS_VERSION: 21 TEST_CONCURRENCY: 6 TURBO_TEAM: 'vercel' diff --git a/.github/workflows/test_e2e_deploy.yml b/.github/workflows/test_e2e_deploy.yml index 8046bfd136d41..f9534507eef62 100644 --- a/.github/workflows/test_e2e_deploy.yml +++ b/.github/workflows/test_e2e_deploy.yml @@ -16,7 +16,7 @@ jobs: DATADOG_API_KEY: ${{ secrets.DATA_DOG_API_KEY }} NAPI_CLI_VERSION: 2.16.2 TURBO_VERSION: 1.10.9 - NODE_LTS_VERSION: 20 + NODE_LTS_VERSION: 21 CARGO_PROFILE_RELEASE_LTO: 'true' TURBO_TEAM: 'vercel' TURBO_REMOTE_ONLY: 'true' diff --git a/.github/workflows/trigger_release.yml b/.github/workflows/trigger_release.yml index cac8403d282a7..ad871bf530aa4 100644 --- a/.github/workflows/trigger_release.yml +++ b/.github/workflows/trigger_release.yml @@ -30,7 +30,7 @@ name: Trigger Release env: NAPI_CLI_VERSION: 2.14.7 TURBO_VERSION: 1.10.9 - NODE_LTS_VERSION: 20 + NODE_LTS_VERSION: 21 jobs: start: diff --git a/.github/workflows/update_fonts_data.yml b/.github/workflows/update_fonts_data.yml index c47e205bf75c9..e362d8bb1e178 100644 --- a/.github/workflows/update_fonts_data.yml +++ b/.github/workflows/update_fonts_data.yml @@ -8,7 +8,7 @@ on: workflow_dispatch: env: - NODE_LTS_VERSION: 20 + NODE_LTS_VERSION: 21 jobs: create-pull-request: diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a4a63e68955c0..ae4ed45e476f6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -34,7 +34,7 @@ pr: variables: PNPM_CACHE_FOLDER: $(Pipeline.Workspace)/.pnpm-store NEXT_TELEMETRY_DISABLED: '1' - node_version: ^18.17.0 + node_version: ^21 stages: - stage: Test diff --git a/test/integration/hydrate-then-render/pages/_app.js b/test/integration/hydrate-then-render/pages/_app.js index b0deb2787a7ab..7d74384dc0507 100644 --- a/test/integration/hydrate-then-render/pages/_app.js +++ b/test/integration/hydrate-then-render/pages/_app.js @@ -1,7 +1,7 @@ /* eslint-disable camelcase */ import App from 'next/app' -if (typeof navigator !== 'undefined') { +if (typeof window !== 'undefined' && typeof navigator !== 'undefined') { window.__BEACONS = window.__BEACONS || [] navigator.sendBeacon = async function () { diff --git a/test/integration/relay-analytics-disabled/pages/index.js b/test/integration/relay-analytics-disabled/pages/index.js index 46c828a80fd0d..35826ac0120af 100644 --- a/test/integration/relay-analytics-disabled/pages/index.js +++ b/test/integration/relay-analytics-disabled/pages/index.js @@ -1,4 +1,4 @@ -if (typeof navigator !== 'undefined') { +if (typeof window !== 'undefined' && typeof navigator !== 'undefined') { window.__BEACONS = window.__BEACONS || [] navigator.sendBeacon = async function () { diff --git a/test/integration/relay-analytics/pages/index.js b/test/integration/relay-analytics/pages/index.js index 21839b1f6776e..ad04cd2f36be6 100644 --- a/test/integration/relay-analytics/pages/index.js +++ b/test/integration/relay-analytics/pages/index.js @@ -1,4 +1,4 @@ -if (typeof navigator !== 'undefined') { +if (typeof window !== 'undefined' && typeof navigator !== 'undefined') { window.__BEACONS = window.__BEACONS || [] window.__BEACONS_COUNT = new Map()