Skip to content

Commit ba74a60

Browse files
authored
Merge branch 'vercel:canary' into canary
2 parents 814196f + a2cc073 commit ba74a60

File tree

921 files changed

+15944
-11203
lines changed

Some content is hidden

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

921 files changed

+15944
-11203
lines changed

.cargo/config.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ rustflags = [
3434
"target-feature=+crt-static"
3535
]
3636

37-
[target.'cfg(target_os = "macos")']
38-
linker = "rust-lld"
39-
4037
[target.'cfg(all(target_os = "linux", target_env = "gnu"))']
4138
rustflags = [
4239
"--cfg",

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": ["@changesets/changelog-github", { "repo": "vercel/next.js" }],
4+
"commit": false,
5+
"fixed": [["next", "@next/swc"]],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "canary",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.changeset/dry-roses-nail.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"next": patch
3+
---
4+
5+
Enable `ppr` when `dynamicIO` is enabled

.changeset/loose-cows-pump.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'next': patch
3+
---
4+
5+
Fix dangling promise in unstable_cache

.changeset/lovely-bulldogs-dress.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"next": patch
3+
---
4+
5+
Always pass implicit/soft tags into the `CacheHandler.get` method

.changeset/seven-seas-run.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"next": patch
3+
---
4+
5+
[TypeScript Plugin] Match method signature (`someFunc(): void`) type for client boundary warnings.

.changeset/shaggy-owls-visit.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'next': patch
3+
---
4+
5+
Fixed rewrite params of the interception routes not being parsed correctly in certain deployed environments

.changeset/shaggy-pears-tell.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"next": patch
3+
---
4+
5+
Use `onPostpone` to determine if segment prefetch is partial

.changeset/shy-impalas-add.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"next": patch
3+
---
4+
5+
[TypeScript Plugin] Moved the diagnostics' positions to the prop's type instead of the value for client-boundary warnings.

.changeset/spotty-hotels-train.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"next": patch
3+
---
4+
5+
[Segment Cache] Fix: Ensure server references can be prerendered

.changeset/swift-socks-find.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'next': patch
3+
---
4+
5+
Sourcemap errors during prerender if `experimental.enablePrerenderSourceMaps` is enabled

.changeset/tricky-planes-worry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"next": patch
3+
---
4+
5+
[dynamicIO] Avoid timeout errors with dynamic params in `"use cache"`

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"jest/no-export": "off",
4949
"jest/no-standalone-expect": [
5050
"error",
51-
{ "additionalTestBlockFunctions": ["retry"] }
51+
{ "additionalTestBlockFunctions": ["retry", "itCI", "itHeaded"] }
5252
]
5353
}
5454
},

.git-blame-ignore-revs

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,30 @@
99
64b718c6618b6c419872abbf22163ae543ac259e
1010

1111
# Replace createNextDescribe with nextTestSetup
12-
c6320ed87ab41eee6f3ac54352ad02a239f329b2
12+
c6320ed87ab41eee6f3ac54352ad02a239f329b2
13+
14+
# Enable prettier for turbopack
15+
eaad5b4c1451f35c4b3b6a3c9c67445b434c4a80
16+
17+
# Turbopack: Make `turbopack-core` Rust 2024
18+
f5d537f23de7c61e427fd915b5b70d2298fdd5ad
19+
# Turbopack: Make `turbo-tasks-malloc` crate Rust 2024
20+
7e9b55da8b0d72c22708ae08a71581858e802bef
21+
# Turbopack: Make `turbopack-ecmascript` Rust 2024
22+
f9e78faee6e959a2bbc8891e3f7761d0d7d7dcb1
23+
# Turbopack: Make `turbopack-resolve` and `turbopack-trace-server` Rust 2024
24+
75bc3548e154453897d2dfaecab2cdf60912ae0c
25+
# Turbopack: Make `turbo-tasks-memory` crate Rust 2024
26+
1226d7e47c54173f568c9dd4bf87ef09f22122b5
27+
# Turbopack: Make `turbo-tasks-env` crate Rust 2024
28+
5a4dba153defeaa6330d2c23d0934594f2df3383
29+
# Turbopack: Make `turbo-macros` crate Rust 2024
30+
305635343df51bbabc19c0df8a82bb8302d86aef
31+
# Turbopack: Make `turbo-backend` crate Rust 2024
32+
9bf6e364d484f3ab7eed18b67fbd878dfc3bee6f
33+
# Turbopack: Make `turbo-rcstr` crate Rust 2024
34+
9156b3b25bcdd74b4dee58eede731ba895c9e0d9
35+
# Turbopack: Make `napi` crate Rust 2024
36+
02219cc880e0991b2060f1591757d97d9f678f9f
37+
# Turbopack: Make `turbo-tasks` crate Rust 2024
38+
47689a6e2552328cf90a2d1f14573d006868f197

.github/labeler.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@
7373
{ "type": "user", "pattern": "leerob" },
7474
{ "type": "user", "pattern": "manovotny" },
7575
{ "type": "user", "pattern": "molebox" },
76-
{ "type": "user", "pattern": "timeyoutakeit" }
76+
{ "type": "user", "pattern": "timeyoutakeit" },
77+
{ "type": "user", "pattern": "icyJoseph" }
7778
],
7879
"created-by: Turbopack team": [
7980
{ "type": "user", "pattern": "bgw" },

.github/workflows/build_and_deploy.yml

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ env:
1515
CARGO_PROFILE_RELEASE_LTO: 'true'
1616
TURBO_TEAM: 'vercel'
1717
TURBO_CACHE: 'remote:rw'
18+
# Without this environment variable, rust-lld will fail because some dependencies defaults to newer version of macOS by default.
19+
#
20+
# See https://doc.rust-lang.org/rustc/platform-support/apple-darwin.html#os-version for more details
21+
MACOSX_DEPLOYMENT_TARGET: 11.0
22+
# This will become "true" if the latest commit is
23+
# "Version Packages" or "Version Pacakges (canary)"
24+
# set from scripts/check-is-release.js
25+
__NEW_RELEASE: 'false'
1826

1927
jobs:
2028
deploy-target:
@@ -40,7 +48,12 @@ jobs:
4048
# 'staging' for canary branch since that will eventually be published i.e. become the production build.
4149
id: deploy-target
4250
run: |
43-
if [[ $(node ./scripts/check-is-release.js 2> /dev/null || :) = v* ]];
51+
# TODO: Remove the new release check once the new release workflow is fully replaced.
52+
RELEASE_CHECK=$(node ./scripts/check-is-release.js 2> /dev/null || :)
53+
if [[ $RELEASE_CHECK =~ ^Version\ Packages(\ \(canary\))?$ ]];
54+
then
55+
echo "__NEW_RELEASE=true" >> $GITHUB_ENV
56+
elif [[ $RELEASE_CHECK = v* ]];
4457
then
4558
echo "value=production" >> $GITHUB_OUTPUT
4659
elif [ '${{ github.ref }}' == 'refs/heads/canary' ]
@@ -582,13 +595,34 @@ jobs:
582595
- run: npm i -g [email protected] # need latest version for provenance (pinning to avoid bugs)
583596
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
584597
- run: ./scripts/publish-native.js
598+
# Legacy release process
585599
- run: ./scripts/publish-release.js
600+
if: ${{ env.__NEW_RELEASE == 'false' }}
586601
env:
587602
RELEASE_BOT_GITHUB_TOKEN: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
588603

604+
# New release process
605+
- name: Publish to NPM
606+
id: changesets
607+
if: ${{ env.__NEW_RELEASE == 'true' }}
608+
uses: changesets/action@v1
609+
with:
610+
publish: pnpm ci:publish
611+
env:
612+
GITHUB_TOKEN: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
613+
NPM_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }}
614+
RELEASE_TYPE: ${{ github.event.inputs.releaseType }}
615+
616+
# Add label to verify the PR is created from this workflow.
617+
- name: Add label to PR
618+
if: steps.changesets.outputs.pullRequestNumber
619+
run: 'gh pr edit ${{ steps.changesets.outputs.pullRequestNumber }} --add-label "created-by: CI"'
620+
env:
621+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
622+
589623
- name: Upload npm log artifact
624+
if: steps.changesets.outputs.published == 'true'
590625
uses: actions/upload-artifact@v4
591-
if: always()
592626
with:
593627
name: npm-publish-logs
594628
path: /home/runner/.npm/_logs/*

.github/workflows/build_reusable.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,6 @@ env:
9797
NEXT_TEST_PREFER_OFFLINE: 1
9898
NEXT_CI_RUNNER: ${{ inputs.runs_on_labels }}
9999

100-
# Without this environment variable, rust-lld will fail because some dependencies defaults to newer version of macOS by default.
101-
#
102-
# See https://doc.rust-lang.org/rustc/platform-support/apple-darwin.html#os-version for more details
103-
MACOSX_DEPLOYMENT_TARGET: 11.0
104-
105100
jobs:
106101
build:
107102
timeout-minutes: ${{ inputs.timeout_minutes }}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Force Merge Canary Release PR
2+
3+
on: pull_request
4+
5+
permissions:
6+
# To bypass and merge PR
7+
pull-requests: write
8+
9+
jobs:
10+
force-merge-canary-release-pr:
11+
runs-on: ubuntu-latest
12+
# Validate the login, PR title, and the label to ensure the PR is
13+
# from the release PR and prevent spoofing.
14+
if: |
15+
github.event.pull_request.user.login == 'vercel-release-bot' &&
16+
github.event.pull_request.title == 'Version Packages (canary)' &&
17+
contains(github.event.pull_request.labels.*.name, 'created-by: CI')
18+
steps:
19+
- name: Bypass required status checks and merge PR
20+
run: gh pr merge --admin --squash "$PR_URL"
21+
env:
22+
PR_URL: ${{github.event.pull_request.html_url}}
23+
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/test_e2e_deploy_release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
types: [published]
77
# allow triggering manually as well
88
workflow_dispatch:
9+
inputs:
10+
nextVersion:
11+
description: canary or custom tarball URL
12+
default: canary
13+
type: string
914

1015
env:
1116
VERCEL_TEST_TEAM: vtest314-next-e2e-tests
@@ -54,7 +59,7 @@ jobs:
5459
matrix:
5560
group: [1/6, 2/6, 3/6, 4/6, 5/6, 6/6]
5661
with:
57-
afterBuild: npm i -g vercel@latest && NEXT_E2E_TEST_TIMEOUT=240000 NEXT_TEST_MODE=deploy NEXT_EXTERNAL_TESTS_FILTERS="test/deploy-tests-manifest.json" node run-tests.js --timings -g ${{ matrix.group }} -c 2 --type e2e
62+
afterBuild: npm i -g vercel@latest && NEXT_E2E_TEST_TIMEOUT=240000 NEXT_TEST_MODE=deploy NEXT_EXTERNAL_TESTS_FILTERS="test/deploy-tests-manifest.json" NEXT_TEST_VERSION="${{ github.event.inputs.nextVersion || 'canary' }}" node run-tests.js --timings -g ${{ matrix.group }} -c 2 --type e2e
5863
skipNativeBuild: 'yes'
5964
skipNativeInstall: 'no'
6065
stepName: 'test-deploy-${{ matrix.group }}'
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: Trigger Release (New)
2+
3+
on:
4+
# Run every day at 23:15 UTC
5+
# TODO: Disabled cron for now, but uncomment
6+
# once replaced the old release workflow.
7+
# schedule:
8+
# - cron: '15 23 * * *'
9+
# Run manually
10+
workflow_dispatch:
11+
inputs:
12+
releaseType:
13+
description: Release Type
14+
required: true
15+
type: choice
16+
# Cron job will run canary release
17+
default: canary
18+
options:
19+
- canary
20+
- stable
21+
# TODO: Follow up enable the case.
22+
# - release-candidate
23+
24+
force:
25+
description: Forced Release
26+
default: false
27+
type: boolean
28+
29+
concurrency: ${{ github.workflow }}-${{ github.ref }}
30+
31+
env:
32+
NAPI_CLI_VERSION: 2.14.7
33+
TURBO_VERSION: 2.3.3
34+
NODE_LTS_VERSION: 20
35+
36+
permissions:
37+
# To create PR
38+
pull-requests: write
39+
40+
jobs:
41+
start:
42+
if: github.repository_owner == 'vercel'
43+
runs-on: ubuntu-latest
44+
env:
45+
NEXT_TELEMETRY_DISABLED: 1
46+
# we build a dev binary for use in CI so skip downloading
47+
# canary next-swc binaries in the monorepo
48+
NEXT_SKIP_NATIVE_POSTINSTALL: 1
49+
50+
environment: release-${{ github.event.inputs.releaseType }}
51+
steps:
52+
- name: Setup node
53+
uses: actions/setup-node@v4
54+
with:
55+
node-version: ${{ env.NODE_LTS_VERSION }}
56+
check-latest: true
57+
58+
# Since actions/checkout won't include the latest tag information,
59+
# use the old clone workflow while still preserving branch specific
60+
# checkout behavior to support backports.
61+
# x-ref: https://github.com/vercel/next.js/pull/63167
62+
- name: Clone Next.js repository
63+
run: git clone https://github.com/vercel/next.js.git --depth=25 --single-branch --branch ${GITHUB_REF_NAME:-canary} .
64+
65+
- name: Check token
66+
run: gh auth status
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
69+
70+
- name: Get commit of the latest tag
71+
run: echo "LATEST_TAG_COMMIT=$(git rev-list -n 1 $(git describe --tags --abbrev=0))" >> $GITHUB_ENV
72+
73+
- name: Get latest commit
74+
run: echo "LATEST_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV
75+
76+
- name: Check if new commits since last tag
77+
if: ${{ github.event.inputs.releaseType != 'stable' && github.event.inputs.force != true }}
78+
run: |
79+
if [ "$LATEST_TAG_COMMIT" = "$LATEST_COMMIT" ]; then
80+
echo "No new commits. Exiting..."
81+
exit 1
82+
fi
83+
84+
# https://github.com/actions/virtual-environments/issues/1187
85+
- name: tune linux network
86+
run: sudo ethtool -K eth0 tx off rx off
87+
88+
- name: Setup corepack
89+
run: |
90+
91+
corepack enable
92+
pnpm --version
93+
94+
- id: get-store-path
95+
run: echo STORE_PATH=$(pnpm store path) >> $GITHUB_OUTPUT
96+
97+
- uses: actions/cache@v4
98+
timeout-minutes: 5
99+
id: cache-pnpm-store
100+
with:
101+
path: ${{ steps.get-store-path.outputs.STORE_PATH }}
102+
key: pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
103+
restore-keys: |
104+
pnpm-store-
105+
pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
106+
107+
- run: pnpm install
108+
- run: pnpm run build
109+
110+
- name: Create Release Pull Request
111+
id: version-packages
112+
uses: changesets/action@v1
113+
with:
114+
version: pnpm ci:version

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ tarballs/
88
packages/**/*.tgz
99
.errors/
1010

11+
# rust compiler crashes
12+
rustc-ice-*.txt
13+
1114
# dependencies
1215
node_modules
1316
package-lock.json
@@ -30,6 +33,7 @@ coverage
3033
# test output
3134
test/**/out/*
3235
test/**/next-env.d.ts
36+
test/**/.next*
3337
.DS_Store
3438
/e2e-tests
3539
test/tmp/**

0 commit comments

Comments
 (0)