Commit graph

21127 commits

Author SHA1 Message Date
Zack Tanner
855ea3af24
fix 'loading' segment not being copied into new CacheNode (#66538)
When `router.refresh` or a server action creates a new `CacheNode` tree,
we were erroneously not copying over the `loading` segment in the new
tree. This would cause the subtree to be remounted as the loading
segment switched from having a Suspense boundary to not having one.

Fixes #66029
Fixes #66499
2024-06-04 10:15:42 -07:00
Will Binns-Smith
58019b8684
Sync Cargo.lock with turbo (#66539) 2024-06-04 17:12:45 +00:00
Wyatt Johnson
8cb8edb686
refactor: deprecate future directory (#66432)
This removes the previous `server/future` directory and moves everything
into the `server` or `server/lib` directories. This is aimed to start to
flatten the server application structure.
2024-06-04 15:23:23 +00:00
Tobias Koppers
aacedcb417
add more tracing (#66528)
### What?

* add tracing for transforms
* add high level tracing
* add tracing for next/dynamic collection
2024-06-04 15:13:35 +00:00
Tobias Koppers
82df2a8d82
improve order of spans in tracing (#66516)
### What?

awaits generating the output before calling into emitting

### Why?

this improve the order of spans in the tracing
2024-06-04 15:12:11 +00:00
Donny/강동윤
348b7364a6
feat: Update swc_core to v0.92.10 (#66521)
### What?

Update `swc_core`

### Why?

To apply https://github.com/swc-project/swc/pull/9019

It's required to use `swc_ecma_parser/tracing-spans`.

### How?
2024-06-04 16:52:58 +02:00
Tobias Koppers
a8221a0582
fixing next/dynamic transform for turbopack (#66527)
### What?

pass the correct prefer_esm value to the transform
2024-06-04 14:06:51 +00:00
vercel-release-bot
3ef03ff320 v15.0.0-canary.10 2024-06-04 12:05:01 +00:00
Tobias Koppers
e00f58e3ef
optimize server actions (#66523)
### What?

optimize allocations in server actions transform

In one edge case it reduces allocations from 30GB to 4.5MB and time from
760ms to 11ms.

### Why?

make it faster
2024-06-04 14:00:09 +02:00
Sebastian Silbermann
52689b5960
Fix fetch deduping in dev after reload (#66507) 2024-06-04 13:19:37 +02:00
Tobias Koppers
77e6b033c5
fix css order for some edge cases in App Dir (#66500)
### What?

* order of CSS between layout and page
* order of CSS between page and next/dynamic

### Why?

### How?

* overrides webpack CSS chunk loading to use react CSS loading to allow
them to share the order
2024-06-04 10:18:52 +02:00
Zack Tanner
ceef719459
fix missing stylesheets when parallel routes are present (#66300)
This takes the `layerAssets` property from the previous PR and actually
renders it, replacing the previous style handling. This ensures that
when multiple page segments are rendered on screen, all of their
associated CSS files are loaded. The existing `findHeadInCache` method
only ever returns a single head node, which means it’d miss stylesheets.


Fixes #59308
Fixes #63465
2024-06-03 16:35:31 -07:00
vercel-release-bot
786a703584 v15.0.0-canary.9 2024-06-03 23:23:25 +00:00
Yuko Murayama
1209660353
docs: update sitemap's version history section (#66478)
<!-- 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

Closes NEXT-
Fixes #

-->

### What?
This is an update on the documentation at the sitemap version history to
add the update (https://github.com/vercel/next.js/pull/53765) in
[v14.2.0](https://github.com/vercel/next.js/releases/tag/v14.2.0).
### Why?
I really appreciate that the next sitemap generator supports
localization. It would be great if we could see which version or higher
provides this support.

### How?
I added a new row at the top of the version history table.

---------

Co-authored-by: Sam Ko <sam@vercel.com>
2024-06-03 23:09:19 +00:00
vercel-release-bot
f76563393a v15.0.0-canary.8 2024-06-03 20:42:41 +00:00
Zack Tanner
312eb61d24
add layerAssets property to FlightDataPath (#66354)
This adds a new `layerAssets` property (containing styles and script
tags) to `FlightDataPath`. Previously these were lumped in with the
`head` node, but we intentionally only ever render a single `head`, to
avoid duplicating metadata. This would mean `<AppRouter />` would only
ever render imported stylesheets for a single page in a racey way.
However, since Float handles hoisting and deduping these style tags,
we're safe to render them for each segment.

This PR introduces no change in behavior, aside from sending
`layerAssets` down from the server and storing it in the client router
cache. These nodes aren't rendered -- this is done in #66300.
2024-06-03 13:19:52 -07:00
Wyatt Johnson
be7d0c970e
fix: only generate prefetch rsc for ppr enabled routes (#66395)
This adds details for every ISR cache request if the page being
requested supports PPR. If it does, it'll attempt to load the
`.prefetch.rsc` payload instead of the `.rsc` payload. This corrects a
bug that was present in deployed environments.

This additionally refactors the `isAppPPREnabled` out of most of the
application, as it's only used to determine if we should add to the
`prefetchDataRoute` fields in the `prerender-manifest.json`. To support
loading the prefetch file or not, we pass the `isRoutePPREnabled`
through with the cache get/set operations instead.

x-slack-ref:
https://vercel.slack.com/archives/C075MSFK9ML/p1717094328986429
2024-06-03 12:55:05 -07:00
Muhammad Yasir Ghaffar
c5b39e31fd
Correct spelling in installation guide reference (#66484)
One-word 'checkout' is a noun or adjective that refers to the act of
taking items out of a store after paying for them. 2. Two-words 'check
out' is a verb that refers to request someone to look at something.
Corrected the spelling of "checkout" to "check out" in the documentation
to improve readability and accuracy. This change ensures proper usage of
the phrase when referring to the installation guide.

<!-- 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: Sam Ko <sam@vercel.com>
2024-06-03 18:45:40 +00:00
Loris Sigrist
732a64dda9
chore(docs): Update Inlang Link on Internationalization Page (#66488)
Hi 👋 Inlang dev here

This PR switches the Link to Inlang's i18n solution in the
Internationalization docs to point directly to
[Paraglide-Next](https://inlang.com/m/osslbuzt/paraglide-next-i18n)
since that's the most relevant page for NextJS developers looking for an
i18n library.

<!-- 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: Sam Ko <sam@vercel.com>
2024-06-03 18:43:31 +00:00
Hendrik Liebau
4f2e65ba96
Fix next/navigation type augmentation (#66489) 2024-06-03 17:53:37 +00:00
Hendrik Liebau
d6e28bca0e
Unignore test/**/*.test.* for ESLint (#66415) 2024-06-03 18:15:29 +02:00
Tobias Koppers
7ea0337ad1
avoid filtering the error message (#65311)
### What?

If the error message contains a reference to `node_modules` it would
omit the error message, but actually we only want to omit the stack
frames

### Why?

### How?
2024-06-03 15:14:35 +00:00
Alexander Lyon
4849ae76c4
expose experimental option to set a memory limit for turbo (#66101)
### What?

We have a GC with rough edges, but it is worth exposing a flag to be able to try it out.

### Why?

I think it would be useful to set up a benchmark that tests the GC perf on new canary builds to make sure we are going in the right direction.

### How?

Add a new flag in the experimental settings and wire it up to the existing native bindings.

Closes PACK-3093
2024-06-03 15:03:58 +01:00
Jiachi Liu
18a7a4d204
Polish copy button state and styles (#66370)
### What
Address the feedbacks in #65921 

* Improve the a11y, using native button
* add more state, such as pending.

### Videos

#### Successful state


https://github.com/vercel/next.js/assets/4800338/2943d6dc-148d-4122-92dd-ba8578abdcf4

#### Error state


https://github.com/vercel/next.js/assets/4800338/3fa36c41-845b-4152-8b82-f15b2ebd72b2

---------

Co-authored-by: Sebastian Silbermann <sebastian.silbermann@vercel.com>
2024-06-03 15:11:32 +02:00
Hendrik Liebau
41c1af30d5
Fix flaky redbox expectation in unstable_after e2e test (#66490) 2024-06-03 13:11:11 +00:00
Hendrik Liebau
994d8ee2c3
Fix broken BrowserInterface type (#66461) 2024-06-03 12:56:49 +00:00
Tim Afanasiev
48e9cd9b60
Renamed two files: right order of supported styling (#66443)
### What?
I've renamed two files:
`04-sass.mdx` -> `03-sass.mdx`
`03-css-in-js.mdx` -> `04-css-in-js.mdx`

### Why?
In the documentation of App Router/Building Your Application/Styling,
the last two items on the list (Sass, CSS-in-JS) are ordered differently
compared to the links provided below.


[Documentation](https://nextjs.org/docs/app/building-your-application/styling)

Here is the screenshot:

![image](https://github.com/vercel/next.js/assets/84281349/e072f489-bbdf-46b7-a8a1-ea1df543f1b2)

Co-authored-by: Sam Ko <sam@vercel.com>
2024-06-02 23:42:55 +00:00
Boris
fd25a6af57
refactor: rename API endpoint to '/api/protected-api' for comment (#66456)
Requests to the protected endpoint without the '-api' suffix will return
a 404. Ensure to use '/api/protected-api' to see the expected behavior.

<!-- 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: Sam Ko <sam@vercel.com>
2024-06-02 23:38:42 +00:00
Anay Paraswani
128e80ca59
Update cookies.mdx to show that maxAge accepts a value in seconds (#66476)
In the discord server, people were confused whether maxAge accepts in
second or millisecond. It would be worth specifying it

---------

Co-authored-by: Sam Ko <sam@vercel.com>
2024-06-02 23:34:00 +00:00
vercel-release-bot
12dbc8ad7e v15.0.0-canary.7 2024-06-02 23:23:04 +00:00
Niklas Arens
6278046116
docs: fix link for server components (#66470) 2024-06-02 09:13:05 -05:00
vercel-release-bot
5ae286ffd6 v15.0.0-canary.6 2024-06-01 23:23:16 +00:00
Zack Tanner
734fa1df62
fix: ensure route handlers properly track dynamic access (#66446)
In #60645, dynamic access tracking was refactored but we erroneously
stopped tracking dynamic access in route handlers. Request proxying, as
well as tracking segment level configs (such as `export const dynamic =
'force-dynamic'`), were only enabled during static generation. This was
an unintended breaking change that consequently caused dynamic access to
not properly bail from data cache in various circumstances.

This adds some more rigorous testing for route handlers, as this seems
to be a fairly large gap in our fetch cache testing currently.

This PR is easiest to review with [whitespace
disabled](https://github.com/vercel/next.js/pull/66446/files?w=1).
2024-06-01 15:32:50 -07:00
Jiachi Liu
34c2a05da2
Warn metadataBase missing in standalone mode or non vercel deployment (#66296)
### What

Change the metadataBase missing warning for all cases to only warn in
standalone mode or the non-vercel deployment.

### Why

In vercel deployments, previous concern was that you might not discover
you missed that metadataBase when you deploy. But now we have sth
fallback on production deployments. So we only need to warn in
non-vercel deployment.

Standalone is usually for self-hoist, we always warn users to set the
`metadataBase` to make sure the domain can be properly resolved.


[x-ref](https://vercel.slack.com/archives/C03S8ED1DKM/p1716926825853389?thread_ts=1716923373.484329&cid=C03S8ED1DKM)
2024-06-01 20:15:01 +02:00
Sebastian Silbermann
355a4acc9e
Improve JSDoc link for Metadata API (#66455) 2024-06-01 17:00:36 +00:00
Zack Tanner
d9b2d8b9cc
fix erroneous RSC calls on hash changes (#66434)
When the router encounters a `stale` cache entry, it clears the `rsc`
data so that it can be fetched in render. All navigations (even just for
hash fragments) flow through the navigation reducer, which has logic to
discard any existing cache entries when the cache is stale.

This bug has become more obvious after removing the default 30s cache,
which would previously have masked it.

This updates the existing handling that clears flight data to not do so
if only the hash changes as there would be no server changes in this
case.

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

-->
2024-06-01 06:26:04 -07:00
Will Binns-Smith
b39ae62a3b
Update rust toolchain to nightly-2024-05-31 (#66428)
Depends on https://github.com/vercel/turbo/pull/8256
2024-06-01 03:37:04 +00:00
vercel-release-bot
1e63f5b336 v15.0.0-canary.5 2024-05-31 23:22:44 +00:00
Will Binns-Smith
2de828e139
Use rust-lld for Windows on arm64 (#66360)
Test Plan: Built with Windows on arm64
2024-05-31 16:00:01 -07:00
Will Binns-Smith
fe6ca5e216
Revert "next-swc: Update from tokio 1.32.0 to 1.37.0 (#66087)" (#66391)
This reverts commit 99fff19d97.

See https://github.com/vercel/turbo/pull/8246 for context.
2024-05-31 15:26:25 -07:00
vercel-release-bot
86a0c8f7b1 v15.0.0-canary.4 2024-05-31 21:57:18 +00:00
Zack Tanner
f55a064ce5
add experimental flag for retrying static generation (#66393)
Transient/recoverable errors can cause page(s) to fail. When building an
app with a lot of static pages, a single page failing to build can be
frustrating, especially if it it'll pass on a retry. This adds an
experimental `staticPageGenerationTimeout` property that can be used to
configure how many times Next.js attempts to build a particular page
before giving up.

I recommend reviewing this PR [without
whitespace](https://github.com/vercel/next.js/pull/66393/files?w=1)

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

-->
2024-05-31 14:53:46 -07:00
Zack Tanner
a0155c79c5
refactor page export error tracking (#66392)
This adds a map to track failed pages (and the number of attempts, which
will be used in #66393). I removed some other variables that were being
used to track the same information.

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

-->
2024-05-31 20:23:27 +00:00
Zack Tanner
c467c0a992
remove duplicate export workers (#66388)
We already have workers available when determining if a page is static,
and we expose those workers to the page export handler. We should re-use
those workers instead of creating new ones.

In practice this seems like dead code, since `setupWorkers` returns the
existing workers if a pages worker exists, and we always create a pages
worker.

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

-->
2024-05-31 12:41:17 -07:00
Kevin Mårtensson
2e4884035d
chore: bump supported msw version to v2.3.0 (#66351)
### What?

This bumps the supported `msw` version when using the `playwright` test
mode. There's no need for mocking requests and responses anymore since
[they adopted](https://github.com/mswjs/msw/pull/1436) the global fetch
API in `msw`.

### Why?

Users can extend `test` from `playwright` manually and create the `msw`
fixtures, but it's better if it works out of the box with newer versions
of `msw`.

Fixes #63338.

Co-authored-by: Sam Ko <sam@vercel.com>
2024-05-31 12:18:41 -07:00
vercel-release-bot
9622d89eb9 v15.0.0-canary.3 2024-05-31 18:17:31 +00:00
Jiachi Liu
86723a6f52
Revert "Middleware RSC bundling changes" (#66422)
Revert #66052 
Revert #66294
2024-05-31 18:10:08 +00:00
Benjamin Woodruff
c0562529db
next-swc-napi: Remove "plugin" from default feature list (#66380)
Effectively a revert of https://github.com/vercel/next.js/pull/66006,
but:

- Keeps the cleanup changes from that PR.
- With https://github.com/vercel/nextpack/pull/106 removing the explicit
`--features plugin` flag, we will match behavior between cargo's
defaults and the nextpack development scripts (which we want to do for
maximizing cache reuse).

The tradeoff here is faster cold builds, at the cost of waiting longer
when you want to test with plugins.

Feedback from @kdy1 was:

> I think it's a good idea to disable plugin by default for nextpack. We
don't use it for most of daily development, but it's very large and slow
to compile

Tested by running both:

```
pnpm build-native
pnpm build-native-no-plugin
```
2024-05-30 17:03:15 -07:00
vercel-release-bot
f9bbb0c82d v15.0.0-canary.2 2024-05-30 23:22:53 +00:00
Vercel Release Bot
50ca7f874c
Update font data (#66359)
This auto-generated PR updates font data with latest available

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2024-05-30 12:25:46 -07:00