Skip to content

Commit

Permalink
Merge branch 'refs/heads/canary' into elef/introduce-error-builder
Browse files Browse the repository at this point in the history
# Conflicts:
#	packages/next/src/build/webpack/loaders/next-app-loader.ts
#	packages/next/src/client/components/navigation.react-server.ts
#	packages/next/src/server/base-server.ts
#	packages/next/src/server/route-modules/app-route/helpers/resolve-handler-error.ts
  • Loading branch information
panteliselef committed Jun 9, 2024
2 parents c3baf8b + 3c99b8c commit 90b36b5
Show file tree
Hide file tree
Showing 1,099 changed files with 188,048 additions and 146,364 deletions.
3 changes: 3 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ rustflags = ["-C", "target-feature=+crt-static"]
[target.i686-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]

[target.aarch64-pc-windows-msvc]
linker = "rust-lld"

[target.aarch64-apple-darwin]
linker = "rust-lld"

Expand Down
7 changes: 4 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ packages/next-codemod/**/*.js
packages/next-codemod/**/*.d.ts
packages/next-env/**/*.d.ts
packages/create-next-app/templates/**
test/integration/eslint/**
test/integration/script-loader/**/*
test/development/basic/legacy-decorators/**/*
test/integration/eslint/**/*.js
test/integration/script-loader/**/*.js
test/development/basic/legacy-decorators/**/*.js
test/production/emit-decorator-metadata/**/*.js
!test/**/*.test.*
test/e2e/app-dir/rsc-errors/app/swc/use-client/page.js
test-timings.json
packages/next-swc/crates/**
Expand Down
3 changes: 3 additions & 0 deletions .github/actions/next-repo-actions/dist/bankrupt/index.js

Large diffs are not rendered by default.

144 changes: 144 additions & 0 deletions .github/actions/next-repo-actions/dist/bankrupt/licenses.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
@actions/core
MIT
The MIT License (MIT)

Copyright 2019 GitHub

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

@actions/http-client
MIT
Actions Http Client for Node.js

Copyright (c) GitHub, Inc.

All rights reserved.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


@fastify/busboy
MIT
Copyright Brian White. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.

nextjs-project
The MIT License (MIT)

Copyright (c) 2024 Vercel, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


tunnel
MIT
The MIT License (MIT)

Copyright (c) 2012 Koichi Kobayashi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


undici
MIT
MIT License

Copyright (c) Matteo Collina and Undici contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


uuid
MIT
The MIT License (MIT)

Copyright (c) 2010-2020 Robert Kieffer and other contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
"private": true,
"description": "Notify Next.js team about pending PRs and popular issues",
"scripts": {
"build": "pnpm build-issues && pnpm build-prs && pnpm build-feature-requests",
"build": "pnpm build-issues && pnpm build-prs && pnpm build-feature-requests && pnpm build-bankrupt-issues",
"build-issues": "ncc build src/popular-issues.mjs -m -o dist/issues --license licenses.txt",
"build-prs": "ncc build src/popular-prs.mjs -m -o dist/prs --license licenses.txt",
"build-feature-requests": "ncc build src/popular-feature-requests.mjs -m -o dist/feature-requests --license licenses.txt"
"build-feature-requests": "ncc build src/popular-feature-requests.mjs -m -o dist/feature-requests --license licenses.txt",
"build-bankrupt-issues": "ncc build src/bankrupt-issues.ts -m -o dist/bankrupt --license licenses.txt"
},
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/github": "6.0.0",
"@slack/web-api": "^7.0.4"
"@slack/web-api": "^7.0.4",
"slack-block-builder": "^2.8.0"
},
"devDependencies": {
"@vercel/ncc": "^0.38.1"
Expand Down
3 changes: 3 additions & 0 deletions .github/actions/next-repo-actions/src/bankrupt-issues.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { info } from '@actions/core'

info('Hello, world!')
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ async function run() {

await slackClient.chat.postMessage({
blocks: generateBlocks(items),
channel: '#team-next-js',
channel: '#next-info',
icon_emoji: ':github:',
username: 'GitHub Notifier',
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async function run() {

await slackClient.chat.postMessage({
blocks: generateBlocks(data.items),
channel: '#team-next-js',
channel: '#next-info',
icon_emoji: ':github:',
username: 'GitHub Notifier',
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async function run() {
if (data.items.length > 0) {
await slackClient.chat.postMessage({
blocks: generateBlocks(data.items),
channel: '#team-next-js',
channel: '#next-info',
icon_emoji: ':github:',
username: 'GitHub Notifier',
})
Expand Down
6 changes: 6 additions & 0 deletions .github/actions/next-repo-actions/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"compilerOptions": {
"target": "es2015",
"moduleResolution": "node"
}
}
6 changes: 6 additions & 0 deletions .github/labeler.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
{ "type": "user", "pattern": "kyliau" },
{ "type": "user", "pattern": "spanicker" }
],
"CI approved": [
{ "type": "user", "pattern": "SukkaW" },
{ "type": "user", "pattern": "unstubbable" },
{ "type": "user", "pattern": "vercel-release-bot" }
],
"created-by: Next.js team": [
{ "type": "user", "pattern": "acdlite" },
{ "type": "user", "pattern": "balazsorban44" },
Expand Down Expand Up @@ -48,6 +53,7 @@
],
"created-by: Turbopack team": [
{ "type": "user", "pattern": "bgw" },
{ "type": "user", "pattern": "arlyon" },
{ "type": "user", "pattern": "ForsakenHarmony" },
{ "type": "user", "pattern": "kdy1" },
{ "type": "user", "pattern": "kwonoj" },
Expand Down
11 changes: 9 additions & 2 deletions .github/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
# canary next-swc binaries in the monorepo
NEXT_SKIP_NATIVE_POSTINSTALL: 1
outputs:
isRelease: ${{ github.event_name != 'workflow_dispatch' && steps.check-release.outputs.IS_RELEASE }}
isRelease: ${{ steps.check-release.outputs.IS_RELEASE }}
steps:
- name: Setup node
uses: actions/setup-node@v4
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
target: 'x86_64-apple-darwin'
build: |
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" && corepack enable
turbo run build-native-release -vvv --remote-cache-timeout 90 --summarize -- --target x86_64-apple-darwin --release
turbo run build-native-release -vvv --remote-cache-timeout 90 --summarize -- --target x86_64-apple-darwin
strip -x packages/next-swc/native/next-swc.*.node
- host:
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:
build: |
corepack enable
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}"
turbo run build-native-no-plugin -vvv --remote-cache-timeout 90 --summarize -- --release --target i686-pc-windows-msvc
turbo run build-native-no-plugin-release -vvv --remote-cache-timeout 90 --summarize -- --target i686-pc-windows-msvc
target: 'i686-pc-windows-msvc'

- host:
Expand All @@ -135,7 +135,7 @@ jobs:
build: |
corepack enable
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}"
turbo run build-native-no-plugin-woa-release -vvv --remote-cache-timeout 90 --summarize -- --target aarch64-pc-windows-msvc
turbo run build-native-no-plugin-release -vvv --remote-cache-timeout 90 --summarize -- --target aarch64-pc-windows-msvc
- host:
- 'self-hosted'
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/issue_bankrupt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 'Bankrupt issues'

on:
workflow_dispatch:

jobs:
run:
if: github.repository_owner == 'vercel'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: corepack enable
- name: 'Bankrupt issues & send notification to Slack'
run: node ./.github/actions/next-repo-actions/dist/bankrupt/index.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/popular.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ jobs:
- uses: actions/setup-node@v4
- run: corepack enable
- name: 'Issues: Send notification to Slack'
run: node ./.github/actions/next-repo-info/dist/issues/index.mjs
run: node ./.github/actions/next-repo-actions/dist/issues/index.mjs
continue-on-error: true
- name: 'PRs: Send notification to Slack'
run: node ./.github/actions/next-repo-info/dist/prs/index.mjs
run: node ./.github/actions/next-repo-actions/dist/prs/index.mjs
continue-on-error: true
- name: 'Feature requests: Send notification to Slack'
run: node ./.github/actions/next-repo-info/dist/feature-requests/index.mjs
run: node ./.github/actions/next-repo-actions/dist/feature-requests/index.mjs
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/setup-nextjs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,28 +76,8 @@ jobs:
corepack enable
pnpm install --loglevel error
- name: Build next-swc with latest turbopack
id: build-next-swc-turbopack-patch
continue-on-error: true
run: |
export TURBOPACK_REMOTE="https://github.com/vercel/turbo"
# Apply patches to the cargo to the latest turbopack's sha.
# Basic recipe to apply patch to cargo via cli looks like this:
# cargo check --config 'patch."https://github.com/vercel/turbo".$PKG_NAME.git="https://github.com/vercel/turbo.git?rev=$SHA"'
# Careful to preserve quote to allow dot expression can access git url based property key.
export BINDING=$(printf 'patch.\\"%s\\".%s.git=\\"%s?rev=%s\\"' "$TURBOPACK_REMOTE" "turbopack-binding" "$TURBOPACK_REMOTE" "$GITHUB_SHA")
export TASKS=$(printf 'patch.\\"%s\\".%s.git=\\"%s?rev=%s\\"' "$TURBOPACK_REMOTE" "turbo-tasks" "$TURBOPACK_REMOTE" "$GITHUB_SHA")
export TASKS_FS=$(printf 'patch.\\"%s\\".%s.git=\\"%s?rev=%s\\"' "$TURBOPACK_REMOTE" "turbo-tasks-fs" "$TURBOPACK_REMOTE" "$GITHUB_SHA")
echo "Trying to build next-swc with turbopack $GITHUB_SHA"
hyperfine --min-runs 1 --show-output 'pnpm run --filter=@next/swc build-native --features plugin --release --cargo-flags="--config $BINDING --config $TASKS --config $TASKS_FS"'
echo "built=pass" >> $GITHUB_OUTPUT
echo "Successfully built next-swc with turbopack $GITHUB_SHA"
- name: Build next-swc
if: steps.build-next-swc-turbopack-patch.outputs.built != 'pass'
run: |
echo "Looks like we could not apply latest turbopack to next-swc. Trying to build next-swc with published turbopack. This might happen when there is a breaking changes in turbopack, and next.js is not yet updated."
hyperfine --min-runs 1 --show-output 'pnpm run --filter=@next/swc build-native --features plugin --release'
echo "Successfully built next-swc with published turbopack"
Expand Down
Loading

0 comments on commit 90b36b5

Please sign in to comment.