Commit graph

21439 commits

Author SHA1 Message Date
vercel-release-bot
8f5f0ef141 v15.0.0-canary.56 2024-07-05 23:22:48 +00:00
Hendrik Liebau
09f115d187
Configure source map overrides for turbopack (#67497)
Follow-up from #66254 to add debugging support for turbopack.
2024-07-05 18:55:02 +02:00
Delba de Oliveira
7e37892806
Docs: Update unstable_rethrow example (#67494)
re: https://x.com/jamannnnnn/status/1809133455592067373
2024-07-05 08:55:24 -07:00
Jiachi Liu
1268f99e9e
Dedupe double logged server errors (#67464)
### What

Only call error log in SSR renderer, instead of calling it in all RSC
and SSR renderers.

Fixes #67352 
Close NEXT-3579

### Why

The RSC rendered generated result will be rendered by SSR renderer
again, at there we can get the actual error. So when there's a RSC error
happening, only logging once in SSR rendering layer is enough.
2024-07-05 16:22:54 +02:00
Hendrik Liebau
bda92a1be5
Fix VS Code debugging (#66254)
~Due to the entry preloading that was enabled by default in #65289, VS
Code is no longer able to map symbols correctly for production builds.
As a temporary solution, we can disable the preloading when a debugger
is started until a proper fix is found.~

By optionally building the Next.js source code with
`NEXT_SERVER_EVAL_SOURCE_MAPS=1` we can ensure, even with the bundled
next server in the node runtime, that the original names are shown in
the debug "Variables" section.

In addition, the `sourceMapPathOverrides` are improved to cover the
different variations of source mapping URLs. We can now also set
breakpoints in the `example/...` and `test/e2e/...` server components.

~Supersedes #66229~

#### Before

<img width="1276" alt="Screenshot 2024-05-27 at 21 36 52"
src="https://github.com/vercel/next.js/assets/761683/f2840c35-f683-445d-bc95-cac9f719d8e7">

#### After

<img width="1276" alt="Screenshot 2024-05-27 at 21 38 42"
src="https://github.com/vercel/next.js/assets/761683/c801c123-3163-46c3-b442-5b72c0a5d51d">
2024-07-05 16:04:35 +02:00
Hendrik Liebau
a1098cec4d
Remove obsolete isNodeDebugging option from next server (#67492)
Now that `isNodeDebugging` is not needed anymore in #66254, we can
re-create #66229.

The last usage of the `isNodeDebugging` option was removed in #55383.
2024-07-05 15:27:53 +02:00
Sung Ye In
0dbe761e52
fix(next): add cross origin in react dom preload (#67423)
Co-authored-by: Jiwon Choi <devjiwonchoi@gmail.com>
2024-07-05 15:13:00 +02:00
Jiwon Choi
a5ef0d8da5
Upgrade TypeScript to 5.5.3 (#67454) 2024-07-05 21:19:41 +09:00
Sebastian Silbermann
f49506703e
Improve docs for preview builds (#67422)
Builds can now be addressed by PR number.
2024-07-05 13:12:41 +02:00
Hendrik Liebau
199b869d5b
refactor: avoid unnecessary after wrapper (#67463)
I think the wrap function is a leftover from before #66767. We don't
need to return a tuple here, and can just use the `AfterContext`
directly on the call site. This makes its optionality a bit more
obvious, and avoids the noop callback.
2024-07-05 12:56:53 +02:00
Tobias Koppers
3f11815b02
avoid merging global css in a way that leaks into other chunk groups (#67373)
### What?

This disallows merging of global css with styles that appear on other
pages/chunk groups.

### Why?

Before we made the assumption that all CSS is written in a way that it
only affects the elements it should really affect.

In general writing CSS in that way is recommended. In App Router styles
are only added and never removed. This means when a user uses
client-side navigations to navigate the application, styles from all
previous pages are still active on the current page. To avoid visual
artefacts one need to write CSS in a way that it only affects certain
elements. Usually this can be archived by using class names. CSS Modules
even enforce this recommendation.

Assuming that all styles are written this way allows to optimize CSS
loading as request count can be reduced when (small) styles are merged
together.

But turns out that some applications are written differently. They use
global styles that are not scoped to a class name (e. g. to `body`
directly instead) and use them in different sections of the application.
They are structured in a way that doesn't allow client-side navigations
between these sections. This should be valid too, which makes our
assumption not always holding true.

This PR changes the algorithm so we only make that assumption for CSS
Modules, but not for global CSS. While this affects the ability to
optimize, applications usually do not use too much global CSS files, so
that can be accepted.

fixes #64773
2024-07-05 03:33:02 -07:00
Vercel Release Bot
609277b271
Update font data (#67472)
This auto-generated PR updates font data with latest available
2024-07-05 09:22:24 +00:00
Sebastian Silbermann
5bdffad843
Bump minimum Node.js version to 18.18 (up from 18.17) (#67274) 2024-07-05 09:21:57 +00:00
vercel-release-bot
83a085acc7 v15.0.0-canary.55 2024-07-04 23:23:21 +00:00
Steven
28fc89448f
fix(next/image): handle invalid url (#67465) 2024-07-04 21:55:32 +02:00
Julian
38b3423160
Fix Dead Links in @neshca/cache-handler-redis example README.md (#67415)
<!-- 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

- 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

- 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

### What?
Updating links to the @neshca/cache-handler documentation that are dead.
### Why?
To improve developer experience (DX) by ensuring README.md links are
functional.
### How?
Edit the Markdown links in the README.md file of the example to point to
the correct URLs.


-->
Hello,

This PR updates dead links in the @neshca/cache-handler-redis example's
README.md to ensure they point to the correct URLs.

Thank you for your review!

Co-authored-by: Jiwon Choi <devjiwonchoi@gmail.com>
2024-07-04 15:35:15 +00:00
Will Binns-Smith
a6631d994f
Turbopack + Relay: correctly implement artifact_directory to fix multi-project test (#67403)
Previously, if `artifact_directory` were set, artifacts would be
resolved at a fixed location relative to each file. This correctly
resolves them from the project root.

Test Plan: `TURBOPACK_BUILD=1 TURBOPACK=1 pnpm test-dev
test/integration/relay-graphql-swc-multi-project/test/index.test.js`

---------

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
2024-07-04 14:52:45 +00:00
Ivan Torres
f0abeb8e42
[docs] Update options in create-next-app (#67455)
Documentation update, according to the last update of the `commander`
library. #66771

Co-authored-by: Jiwon Choi <devjiwonchoi@gmail.com>
2024-07-04 12:41:44 +00:00
Jiachi Liu
b369ccfcf4
Transpile geist by default (#67402)
### What

Transpile `geist` package by default. Currently users need to add
`geist` into `transpilePackages` to make it work with pages router as
it's external packages but require transform. This PR will resolve that
issue. cc @JohnPhamous

### Why

geist package is using `next/font` which requires to work with SWC
transform. But so far only ESM syntax can be captured by SWC since CJS
is pretty difficult to cover as the package import is not statically
analyzable.

We introduced a new list that it could be transpiled and include geist
package into bundle. Add it in both `next/jest` side and
webpack/turbopack bundling side

---------

Co-authored-by: 강동윤 (Donny) <kdy1997.dev@gmail.com>
2024-07-04 14:04:57 +02:00
Manu López
49f9c46fb1
Fix typo in MDX documentation (#67432)
I was reading the documentation related to MDX and noticed a typo in
some articles, so I fixed them.

Although I read the [Contribution
Guidelines](https://github.com/vercel/next.js/blob/canary/contributing.md)
this is my first contribution so feel free to comment if I can do
better.

Co-authored-by: Jiwon Choi <devjiwonchoi@gmail.com>
2024-07-04 10:50:26 +00:00
Teddi_r
4bf3bb9dcd
docs: fix typo } (#67441)
### What?
Fix a typo in docs.

### Why?
The `cloudfrontLoader` function is missing a closing curly brace `}`.

### How?
Add a closing curly brace `}` at the end of the `cloudfrontLoader`
function.

<!-- 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

- 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

- 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

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->

Co-authored-by: Jiwon Choi <devjiwonchoi@gmail.com>
2024-07-04 09:49:58 +00:00
Jiwon Choi
ce9670ff2e
Upgrade TypeScript to v5.5.2 (#67113) 2024-07-04 10:03:46 +02:00
vercel-release-bot
5c92390337 v15.0.0-canary.54 2024-07-03 23:23:51 +00:00
Zack Tanner
1337c7a3e5
fix dynamic param extraction for interception routes (#67400)
### What
When using `generateStaticParams` with interception routes, the
interception would never occur, and instead an MPA navigation would take
place to the targeted link.

### Why
For interception rewrites, we use a `__NEXT_EMPTY_PARAM__` marker (in
place of the actual param slot, eg `:locale`) for any params that are
discovered prior to the interception marker. This is because during
route resolution, the `params` for the interception route might not
contain the same `params` for the page that triggered the interception.
The dynamic params are then extracted from `FlightRouterState` at render
time. However, when `generateStaticParams` is present, the
`FlightRouterState` header is stripped from the request, so it isn't
able to extract the dynamic params and so the router thinks the new tree
is a new root layout, hence the MPA navigation.

### How
This removes the `__NEXT_EMPTY_PARAM__` hack and several spots where we
were forcing interception routes to be dynamic as a workaround to the
above bug. Now when resolving the route, if the request was to an
interception route, we extract the dynamic params from the request
before constructing the final rewritten URL. This will ensure that the
params from the "current" route are available in addition to the params
from the interception route without needing to defer until render.

Fixes #65192
Fixes #52880
2024-07-03 11:21:07 -07:00
Alan Daniel
13e501fc23
[create-next-app]: add font antialiasing to templates (#67425)
This PR adds font antialiasing to all the next.js templates (with css or
tw).

### Before

![Screenshot 2024-07-03 at 10 27
02](https://github.com/vercel/next.js/assets/45767683/65778211-23bd-4d20-b1d1-a2f443f73d4d)

### After 

![Screenshot 2024-07-03 at 10 26
38](https://github.com/vercel/next.js/assets/45767683/922188fd-4406-4d08-9b73-74c699d51913)

Co-authored-by: Jiwon Choi <devjiwonchoi@gmail.com>
2024-07-03 17:36:13 +00:00
Sebastian Silbermann
978af08cc4
Automatically trigger sync with Front on release (#66453) 2024-07-03 19:09:51 +02:00
vercel-release-bot
b2625477c0 v15.0.0-canary.53 2024-07-03 05:25:20 +00:00
Benjamin Woodruff
d19862ad0f
[chore] Update turbopack to turbopack-240703.1 (#67406)
Tobias Koppers - fix typo (vercel/turbo#8619)
Benjamin Woodruff - Store aggregate read/execute count statistics
(vercel/turbo#8286)
Tobias Koppers - box InProgress task state (vercel/turbo#8644)
Tobias Koppers - Task Edges Set/List (vercel/turbo#8624)
Benjamin Woodruff - Memory: Use `triomphe::Arc` for `SharedReference`
(vercel/turbo#8622)
Will Binns-Smith - chore: release npm packages (vercel/turbo#8614)
Will Binns-Smith - devlow-bench: add git branch and sha to datapoints
(vercel/turbo#8602)

---

Fixes a `triomphe` package version conflict between turbopack and swc by
bumping it from 0.1.11 to 0.1.13.
2024-07-02 21:45:54 -07:00
Donny/강동윤
82639520d3
feat: Pass module: "unknown" to SWC minfiier (#66817)
### What?

Pass `module: "unknown"` to the minifier.

### Why?

It can minify both a module and a script. `module: "unknown"` lets the
parser to detect the type of the program.

The problematic library is `react-pdf` and next.js currently errors with

```
Failed to compile.

static/media/pdf.worker.1f09ce21.mjs from Terser
  x 'import', and 'export' cannot be used outside of module code
       ,-[56104:1]
 56104 | const pdfjsBuild = "0cec64437";
 56105 | 
 56106 | var __webpack_exports__WorkerMessageHandler = __webpack_exports__.WorkerMessageHandler;
 56107 | export { __webpack_exports__WorkerMessageHandler as WorkerMessageHandler };
       : ^^^^^^
 56108 | 
 56109 | //# sourceMappingURL=pdf.worker.mjs.map
       `----

Caused by:
    0: failed to parse input file
    1: Syntax Error
Error: 
  x 'import', and 'export' cannot be used outside of module code
       ,-[56104:1]
```

### How?

Related:
https://github.com/vercel/next.js/discussions/30237#discussioncomment-9735075
2024-07-03 09:57:30 +09:00
Donny/강동윤
e7a06bedae
Update @swc/core npm package to v1.6.6 (#67379)
### What?

Update `@swc/core` to the latest.

### Why?

To keep in sync.
2024-07-03 09:54:28 +09:00
vercel-release-bot
747a60c311 v15.0.0-canary.52 2024-07-02 23:22:46 +00:00
Neila
669712cbf9
docs: fix typo eanble (#67369)
### What?
Fix a typo in docs.

### Why?
The word *enable* was mistakenly written as *eanble*.

### How?

Co-authored-by: Jiwon Choi <devjiwonchoi@gmail.com>
2024-07-02 15:30:53 +00:00
Sebastian Silbermann
f1488d5d68
Persist package tarballs as GitHub Actions artifacts (#66445) 2024-07-02 15:18:45 +00:00
hrmny
a22858d6e7
test: add test for parallel routes hmr (#67392)
### What?

A test for #67222
2024-07-02 15:07:16 +00:00
vercel-release-bot
18c2fa85ab v15.0.0-canary.51 2024-07-02 13:16:34 +00:00
hrmny
4df48390db
fix(turbopack): build all parallel routes to make sure HMR works (#67222)
### What?

Parallel routes build in a weird and render in a weird way.

To render next.js always uses the last parallel route (alphabetically I
think) as that's most likely to be the root.
Building works in the opposite order, it goes from the first to the
last.

This is fine for the first render, but after that the renderer will only
check if the file for the last parallel route has a bundle on disk and
never request it to be updated.

1. match on routes
2. build match
3. check if the last parallel route bundle exists on disk
	- if it doesn't so go back to step 2 with the next match
	- the actual match gets thrown away
4. render with the bundle for the last parallel route

The condition in step 3 will always be true after an update, because it
was built for a previous request

To fix this, turbopack will now emit all parallel routes that match a
path every time one of them gets requested.

Closes PACK-3078
Fixes #65836
2024-07-02 15:12:33 +02:00
Sebastian Silbermann
d8d8b53cd1
Allow busting reserved Github action caches (#66638) 2024-07-02 14:51:40 +02:00
vercel-release-bot
6795597a50 v15.0.0-canary.50 2024-07-01 23:22:58 +00:00
Zack Tanner
2fbdac6f82
fix prefetch bailout detection for nested loading segments (#67358)
### What
When PPR is off, app router prefetches will render the component tree up
until it encounters a `loading` segment, at which point it'll just
return some metadata about the segment and won't do any further
rendering. This is an optimization to ensure prefetches are lightweight
and don't potentially invoke expensive dynamic subtrees. However,
there's a bug in this logic that is causing it to bail unexpectedly if a
segment deeper in the tree contained a `loading.js` file.

This would mean the loading state wouldn't be triggered until the second
request for the full RSC data is initiated, resulting in an unintended
delta between when a link is clicked and the loading state is shown.

### Why
The `shouldSkipComponentTree` flag was incorrectly being set to `true`
even if the `loading.js` segment appeared deeper in the tree. Prefetch
requests from the client will always contain `FlightRouterState`, so the
logic to check for loading deeper in the tree will always be missed.


### How
This removes the `flightRouterState` check as it doesn't make sense:
prefetches will currently _always_ include the `flightRouterState`,
causing this to always short-circuit. I believe that this check is
vestigial from when we were generating static `prefetch.rsc` outputs
which is no longer the case.

This mirrors a [similar
check](b87d8fc499/packages/next/src/server/app-render/create-component-tree.tsx (L393))
when determining if parallel route(s) should be rendered.
2024-07-01 16:11:09 -07:00
Hendrik Liebau
7523f327e0
Ensure required-server-files test can exit cleanly (#66765)
When running `pnpm test-start
test/production/standalone-mode/required-server-files/required-server-files.test.ts`
locally, Jest hangs and prevents the process from exiting. In the CI,
the issue is masked because `run-tests.js` uses `--forceExit`.

The reason for the hanging process is that there are two server
instances started, and only the last one is killed. By starting and
killing the server for each test we can not only fix this, but also
prevent the `should run middleware correctly (without minimalMode, with
wasm)` test from affecting the other tests when flipping the
`minimalMode` flag in `server.js`.

I also reverted the darwin-specific overwrites of `appPort` that were
added in #65722 and #66724. I don't think those are needed because after
#65722 was created we did land #66285 which sets the hostname to be
compatible with ipv4 and ipv6. If there's still a need to keep this then
let me know, and I will restore it.
2024-07-02 00:05:28 +02:00
Hendrik Liebau
ba97c7595f
Update labeler.json (#67359)
### What?

Reflect team changes in labeler list.
2024-07-02 00:00:49 +02:00
Zack Tanner
aa832c3b2d
use fetch priority for app prefetches (#67356)
This leverages [fetch
priority](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#priority)
to ensure automatic prefetching as a result of visiting a page is sent
with "low" priority, to signal to the browser it can prioritize more
important work necessary for rendering the page.

A "temporary" prefetch (ie one that is created when there wasn't an
existing prefetch cache entry on navigation) will use a "high" priority
because it's critical to the navigation event.

All other cases will be "auto" which is the current default.
2024-07-01 14:47:56 -07:00
Steven
73b552a9a5
fix(next/image): undo tight coupling between priority=true and fetchPriority=high (#67351)
## History

When we added `priority` prop to `next/image`, there was no
`fetchPriority` so we instead used this to preload the image in the
head.

Then when browsers added support `fetchPriority`, we automatically added
`fetchPriority=high` when `priority={true}` to signal to the browser
that this was a high priority image. This priority is added to the img
and the preload.

However, we saw cases where images are blocking critical css. Per
@gnoff:

> React currently prioritizes font preloads then high priority images,
then css in the initial page load

Due to these changes in React (aka Float), we should no longer set
`fetchPriority=high`, although the user can still manually add that prop
if needed.
2024-07-01 14:42:42 -04:00
Jiwon Choi
ef83433c3e
perf: improve retrieving versionInfo on Turbo HMR (#67309)
### Why?

Identified the bottleneck of Turbopack HMR, one of the reason is that we
run `execSync` to get user's package manager and fetch their registry to
get the latest & canary version of Next.js.
This process was located at the initial of HMR, which could have been
delayed to the initial of the error handling.

### How?

- Remove getting user's package manager and just fetch from NPM
regardless the user uses Yarn.
- Used an async IIFE to await the promise of `getVerionInfo` value
inside the synchronous `ws.handleUpgrade`.

### Benchmark

> Benchmarked with console inside try-finally

#### Webpack -- no cache

| Version                              | Ready |
|-------------------------------------|---------|
| Canary | 1185ms |
| Delta | 896ms |
| Delta Webpack vs Canary Webpack | -24.39% |

#### Turbopack

| Version                              | Ready |
|-------------------------------------|---------|
| Canary | 1002ms |
| Delta (Turbopack) | 509ms |
| Delta Turbopack vs Canary Turbopack | -49.20% |

---------

Co-authored-by: Jiachi Liu <inbox@huozhi.im>
Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
2024-07-02 02:16:22 +09:00
Jiachi Liu
0e6e83c33d
Add warn and telemetry for customized esmExternals (#67339)
### What

* Warn with next.js when users customized `experimental.esmExternals`
value
* Add telemetry tracking on the customization usage for that flag. 0 for
no customization, 1 for used non-default customized value


### Why

`esmExternals` ideally can just remain as default value `true` which
Next.js can handle the customization properly. Since next.js app router
also supports it on canary now we're adding a warning to users that
don't modify `esmExternals` option as it could affect module resolution
on ESM packages.
2024-07-01 18:28:11 +02:00
Lee Robinson
0115636230
docs: Improve error handling docs (#67332)
Based on this discussion:
https://github.com/vercel/next.js/discussions/62681
2024-07-01 11:10:31 -05:00
Jiwon Choi
f702a14acf
chore: throw when three dot character is detected in segment (#67348)
### Why?

It could be confusing between `...` and `…`, which the later is actually
a single character.

### How?

We throw if we detect `…` instead of `...`.
2024-07-02 00:53:45 +09:00
Steven
78dc2db916
fix(next/image): improve query string validation for integers (#67293)
The Image Optimization API currently uses `parseInt()` for `w` and `q`
query string parameters.

This doesn't handle floats as you might expect and instead coerces, for
example `parseInt('99.9') === 99`.

This PR changes the runtime to match the build time validation and only
accept integers for `w` and `q`.
2024-07-01 08:10:35 -07:00
JJ Kasper
2fceb5b1aa
Fix test-new-tests args parsing (#67308)
Noticed we weren't detecting test mode correctly due to incorrect args
parsing so this fixes that

x-ref:
https://github.com/vercel/next.js/actions/runs/9725297814/job/26842454638?pr=67306#step:28:69
2024-07-01 07:27:16 -07:00
Jiwon Choi
cf71687d69
chore: add swc-build-native script at root package.json (#67345)
When developing in Next.js repo, the maintainers / contributors
sometimes need to build swc native files.

Added a script `swc-build-native` to run the command `pnpm
--filter=@next/swc build-native` which was verbose to run.
2024-07-01 23:10:07 +09:00