Skip to content

Commit 91e4ad5

Browse files
authored
Merge branch 'canary' into patch-3
2 parents 345f767 + c6ab3d5 commit 91e4ad5

File tree

408 files changed

+29871
-23092
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

408 files changed

+29871
-23092
lines changed

Diff for: .github/workflows/build_and_deploy.yml

+15-13
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ jobs:
146146
# --env-mode loose is a breaking change required with turbo 2.x since Strict mode is now the default
147147
# TODO: we should add the relevant envs later to to switch to strict mode
148148
build: |
149-
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" && corepack enable
150-
turbo run build-native-release -vvv --env-mode loose --remote-cache-timeout 90 --summarize -- --target x86_64-apple-darwin
149+
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" && corepack enable
150+
pnpm dlx turbo@${TURBO_VERSION} run build-native-release -vvv --env-mode loose --remote-cache-timeout 90 --summarize -- --target x86_64-apple-darwin
151151
strip -x packages/next-swc/native/next-swc.*.node
152152
153153
- host:
@@ -159,8 +159,8 @@ jobs:
159159
# --env-mode loose is a breaking change required with turbo 2.x since Strict mode is now the default
160160
# TODO: we should add the relevant envs later to to switch to strict mode
161161
build: |
162-
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" && corepack enable
163-
turbo run build-native-release -vvv --env-mode loose --remote-cache-timeout 90 --summarize -- --target aarch64-apple-darwin
162+
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" && corepack enable
163+
pnpm dlx turbo@${TURBO_VERSION} run build-native-release -vvv --env-mode loose --remote-cache-timeout 90 --summarize -- --target aarch64-apple-darwin
164164
strip -x packages/next-swc/native/next-swc.*.node
165165
166166
- host:
@@ -172,8 +172,8 @@ jobs:
172172
# TODO: we should add the relevant envs later to to switch to strict mode
173173
build: |
174174
corepack enable
175-
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}"
176-
turbo run build-native-release -vvv --env-mode loose --remote-cache-timeout 90 --summarize -- --target x86_64-pc-windows-msvc
175+
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}"
176+
pnpm dlx turbo@${TURBO_VERSION} run build-native-release -vvv --env-mode loose --remote-cache-timeout 90 --summarize -- --target x86_64-pc-windows-msvc
177177
target: 'x86_64-pc-windows-msvc'
178178

179179
- host:
@@ -186,8 +186,8 @@ jobs:
186186
# TODO: we should add the relevant envs later to to switch to strict mode
187187
build: |
188188
corepack enable
189-
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}"
190-
turbo run build-native-no-plugin-release -vvv --env-mode loose --remote-cache-timeout 90 --summarize -- --target aarch64-pc-windows-msvc
189+
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}"
190+
pnpm dlx turbo@${TURBO_VERSION} run build-native-no-plugin-release -vvv --env-mode loose --remote-cache-timeout 90 --summarize -- --target aarch64-pc-windows-msvc
191191
192192
- host:
193193
- 'self-hosted'
@@ -304,7 +304,11 @@ jobs:
304304
with:
305305
node-version: ${{ env.NODE_LTS_VERSION }}
306306
check-latest: true
307-
- run: corepack enable
307+
308+
- name: Setup corepack
309+
run: |
310+
311+
corepack enable
308312
309313
# we always want to run this to set environment variables
310314
- name: Install Rust
@@ -334,7 +338,7 @@ jobs:
334338
# issues with turbo caching
335339
- name: pull build cache
336340
if: ${{ matrix.settings.docker }}
337-
run: npm i -g turbo@${{ env.TURBO_VERSION }} && node ./scripts/pull-turbo-cache.js ${{ matrix.settings.target }}
341+
run: TURBO_VERSION=${TURBO_VERSION} node ./scripts/pull-turbo-cache.js ${{ matrix.settings.target }}
338342

339343
- name: check build exists
340344
if: ${{ matrix.settings.docker }}
@@ -423,8 +427,6 @@ jobs:
423427
with:
424428
targets: wasm32-unknown-unknown
425429

426-
- run: npm i -g turbo@${{ env.TURBO_VERSION }}
427-
428430
- name: Install wasm-pack
429431
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
430432

@@ -434,7 +436,7 @@ jobs:
434436
- name: Build
435437
# --env-mode loose is a breaking change required with turbo 2.x since Strict mode is now the default
436438
# TODO: we should add the relevant envs later to to switch to strict mode
437-
run: turbo run build-wasm -vvv --env-mode loose --remote-cache-timeout 90 --summarize -- --target ${{ matrix.target }}
439+
run: pnpm dlx turbo@${TURBO_VERSION} run build-wasm -vvv --env-mode loose --remote-cache-timeout 90 --summarize -- --target ${{ matrix.target }}
438440

439441
- name: Add target to folder name
440442
run: '[[ -d "crates/wasm/pkg" ]] && mv crates/wasm/pkg crates/wasm/pkg-${{ matrix.target }} || ls crates/wasm'

Diff for: .github/workflows/build_and_test.yml

+10-8
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ jobs:
164164
stepName: 'rust-check'
165165
secrets: inherit
166166

167-
rust-doc-check:
167+
rustdoc-check:
168168
name: rustdoc check
169169
needs: ['changes', 'build-next']
170170
if: ${{ needs.changes.outputs.docs-only == 'false' }}
@@ -175,7 +175,7 @@ jobs:
175175
skipInstallBuild: 'yes'
176176
skipNativeBuild: 'yes'
177177
afterBuild: ./scripts/deploy-turbopack-docs.sh
178-
stepName: 'rust-doc-check'
178+
stepName: 'rustdoc-check'
179179
secrets: inherit
180180

181181
ast-grep:
@@ -249,11 +249,12 @@ jobs:
249249
strategy:
250250
fail-fast: false
251251
matrix:
252-
exclude:
253-
# Excluding React 18 tests unless on `canary` branch until budget is approved.
254-
- react: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'run-react-18-tests') && '18.3.1' }}
255252
group: [1/6, 2/6, 3/6, 4/6, 5/6, 6/6]
256253
# Empty value uses default
254+
# TODO: Run with React 18.
255+
# Integration tests use the installed React version in next/package.json.include:
256+
# We can't easily switch like we do for e2e tests.
257+
# Skipping this dimensions until we can figure out a way to test multiple React versions.
257258
react: ['']
258259
uses: ./.github/workflows/build_reusable.yml
259260
with:
@@ -545,9 +546,9 @@ jobs:
545546
- 11/13
546547
- 12/13
547548
- 13/13
548-
# Empty value uses default
549-
# TODO: Run with React 18.
550-
# Integration tests use the installed React version in next/package.json.include:
549+
# Empty value uses default
550+
# TODO: Run with React 18.
551+
# Integration tests use the installed React version in next/package.json.include:
551552
# We can't easily switch like we do for e2e tests.
552553
# Skipping this dimensions until we can figure out a way to test multiple React versions.
553554
react: ['']
@@ -635,6 +636,7 @@ jobs:
635636
'test-ppr-integration',
636637
'test-cargo-unit',
637638
'rust-check',
639+
'rustdoc-check',
638640
'test-next-swc-wasm',
639641
'test-turbopack-dev',
640642
'test-turbopack-integration',

Diff for: .github/workflows/build_reusable.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ jobs:
167167
- run: rustc --version
168168
if: ${{ inputs.skipNativeBuild != 'yes' || inputs.needsNextest == 'yes' || inputs.needsRust == 'yes' }}
169169

170-
- run: corepack prepare --activate [email protected] && (killall turbo || echo 'no turbo') && npm i -g "turbo@${TURBO_VERSION}" "@napi-rs/cli@${NAPI_CLI_VERSION}"
170+
- run: corepack prepare --activate [email protected] && npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}"
171171

172172
- name: Cache on ${{ github.ref_name }}
173173
uses: ijjk/[email protected]
@@ -193,7 +193,7 @@ jobs:
193193
- run: node scripts/normalize-version-bump.js
194194
name: normalize versions
195195

196-
- run: turbo run build-native-release -v --env-mode loose --remote-cache-timeout 90 --summarize -- --target ${{ inputs.buildNativeTarget }}
196+
- run: pnpm dlx turbo@${TURBO_VERSION} run build-native-release -v --env-mode loose --remote-cache-timeout 90 --summarize -- --target ${{ inputs.buildNativeTarget }}
197197
if: ${{ inputs.skipNativeBuild != 'yes' }}
198198

199199
- name: Upload next-swc artifact
@@ -224,7 +224,7 @@ jobs:
224224
- run: pnpm playwright install chromium
225225
if: ${{ inputs.skipInstallBuild != 'yes' }}
226226

227-
- run: turbo run get-test-timings -- --build ${{ github.sha }}
227+
- run: pnpm dlx turbo@${TURBO_VERSION} run get-test-timings -- --build ${{ github.sha }}
228228

229229
- run: ${{ inputs.afterBuild }}
230230
# defaults.run.shell sets a stronger options (`-leo pipefail`)

Diff for: .github/workflows/rspack-nextjs-build-integration-tests.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@ jobs:
1414
name: rspack-production
1515
test_type: production
1616
run_before_test: |
17-
export NEXT_RSPACK=1 \
18-
NEXT_TEST_USE_RSPACK=1 \
19-
BUILTIN_FLIGHT_CLIENT_ENTRY_PLUGIN=1 \
20-
BUILTIN_APP_LOADER=1 \
21-
BUILTIN_SWC_LOADER=1
17+
export NEXT_RSPACK=1 NEXT_TEST_USE_RSPACK=1 \
2218
# Failing tests take longer (due to timeouts and retries). Since we have
2319
# many failing tests, we need smaller groups and longer timeouts, in case
2420
# a group gets stuck with a cluster of failing tests.

Diff for: .github/workflows/rspack-nextjs-dev-integration-tests.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@ jobs:
1414
name: rspack-development
1515
test_type: development
1616
run_before_test: |
17-
export NEXT_RSPACK=1 \
18-
NEXT_TEST_USE_RSPACK=1 \
19-
BUILTIN_FLIGHT_CLIENT_ENTRY_PLUGIN=1 \
20-
BUILTIN_APP_LOADER=1 \
21-
BUILTIN_SWC_LOADER=1
17+
export NEXT_RSPACK=1 NEXT_TEST_USE_RSPACK=1
2218
# Failing tests take longer (due to timeouts and retries). Since we have
2319
# many failing tests, we need smaller groups and longer timeouts, in case
2420
# a group gets stuck with a cluster of failing tests.

Diff for: .github/workflows/rspack-update-tests-manifest.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ jobs:
4141
env:
4242
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}
4343
BRANCH_NAME: rspack-manifest
44-
SCRIPT: test/build-rspack-dev-tests-manifest.js
44+
# We need to use `--override` for rspack (but not for turbopack).
45+
# We don't currently have any CI running on every PR, so it's quite
46+
# possible for us to regress on tests. We need to skip the
47+
# only-promote-to-passing merge logic.
48+
SCRIPT: test/update_build_manifest.js --bundler rspack --testSuite dev --override
4549
PR_TITLE: Update bundler development test manifest
4650
PR_BODY: This auto-generated PR updates the development integration test manifest used when testing alternative bundlers.
4751
update_build_manifest:
@@ -77,6 +81,6 @@ jobs:
7781
env:
7882
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}
7983
BRANCH_NAME: rspack-manifest
80-
SCRIPT: test/build-rspack-build-tests-manifest.js
84+
SCRIPT: test/update_build_manifest.js --bundler rspack --testSuite build --override
8185
PR_TITLE: Update bundler production test manifest
8286
PR_BODY: This auto-generated PR updates the production integration test manifest used when testing alternative bundlers.

Diff for: .github/workflows/turbopack-update-tests-manifest.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
env:
4242
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}
4343
BRANCH_NAME: turbopack-manifest
44-
SCRIPT: test/build-turbopack-dev-tests-manifest.js
44+
SCRIPT: test/update_build_manifest.js --bundler turbopack --testSuite dev
4545
PR_TITLE: Update Turbopack development test manifest
4646
PR_BODY: This auto-generated PR updates the development integration test manifest used when testing Turbopack.
4747
update_build_manifest:
@@ -77,6 +77,6 @@ jobs:
7777
env:
7878
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}
7979
BRANCH_NAME: turbopack-manifest
80-
SCRIPT: test/build-turbopack-build-tests-manifest.js
80+
SCRIPT: test/update_build_manifest.js --bundler turbopack --testSuite build
8181
PR_TITLE: Update Turbopack production test manifest
8282
PR_BODY: This auto-generated PR updates the production integration test manifest used when testing Turbopack.

Diff for: .github/workflows/turbopack-upload-tests-manifest.yml renamed to .github/workflows/upload-tests-manifest.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Workflow to upload next.js integration test results to KV for https://areweturboyet.com/
22
# This workflow assumes the `next-integration-test` workflow has been executed
33
# and test reports have been uploaded to the `test-results` artifact.
4-
name: Upload Turbopack tests manifest to areweturboyet.com
4+
name: Upload bundler test manifests to areweturboyet.com
55

66
on:
77
schedule:
@@ -12,6 +12,11 @@ on:
1212
description: Next.js version, sha, branch to test
1313
type: string
1414
default: 'canary'
15+
push:
16+
branches:
17+
- canary
18+
paths:
19+
- 'test/*-manifest.json'
1520

1621
jobs:
1722
upload_test_results:

Diff for: .vscode/settings.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@
6161
"packages/next/src/server/app-render/after-task-async-storage-instance.ts",
6262
"packages/next/src/server/app-render/clean-async-snapshot-instance.ts",
6363
"packages/next/src/server/app-render/work-async-storage-instance.ts",
64-
"packages/next/src/server/app-render/work-unit-async-storage-instance.ts"
64+
"packages/next/src/server/app-render/work-unit-async-storage-instance.ts",
65+
"packages/next/src/client/components/segment-cache-impl/*"
6566
],
6667
// Disable TypeScript surveys.
6768
"typescript.surveys.enabled": false,

0 commit comments

Comments
 (0)