From aabc826be8d04130c0d04d91418f2f5cb7a99c60 Mon Sep 17 00:00:00 2001 From: Steven Date: Thu, 19 Oct 2023 09:41:40 -0400 Subject: [PATCH 1/3] test against `node@21` --- .github/actions/next-stats-action/Dockerfile | 2 +- .github/workflows/build_and_deploy.yml | 2 +- .github/workflows/build_and_test.yml | 6 +++--- .github/workflows/build_reusable.yml | 2 +- .github/workflows/code_freeze.yml | 2 +- .github/workflows/pull_request_stats.yml | 2 +- .github/workflows/test_e2e_deploy.yml | 2 +- .github/workflows/trigger_release.yml | 2 +- .github/workflows/update_fonts_data.yml | 2 +- azure-pipelines.yml | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/actions/next-stats-action/Dockerfile b/.github/actions/next-stats-action/Dockerfile index acdb4b43b92ff..474a177b6f59d 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.0.0 | 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..d216a91858307 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.0.0 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..1555a9a0afd00 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.0.0 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.0.0 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.0.0 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..f0c0c3c502e40 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.0.0 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..255afcb9f5169 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.0.0 jobs: start: diff --git a/.github/workflows/pull_request_stats.yml b/.github/workflows/pull_request_stats.yml index c88e5a76ad256..48a39b65909a8 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.0.0 TEST_CONCURRENCY: 6 TURBO_TEAM: 'vercel' diff --git a/.github/workflows/test_e2e_deploy.yml b/.github/workflows/test_e2e_deploy.yml index 8046bfd136d41..dd767307a513d 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.0.0 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..6aba0fc069e3d 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.0.0 jobs: start: diff --git a/.github/workflows/update_fonts_data.yml b/.github/workflows/update_fonts_data.yml index c47e205bf75c9..6354182d6a7f9 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.0.0 jobs: create-pull-request: diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a4a63e68955c0..ae87bcd1a3c9d 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.0.0 stages: - stage: Test From 36e14adac636bf36dfd3cd21a13ac6e8af64e5b0 Mon Sep 17 00:00:00 2001 From: Steven Date: Thu, 19 Oct 2023 09:51:15 -0400 Subject: [PATCH 2/3] 21.0.0 => 21 --- .github/actions/next-stats-action/Dockerfile | 2 +- .github/workflows/build_and_deploy.yml | 2 +- .github/workflows/build_and_test.yml | 6 +++--- .github/workflows/build_reusable.yml | 2 +- .github/workflows/code_freeze.yml | 2 +- .github/workflows/pull_request_stats.yml | 2 +- .github/workflows/test_e2e_deploy.yml | 2 +- .github/workflows/trigger_release.yml | 2 +- .github/workflows/update_fonts_data.yml | 2 +- azure-pipelines.yml | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/actions/next-stats-action/Dockerfile b/.github/actions/next-stats-action/Dockerfile index 474a177b6f59d..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/v21.0.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 d216a91858307..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: 21.0.0 + 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 1555a9a0afd00..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: 21.0.0 + 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: 21.0.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: 21.0.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 f0c0c3c502e40..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: 21.0.0 + 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 255afcb9f5169..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: 21.0.0 + NODE_LTS_VERSION: 21 jobs: start: diff --git a/.github/workflows/pull_request_stats.yml b/.github/workflows/pull_request_stats.yml index 48a39b65909a8..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: 21.0.0 + 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 dd767307a513d..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: 21.0.0 + 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 6aba0fc069e3d..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: 21.0.0 + NODE_LTS_VERSION: 21 jobs: start: diff --git a/.github/workflows/update_fonts_data.yml b/.github/workflows/update_fonts_data.yml index 6354182d6a7f9..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: 21.0.0 + NODE_LTS_VERSION: 21 jobs: create-pull-request: diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ae87bcd1a3c9d..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: ^21.0.0 + node_version: ^21 stages: - stage: Test From 0e48812d914a984a4587db58e16e924e5c8af22c Mon Sep 17 00:00:00 2001 From: Steven Date: Thu, 19 Oct 2023 10:03:06 -0400 Subject: [PATCH 3/3] fix a few tests --- test/integration/hydrate-then-render/pages/_app.js | 2 +- test/integration/relay-analytics-disabled/pages/index.js | 2 +- test/integration/relay-analytics/pages/index.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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()