Skip to content

Commit

Permalink
Merge branch 'canary' into update-husky-lint-staged
Browse files Browse the repository at this point in the history
  • Loading branch information
samcx committed May 29, 2024
2 parents 8526b07 + b4f3283 commit 0e0d1b2
Show file tree
Hide file tree
Showing 592 changed files with 177,293 additions and 142,176 deletions.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/actions/next-repo-info/dist/issues/index.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/actions/next-repo-info/dist/prs/index.mjs

Large diffs are not rendered by default.

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
2 changes: 1 addition & 1 deletion .github/actions/next-repo-info/src/popular-issues.mjs
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
2 changes: 1 addition & 1 deletion .github/actions/next-repo-info/src/popular-prs.mjs
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/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
6 changes: 3 additions & 3 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
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
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
8 changes: 7 additions & 1 deletion .github/workflows/trigger_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ on:
workflow_dispatch:
inputs:
releaseType:
description: stable or canary?
description: stable, canary, or release candidate?
required: true
type: choice
options:
- canary
- stable
- release-candidate

semverType:
description: semver type?
Expand Down Expand Up @@ -53,6 +54,11 @@ jobs:
- name: Clone Next.js repository
run: git clone https://github.com/vercel/next.js.git --depth=25 --single-branch --branch ${GITHUB_REF_NAME:-canary} .

- name: Check token
run: gh auth status
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}

- name: Get commit of the latest tag
run: echo "LATEST_TAG_COMMIT=$(git rev-list -n 1 $(git describe --tags --abbrev=0))" >> $GITHUB_ENV

Expand Down
14 changes: 14 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

main_branch="canary"

branch="$(git rev-parse --abbrev-ref HEAD)"

if [ "$branch" = "$main_branch" ]; then
echo "You probably didn't intend to push directly to '$main_branch'." >&2
echo "If you're sure that that's what you want to do, bypass this check via" >&2
echo "" >&2
echo " git push --no-verify" >&2
echo "" >&2
exit 1
fi
Loading

0 comments on commit 0e0d1b2

Please sign in to comment.