Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vercel/next.js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v13.4.5
Choose a base ref
...
head repository: vercel/next.js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v13.4.6
Choose a head ref

Commits on Jun 10, 2023

  1. Fix getting last stable release stats (#51106)

    Small fix ensuring we use the correct repo for getting the last stable
    tag
    ijjk authored Jun 10, 2023
    Copy the full SHA
    d8763ca View commit details
  2. Fix windows metadata slashes (#51088)

    Fixes #51086
    
    The path is used as href, should be normalized as posix style
    fix NEXT-1282
    huozhi authored Jun 10, 2023
    Copy the full SHA
    cfd64aa View commit details

Commits on Jun 11, 2023

  1. ci(workflow): consolidate bytesize upload workflow (#51110)

    ### What?
    
    context: https://github.com/vercel/next.js/actions/runs/5231928600/jobs/9446394605#step:16:33
    
    For some reason, installing datadog cli on some action runner (Windows) is unexpectedly slow: while other platform takes ~30s, windows only takes more than > 7m.
    
    PR updates workflow logic to consolidate artifacts, and then send metrics at once on a separate ubuntu workflow.
    kwonoj authored Jun 11, 2023
    Copy the full SHA
    6ba6762 View commit details
  2. Do not merge chunkGroups' CSS files (#51103)

    This is a temporary fix before we can ship #51018 (more details there). If there're multiple chunk groups holding the same CSS module, we use files from the first one. This has some flaws but still better than our current status.
    shuding authored Jun 11, 2023
    Copy the full SHA
    38d789f View commit details
  3. Copy the full SHA
    109e6cb View commit details

Commits on Jun 12, 2023

  1. Add unique search query for RSC requests to be cacable on CDN (#50970)

    Adding a `_rsc` query for RSC payload requests so that they can be
    differentiated on resources level for CDN cache for the ones that didn't
    fully respect to VARY header.
    
    Also stripped them for node/edge servers so that they won't show up in
    the url
    
    x-ref:
    #49140 (comment)
    
    Closes #49140
    Closes NEXT-1268
    huozhi authored Jun 12, 2023
    Copy the full SHA
    aa3e043 View commit details
  2. v13.4.6-canary.0

    vercel-release-bot committed Jun 12, 2023
    Copy the full SHA
    bb092bc View commit details
  3. Update next-image-unconfigured-host.md with correct Remote Patterns D…

    …ocumentation link to new docs (#49750)
    omarhoumz authored Jun 12, 2023
    Copy the full SHA
    1c1ef0e View commit details
  4. Copy the full SHA
    d2e014a View commit details
  5. Copy the full SHA
    b870bf2 View commit details
  6. add turbopack integration tests to CI (#50904)

    ### What?
    
    * enable turbopack tests in new CI
    * split pre-build step into native and JS builds to allow to start
    native tests faster
    * update swc_core to sync with turbo
    * update turbopack
    
    ### Why?
    
    Running our test suite is still important as long we don't have the full
    integration test suite enabled.
    
    ### Turbopack updates
    
    * vercel/turborepo#5215 <!-- OJ Kwon - ci(workflow):
    upload benchmark results to datadog -->
    * vercel/turborepo#5239 <!-- OJ Kwon -
    fix(swc_plugin): use shared runtime -->
    * vercel/turborepo#3090 <!-- CHEN Yuan - Docs: prior
    to run testcases, add guides to install dependencies for testcases. -->
    * vercel/turborepo#5264 <!-- Tobias Koppers - update
    test runner -->
    
    ---------
    
    Co-authored-by: JJ Kasper <jj@jjsweb.site>
    sokra and ijjk authored Jun 12, 2023
    Copy the full SHA
    6b0a6f0 View commit details
  7. docs: Improve Actions docs. (#51145)

    Adds more clarity on which pieces are Next.js only, how actions
    integrate with Next.js, and details on the progressive enhancement
    story.
    leerob authored Jun 12, 2023
    Copy the full SHA
    f9813ad View commit details
  8. docs: clarify usePathname usage as client hook. (#51146)

    Using client components for `usePathname` is not a de-optimization. This
    update tries to make this more clear by sharing more information about
    the design and tradeoffs of this approach.
    
    ---------
    
    Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
    leerob and delbaoliveira authored Jun 12, 2023
    Copy the full SHA
    e5a45c8 View commit details
  9. Add option for debugging CPU usage (#51174)

    Add a `NEXT_CPU_PROF` environment variable to programmatically profile CPU for the router worker and two render workers. This is helpful because the `--cpu-prof` isn't reliably writing the result (#27406) especially with our multi-process architecture.
    
    ![CleanShot-2023-06-12-GS9p3SbN@2x](https://github.com/vercel/next.js/assets/3676859/b7cf80d2-a35a-4e90-978d-dec70be89f90)
    shuding authored Jun 12, 2023
    Copy the full SHA
    b664cdb View commit details
  10. Copy the full SHA
    0f5b191 View commit details
  11. Copy the full SHA
    272ffff View commit details
  12. ci(workflow): enable test trace upload (#51107)

    ### What?
    
    WEB-1150. 
    
    This PR is an attempt to upload next.js's test results into datadog test trace to track its status. 
    
    Originally it tried to use automatic trace injection (dd-trace/ci/init). However, due to some of custom environments / setup we use it was not compatible out of the box. Instead, this PR injects a new test reportert to generate junit report, then upload it at once at the end of the testing pipeline.
    
    The reporter is configured to run when necessary variables set, local run should not be affected. 
    
    One thing to note is this report will not count retry results, as it'll create duplicated test entry with multiple results since we runts jest per individual test. This'll allow to detect flaky test easier, but also it means we'll get bit of skewed test results compare to the real world as first failure will be accounted as test fail immediately.
    kwonoj authored Jun 12, 2023
    Copy the full SHA
    bcb63f3 View commit details
  13. Prefer module fields for RSC server layer (#51179)

    Follow up for #50548 
    
    There're some packages like `aws-sdk-js-v3` which doesn't have a exports field yet: 
    
    ```
      "main": "./dist-cjs/index.js",
      "types": "./dist-types/index.d.ts",
      "module": "./dist-es/index.js",
     ```
     
     This PR let u pick up by the js assets based on main fields, will prefer `"module"` field instead of `"main"`
     
     Closes NEXT-1286
    huozhi authored Jun 12, 2023
    Copy the full SHA
    74225d1 View commit details
  14. [Docs] Update static assets page to filter out <PagesOnly> information (

    #51180)
    
    Co-authored-by: Michael Novotny <446260+manovotny@users.noreply.github.com>
    delbaoliveira and manovotny authored Jun 12, 2023
    Copy the full SHA
    98351e9 View commit details
  15. Makes codeblock language and filename extensions consistent (#51056)

    There was mismatched usage of `js`, `jsx`, `ts`, and `tsx`. Just tried to get them all in sync.
    manovotny authored Jun 12, 2023
    Copy the full SHA
    a973ad6 View commit details
  16. Copy the full SHA
    d106155 View commit details
  17. Copy the full SHA
    de83bf5 View commit details
  18. fix: helpful error when output: export and next export -o (#51191)

    We already have a warning when using `next export` with `output: export` because the `next export` is effectively a no-op (the exported output was already generated during `next build`).
    
    However, this PR ensures that `next export -o <dir>` throws an error when `output: export` is defined because the files were already emitted to the `distDir` in the `next build` step and we can't safely no-op at this point.
    
    We also guide the user to the correct solution which is to use `output: export` along with `distDir: <dir>` in your next.config.js (instead of mixing legacy behavior with the new behavior).
    
    fix #48207
    fix NEXT-980
    styfle authored Jun 12, 2023
    Copy the full SHA
    a6a9d65 View commit details
  19. Strip _rsc query for navigation between app and page (#51195)

    Fix a missing case from #50970
    
    When navigating from app to page, the `_rsc` query should still be stripped
    huozhi authored Jun 12, 2023
    Copy the full SHA
    8a11835 View commit details
  20. Fix standalone not found (#51172)

    Fixes #50232
    
    Passing down the private env into `'render-server'` module to pick up the proper react with require-hook in standalone server
    fix NEXT-1260
    huozhi authored Jun 12, 2023
    Copy the full SHA
    9d0129c View commit details
  21. Fix a mistake URL in "docs/generate-metadata.mdx/metadataBase" (#51199)

    The sample output of `metadataBase` configuration (`<head <link rel="alternate" ...>`) had an incorrect `href`:
    
    https://nextjs.org/docs/app/api-reference/functions/generate-metadata#metadatabase
    mirismaili authored Jun 12, 2023
    Copy the full SHA
    0c9041e View commit details
  22. docs: Add separate lines to eslint prompt. (#51143)

    Tyler Lutz authored Jun 12, 2023
    Copy the full SHA
    1987f44 View commit details
  23. docs: Update Vanilla Extract example link. (#51192)

    Jack Sutton authored Jun 12, 2023
    Copy the full SHA
    4ae8bc7 View commit details
  24. Copy the full SHA
    3b2ee1e View commit details
  25. docs: correct valid route segments for icon/favicon/apple-icon (#51188)

    Improves the documentation to correctly mention that only favicon is
    restricted to the root app/ segment.
    
    x-ref:
    [slack](https://vercel.slack.com/archives/C03KAR5DCKC/p1686425241975119)
    MaxLeiter authored Jun 12, 2023
    Copy the full SHA
    cdfdaab View commit details
  26. docs: fix typos in Server Actions docs. (#51185)

    Tyler Lutz authored Jun 12, 2023
    Copy the full SHA
    9fc904f View commit details
  27. v13.4.6-canary.1

    vercel-release-bot committed Jun 12, 2023
    Copy the full SHA
    6e9113f View commit details

Commits on Jun 13, 2023

  1. docs: Adds Note to Good to know consistency (#51080)

    * Changes all `Note` → `Good to know`
    * Consistently puts the colon on the outside of bold text
    * Documents singe and multi-line styles in contribution guide
    
    ---------
    
    Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
    manovotny and delbaoliveira authored Jun 13, 2023
    Copy the full SHA
    cefdb27 View commit details
  2. docs: fix prettier lint (#51222)

    Fix prettier lint errors in #51080
    huozhi authored Jun 13, 2023
    Copy the full SHA
    d544c28 View commit details
  3. [docs] Add missing Edge Runtime APIs (#51224)

    Added missing APIs, also sorted all of them alphabetically to make it
    easier to read.
    
    ---------
    
    Co-authored-by: Delba de Oliveira <delbabrown@gmail.com>
    Kikobeats and delbaoliveira authored Jun 13, 2023
    Copy the full SHA
    4633b22 View commit details
  4. v13.4.6-canary.2

    vercel-release-bot committed Jun 13, 2023
    Copy the full SHA
    b80dc83 View commit details
  5. [Docs] fix example function param and signature (#51235)

    Apparently the object deconstruction in the example doesn't work. This PR proposes a working version:
    
    ```diff
    - export default function Page({ params: { slug: string } }) {
    -   return <div>My Post: {slug}</div>
    - }
    + export default function Page({ params }: { params: { slug: string } }) {
    +   return <div>My Post: {params.slug}</div>
    + }
    ```
    
    According to the [page reference](https://nextjs.org/docs/app/api-reference/file-conventions/page), the page function parameter slugs needs to be retrieved by calling `params.slug`.
    
    The TypeScript section below shows the correct function type signature, although not referencing to the parameter.
    chadluo authored Jun 13, 2023
    Copy the full SHA
    2a93345 View commit details
  6. [Docs] Remove extra line in summary dropdowns (#51226)

    They were causing markdown to render a <p> tag which has margins and broke the summary dropdowns
    delbaoliveira authored Jun 13, 2023
    Copy the full SHA
    a611641 View commit details
  7. Copy the full SHA
    b89da42 View commit details
  8. Fix all 404 links (#51209)

    I found some 404 links in jsdoc, so I used ripgrep to find and fix all the broken links to fix all the other links in this PR.
    smorimoto authored Jun 13, 2023
    Copy the full SHA
    0840793 View commit details
  9. [Docs] Recommend prettier-fix in PR template and contribution guide (

    …#51237)
    
    Recommend running `prettier-fix` before opening docs PRs to fix formatting issues. I've found that `lint-fix` is currently not fixing formatting issues. Related: https://vercel.slack.com/archives/C03S9JCH2Q5/p1686647582580629
    delbaoliveira authored Jun 13, 2023
    Copy the full SHA
    e048f4e View commit details
  10. ci(workflow): skip test trace upload when test skips (#51190)

    <!-- Thanks for opening a PR! Your contribution is much appreciated.
    To make sure your PR is handled as smoothly as possible we request that
    you follow the checklist sections below.
    Choose the right checklist for the change(s) that you're making:
    
    ## For Contributors
    
    ### Improving Documentation
    
    - Read the Docs Contribution Guide to ensure your contribution follows
    the docs guidelines:
    https://nextjs.org/docs/community/contribution-guide
    
    ### Adding or Updating Examples
    
    - The "examples guidelines" are followed from our contributing doc
    https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
    - Make sure the linting passes by running `pnpm build && pnpm lint`. See
    https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md
    
    ### Fixing a bug
    
    - Related issues linked using `fixes #number`
    - Tests added. See:
    https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
    - Errors have a helpful link attached, see
    https://github.com/vercel/next.js/blob/canary/contributing.md
    
    ### Adding a feature
    
    - Implements an existing feature request or RFC. Make sure the feature
    request has been accepted for implementation before opening a PR. (A
    discussion must be opened, see
    https://github.com/vercel/next.js/discussions/new?category=ideas)
    - Related issues/discussions are linked using `fixes #number`
    - e2e tests added
    (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
    - Documentation added
    - Telemetry added. In case of a feature if it's used or not.
    - Errors have a helpful link attached, see
    https://github.com/vercel/next.js/blob/canary/contributing.md
    
    
    
    ## For Maintainers
    
    - Minimal description (aim for explaining to someone not on the team to
    understand the PR)
    - When linking to a Slack thread, you might want to share details of the
    conclusion
    - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
    - Add review comments if necessary to explain to the reviewer the logic
    behind a change
    
    
    
    ### Why?
    
    ### How?
    
    Closes NEXT-
    Fixes #
    
    -->
    
    ### What?
    
    Attempt to fix workflow to skip trace upload if test skips.
    kwonoj authored Jun 13, 2023
    Copy the full SHA
    bfbfa87 View commit details
  11. Simplify the client manifest structure (#51183)

    Both of our bundlers won't split different exports of a module into different chunks, we can rely on facebook/react#26624 to simplify the structure. This reduces the size of the client reference manifest by ~70%.
    shuding authored Jun 13, 2023
    Copy the full SHA
    9ffea84 View commit details
  12. Add buildId into RSC payload (#50974)

    Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
    huozhi and timneutkens authored Jun 13, 2023
    Copy the full SHA
    6e5169b View commit details
  13. Turbopack: remove __internal_nextjs_integration_test compile-time f…

    …eature (#51204)
    
    This removes the `__internal_nextjs_integration_test` compile-time feature. This would end up requiring an additional set of build targets for running integration tests was only used for two cases:
    
    * Determining whether to read from an env var to load mocked Google fonts responses in next/font/google tests. This now uses the presence of this variable to determine whether to use mocked responses.
    * Enabling the `next-dev/serializable` feature. This is now set directly instead.
    
    Test Plan:
    * Integration tests with Turbopack.
    * Manual test of next/font/google with Turbopack
    wbinnssmith authored Jun 13, 2023
    Copy the full SHA
    8f4ae06 View commit details
  14. Copy the full SHA
    a3344ad View commit details
  15. Update codeowners (#51250)

    Tweak code owners after some testing and feedback. 
    
    - Move the Next.js team up to be optional global code owners (so that everyone can review but are not tagged for review). Global individuals should still be tagged if there are no specific `.vercel.approvers` files in subdirectories.
    - Adds @vercel/devex to image files so there's coverage on those files for the docs
    - Target specific folder and files for Styfle to get notified
    - Deletes some rules in the old GitHub codeowners
    delbaoliveira authored Jun 13, 2023
    Copy the full SHA
    3d41ccb View commit details
  16. Copy the full SHA
    8a0686e View commit details
  17. Fix broken link (#51253)

    Fix broken link in client-side rendering page
    delbaoliveira authored Jun 13, 2023
    Copy the full SHA
    6431b19 View commit details
  18. Adds homepage to eslint-config-next package (#51059)

    Fixes (partially) #50843.
    
    ---------
    
    Co-authored-by: Steven <steven@ceriously.com>
    Co-authored-by: JJ Kasper <jj@jjsweb.site>
    3 people authored Jun 13, 2023
    Copy the full SHA
    94accfa View commit details
Showing 490 changed files with 6,112 additions and 2,841 deletions.
1 change: 1 addition & 0 deletions .cargo/.vercel.approvers
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@vercel/web-tooling
1 change: 1 addition & 0 deletions .config/.vercel.approvers
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nextest.toml @vercel/web-tooling
2 changes: 1 addition & 1 deletion .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -5,5 +5,5 @@ filter = "package(next-dev-tests)"
leak-timeout = "500ms"
retries = 2
slow-timeout = "60s"
threads-required = 2
threads-required = 4
failure-output = "immediate-final"
16 changes: 4 additions & 12 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
# Learn how to add code owners here:
# https://help.github.com/en/articles/about-code-owners

# Part of code owners now use Vercel Spaces
# Codeowners now use Vercel Spaces
# Search .vercel.approvers for all files

/.git* @vercel/next-js
/.alex* @vercel/next-js @leerob
/.eslint* @vercel/next-js @leerob
/.prettier* @vercel/next-js @leerob

# Image Component (@styfle)

/**/*image* @timneutkens @ijjk @shuding @styfle @huozhi
/**/*image*/** @timneutkens @ijjk @shuding @styfle @huozhi
/packages/next/client/use-intersection.tsx @timneutkens @ijjk @shuding @styfle
/packages/next/server/lib/squoosh/ @timneutkens @ijjk @shuding @styfle
/packages/next/server/serve-static.ts @timneutkens @ijjk @shuding @styfle @huozhi
/packages/next/server/config.ts @timneutkens @ijjk @shuding @styfle @huozhi
/**/*image* @timneutkens @ijjk @shuding @styfle @huozhi @vercel/devex
/**/*image*/** @timneutkens @ijjk @shuding @styfle @huozhi @vercel/devex

2 changes: 1 addition & 1 deletion .github/actions/next-stats-action/src/index.js
Original file line number Diff line number Diff line change
@@ -73,7 +73,7 @@ if (!allowedActions.has(actionInfo.actionName) && !actionInfo.isRelease) {

if (actionInfo.isRelease) {
logger('Release detected, using last stable tag')
const lastStableTag = await getLastStable(mainRepoDir, actionInfo.prRef)
const lastStableTag = await getLastStable(diffRepoDir, actionInfo.prRef)
mainRef = lastStableTag
mainNextSwcVersion = lastStableTag
if (!lastStableTag) throw new Error('failed to get last stable tag')
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@ Choose the right checklist for the change(s) that you're making:
### Improving Documentation
- Run `pnpm prettier-fix` to fix formatting issues before opening the PR.
- Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide
### Adding or Updating Examples
@@ -29,7 +30,6 @@ Choose the right checklist for the change(s) that you're making:
- Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md
## For Maintainers
- Minimal description (aim for explaining to someone not on the team to understand the PR)
61 changes: 46 additions & 15 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
@@ -81,17 +81,17 @@ jobs:
target: 'x86_64-apple-darwin'
build: |
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" && if [ ! -f $(dirname $(which yarn))/pnpm ]; then ln -s $(which yarn) $(dirname $(which yarn))/pnpm;fi
turbo run build-native-release --summarize -- --target x86_64-apple-darwin --release
turbo run build-native-release --remote-cache-timeout 90 --summarize -- --target x86_64-apple-darwin --release
strip -x packages/next-swc/native/next-swc.*.node
- host: windows-latest
build: |
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" "pnpm@${PNPM_VERSION}"
turbo run build-native-release --summarize -- --target x86_64-pc-windows-msvc
turbo run build-native-release --remote-cache-timeout 90 --summarize -- --target x86_64-pc-windows-msvc
target: 'x86_64-pc-windows-msvc'
- host: windows-latest
build: |
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" "pnpm@${PNPM_VERSION}"
turbo run build-native-no-plugin --summarize -- --release --target i686-pc-windows-msvc
turbo run build-native-no-plugin --remote-cache-timeout 90 --summarize -- --release --target i686-pc-windows-msvc
target: 'i686-pc-windows-msvc'
- host: ubuntu-latest
target: 'x86_64-unknown-linux-gnu'
@@ -103,7 +103,7 @@ jobs:
rustup target add x86_64-unknown-linux-gnu &&
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" && if [ ! -f $(dirname $(which yarn))/pnpm ]; then ln -s $(which yarn) $(dirname $(which yarn))/pnpm;fi &&
unset CC_x86_64_unknown_linux_gnu && unset CC &&
turbo run build-native-release --summarize -- --target x86_64-unknown-linux-gnu &&
turbo run build-native-release --remote-cache-timeout 90 --summarize -- --target x86_64-unknown-linux-gnu &&
strip packages/next-swc/native/next-swc.*.node
- host: ubuntu-latest
target: 'x86_64-unknown-linux-musl'
@@ -115,7 +115,7 @@ jobs:
rustup default "${RUST_TOOLCHAIN}" &&
rustup target add x86_64-unknown-linux-musl &&
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" && if [ ! -f $(dirname $(which yarn))/pnpm ]; then ln -s $(which yarn) $(dirname $(which yarn))/pnpm;fi &&
turbo run build-native-release --summarize -- --target x86_64-unknown-linux-musl &&
turbo run build-native-release --remote-cache-timeout 90 --summarize -- --target x86_64-unknown-linux-musl &&
strip packages/next-swc/native/next-swc.*.node
- host: macos-latest
target: 'aarch64-apple-darwin'
@@ -126,7 +126,7 @@ jobs:
SYSROOT=$(xcrun --sdk macosx --show-sdk-path);
export CFLAGS="-isysroot $SYSROOT -isystem $SYSROOT";
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" && if [ ! -f $(dirname $(which yarn))/pnpm ]; then ln -s $(which yarn) $(dirname $(which yarn))/pnpm;fi
turbo run build-native-release --summarize -- --target aarch64-apple-darwin
turbo run build-native-release --remote-cache-timeout 90 --summarize -- --target aarch64-apple-darwin
strip -x packages/next-swc/native/next-swc.*.node
- host: ubuntu-latest
target: 'aarch64-unknown-linux-gnu'
@@ -139,7 +139,7 @@ jobs:
rustup target add aarch64-unknown-linux-gnu &&
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" && if [ ! -f $(dirname $(which yarn))/pnpm ]; then ln -s $(which yarn) $(dirname $(which yarn))/pnpm;fi &&
export CC_aarch64_unknown_linux_gnu=/usr/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-gcc &&
turbo run build-native-release --summarize -- --target aarch64-unknown-linux-gnu &&
turbo run build-native-release --remote-cache-timeout 90 --summarize -- --target aarch64-unknown-linux-gnu &&
llvm-strip -x packages/next-swc/native/next-swc.*.node
- host: ubuntu-latest
target: 'aarch64-unknown-linux-musl'
@@ -152,21 +152,20 @@ jobs:
rustup toolchain install "${RUST_TOOLCHAIN}" &&
rustup default "${RUST_TOOLCHAIN}" &&
rustup target add aarch64-unknown-linux-musl &&
turbo run build-native-release --summarize -- --target aarch64-unknown-linux-musl &&
turbo run build-native-release --remote-cache-timeout 90 --summarize -- --target aarch64-unknown-linux-musl &&
llvm-strip -x packages/next-swc/native/next-swc.*.node
- host: windows-latest
target: 'aarch64-pc-windows-msvc'
build: |
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" "pnpm@${PNPM_VERSION}"
turbo run build-native-no-plugin-woa-release --summarize -- --target aarch64-pc-windows-msvc
turbo run build-native-no-plugin-woa-release --remote-cache-timeout 90 --summarize -- --target aarch64-pc-windows-msvc
needs: build
name: stable - ${{ matrix.settings.target }} - node@16
runs-on: ${{ matrix.settings.host }}
env:
TURBO_TEAM: 'vercel'
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_REMOTE_ONLY: 'true'
DATADOG_API_KEY: ${{ secrets.DATA_DOG_API_KEY }}
steps:
# https://github.com/actions/virtual-environments/issues/1187
- name: tune linux network
@@ -253,12 +252,13 @@ jobs:
run: if [[ ! -z $(ls .turbo/runs) ]]; then echo "DID_BUILD=yup" >> $GITHUB_OUTPUT; fi

# Trying to upload metrics for the Turbopack to datadog's CI pipeline execution
- name: 'Upload turbopack build metrics'
- name: 'Collect turbopack build metrics'
id: check-turbopack-bytesize
shell: bash
if: ${{ steps.check-did-build.outputs.DID_BUILD == 'yup' }}
continue-on-error: true
run: |
npm install -g @datadog/datadog-ci
mkdir -p ./turbopack-bin-size
shopt -s nullglob
for filename in packages/next-swc/native/next-swc.*.node; do
# Strip out filename to extract target triple
@@ -267,9 +267,16 @@ jobs:
export FILENAME=${FILENAME%.node}
export BYTESIZE=$(wc -c < $filename | xargs)
echo "Reporting $FILENAME:$BYTESIZE for Turbopack bytesize"
datadog-ci metric --no-fail --level pipeline --metrics "turbopack.bytesize.$FILENAME:$BYTESIZE"
echo "turbopack.bytesize.$FILENAME:$BYTESIZE" > ./turbopack-bin-size/${{ matrix.settings.target }}
done
- name: Upload turbopack bytesize artifact
if: ${{ steps.check-did-build.outputs.DID_BUILD == 'yup' }}
uses: actions/upload-artifact@v3
with:
name: turbopack-bytesize
path: turbopack-bin-size/*

- name: Upload swc artifact
if: ${{ needs.build.outputs.isRelease == 'true' }}
uses: actions/upload-artifact@v3
@@ -316,7 +323,7 @@ jobs:
run: node scripts/normalize-version-bump.js

- name: Build
run: turbo run build-wasm --summarize -- --target ${{ matrix.target }} --features tracing/release_max_level_info
run: turbo run build-wasm --remote-cache-timeout 90 --summarize -- --target ${{ matrix.target }} --features tracing/release_max_level_info

- name: Add target to folder name
run: '[[ -d "packages/next-swc/crates/wasm/pkg" ]] && mv packages/next-swc/crates/wasm/pkg packages/next-swc/crates/wasm/pkg-${{ matrix.target }} || ls packages/next-swc/crates/wasm'
@@ -429,7 +436,7 @@ jobs:
- run: RESET_VC_PROJECT=true node scripts/reset-vercel-project.mjs
name: Reset test project

- run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-jammy /bin/bash -c "cd /work && NODE_VERSION=${{ env.NODE_LTS_VERSION }} ./scripts/setup-node.sh && npm i -g pnpm@${PNPM_VERSION} > /dev/null && VERCEL_TEST_TOKEN=${{ secrets.VERCEL_TEST_TOKEN }} VERCEL_TEST_TEAM=vtest314-next-e2e-tests NEXT_TEST_JOB=1 NEXT_TEST_MODE=deploy TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js --type e2e >> /proc/1/fd/1"
- run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-jammy /bin/bash -c "cd /work && NODE_VERSION=${{ env.NODE_LTS_VERSION }} ./scripts/setup-node.sh && npm i -g pnpm@${PNPM_VERSION} > /dev/null && VERCEL_TEST_TOKEN=${{ secrets.VERCEL_TEST_TOKEN }} VERCEL_TEST_TEAM=vtest314-next-e2e-tests NEXT_TEST_JOB=1 NEXT_TEST_MODE=deploy TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} NEXT_TEST_CONTINUE_ON_ERROR=1 xvfb-run node run-tests.js --type e2e >> /proc/1/fd/1"
name: Run test/e2e (deploy)

- name: Upload test trace
@@ -465,7 +472,31 @@ jobs:
name: next-swc-binaries
path: packages/next-swc/native

- run: cp -r packages/next-swc/native .github/actions/next-stats-action/native

- run: ./scripts/release-stats.sh
- uses: ./.github/actions/next-stats-action
env:
PR_STATS_COMMENT_TOKEN: ${{ secrets.PR_STATS_COMMENT_TOKEN }}

upload_turbopack_bytesize:
name: Upload Turbopack Bytesize trace to Datadog
runs-on: ubuntu-latest
needs: [build-native]
env:
DATADOG_API_KEY: ${{ secrets.DATA_DOG_API_KEY }}
steps:
- name: Collect bytesize traces
uses: actions/download-artifact@v3
with:
name: turbopack-bytesize
path: turbopack-bin-size
- name: Upload to Datadog
run: |
ls -al turbopack-bin-size
npm install -g @datadog/datadog-ci
for filename in turbopack-bin-size/*; do
export BYTESIZE+=" --metrics $(cat $filename)"
done
echo "Reporting $BYTESIZE"
datadog-ci metric --no-fail --level pipeline $BYTESIZE
Loading