Commit graph

16966 commits

Author SHA1 Message Date
Janicklas Ralph
033732a3e5
Adding GoogleMaps and Youtube embed components (#52909)
Adding GoogleMapsEmbed and YoutubeEmber components into `@next/third-parties`
Adding tests and README
Each component is tagged with `data-ntpc` attribute

cc: @kara @housseindjirdeh @huozhi @gnoff 




Co-authored-by: Jiachi Liu <4800338+huozhi@users.noreply.github.com>
2023-08-07 19:38:13 +00:00
Tobias Koppers
4b78349048
fix azure test cases (#53692) 2023-08-07 19:15:18 +00:00
Tobias Koppers
654bd8c803
add unit test case for next.rs api (#53679)
### What?

unit test for next.rs api

### Why?

ensure that it's working

### How?
2023-08-07 19:26:44 +02:00
Steven
7ec76eb7e4
fix(create-next-app): fix CI defaults (default to typescript) (#53686)
Since the default for `create-next-app` has been TypeScript for some time, we should make sure this is also the case for CI.

This PR also makes sure that CI will use the same value as if the question was asked. Therefore changing defaults in the future will automatically change the behavior of CI defaults.

- Related https://github.com/vercel/next.js/issues/42592
2023-08-07 17:24:45 +00:00
Jude Gao
de0ff6fd59
Fix doc grammatical errors (#53672)
### Improving Documentation

- Ran `pnpm prettier-fix`
2023-08-07 16:24:42 +00:00
Thomas Knickman
3db5c16546
fix(node): pnpm 8.6 needs node 16.14 (#53677)
The `pnpm` version was recently updated to `8.6`, however the node version was left at `16.8`. `pnpm@8.6` requires at least `node@16.14` ([source](https://github.com/pnpm/pnpm/blob/main/pnpm/package.json#L145)).

This fixes the engines spec to avoid conflicting versions.
2023-08-07 15:15:26 +00:00
Alex Kirszenberg
589150184e
Turbopack: Hide Turbo Engine internals (#53007)
See https://github.com/vercel/turbo/pull/5584
2023-08-07 14:55:13 +00:00
Jonathan Steele
786812d214
docs(with-stripe-typescript): Update README demo link (#53662) 2023-08-07 08:58:02 -05:00
Tobias Koppers
87aa5dc613
enable more test cases for next.rs api (#53670)
### What?

more tests
2023-08-07 15:17:23 +02:00
vercel-release-bot
5ea372d642 v13.4.14-canary.0 2023-08-07 12:49:08 +00:00
Tobias Koppers
25e6db4274
Turbopack: add edge app routes (#53387)
### What?

* adds middleware manifest and other missing items for edge app routes
* fixes react-server condition in edge context
* fixes node.js route context

---------

Co-authored-by: Alex Kirszenberg <alex.kirszenberg@vercel.com>
2023-08-07 13:00:06 +02:00
Alex Kirszenberg
9483ff170a
Initial HMR Nexturbo API implementation (#52950)
This implements a MVP of HMR. HMR works similarly as in turbopack-dev-server, but instead of going through the router to retrieve output assets, output assets are eagerly stored into a global hash map, and retrieved directly from there (see `VersionedContentMap`).

This will require some more glue on the Next.js side in order to handle:
* RSC headers;
* handling Turbopack subscriptiob HMR events from the Next.js WS server, proxying them to `hmr_events`, and sending back the stream of updates.

There's currently no way to evict deleted output assets, nor to communicate these events to the client. @sokra mentioned the `VersionedContentMap` could store a list of assets per entrypoint, instead of having a top-level flat map.

Co-authored-by: Tobias Koppers <1365881+sokra@users.noreply.github.com>
2023-08-07 10:37:57 +00:00
yudai yamamoto
b993afbf7c
Fix action failures due to state tree encoding (#53655)
fixes #53654

### Related PRs
- #51017
2023-08-07 10:02:48 +00:00
Arpit Patidar
78b04980be
update eslint config (#53637)
## Fixing a bug
- I checked the eslint config and found that override property is not supposed to be inside another override property.
- I couldn't checked the entire file as it was a big config file, but I guess it was supposed to be a part of global overrides array of eslint.

Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2023-08-07 09:41:14 +00:00
vercel-release-bot
498692b698 v13.4.13 2023-08-07 06:57:47 +00:00
Shen Lu
0363cef4c0
Fix: missing equal sign (#53650)
Missing an equal sign in Image docs

1e02a92a94/docs/02-app/02-api-reference/01-components/image.mdx (L690)
2023-08-07 01:52:37 +00:00
vercel-release-bot
1e02a92a94 v13.4.13-canary.18 2023-08-07 01:06:01 +00:00
JJ Kasper
3c55417f16
Update font data (#53649)
This auto-generated PR updates font data with latest available

Co-authored-by: vercel-release-bot <infra+release@vercel.com>
2023-08-06 17:54:10 -07:00
JJ Kasper
86b0081a77
Update fonts workflow env 2023-08-06 17:31:36 -07:00
JJ Kasper
78372424f0
Add node setup for fonts workflow 2023-08-06 17:14:35 -07:00
JJ Kasper
6483903372
Add update fonts workflow (#53645)
This adds a workflow to auto update our fonts data so we can stay up to date easier. 

Closes: https://github.com/vercel/next.js/pull/53246
Closes: https://github.com/vercel/next.js/pull/53510
2023-08-07 00:11:03 +00:00
JJ Kasper
bb380e7715
Fix other case for buildId mismatch (#53643)
Continues fix from https://github.com/vercel/next.js/pull/53596 and
applies it for the `x-matched-path` specific code path.
2023-08-06 15:47:20 -07:00
Martín Stanicio
3e637cab8c
fix typo in image.mdx (#53638)
Fixed a typo in the api reference about the [\<Image\> component](https://nextjs.org/docs/pages/api-reference/components/image#fill).

Replaced "stetch" with "stretch" in the fourth paragraph
2023-08-06 20:56:02 +00:00
vercel-release-bot
bc8deab6ef v13.4.13-canary.17 2023-08-06 20:38:12 +00:00
JJ Kasper
f11406015c
Fix tracing in require-hook (#53642)
This ensures the resolve calls for `styled-jsx` are done in the correct context so that tracing can include the correct symlinks/package.json files. 

x-ref: [slack thread](https://vercel.slack.com/archives/C03S8ED1DKM/p1691217652833079)
2023-08-06 20:23:20 +00:00
JJ Kasper
7bf3d77b5e
Revert "Implement new forking technique for vendored packages. (#51083)" (#53640)
This reverts commit e06880ea4c.

reverts: https://github.com/vercel/next.js/pull/51083

x-ref: [slack
thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1691349686136519)
x-ref: [slack
thread](https://vercel.slack.com/archives/C03S8ED1DKM/p1691349579712979?thread_ts=1691217652.833079&cid=C03S8ED1DKM)
2023-08-06 13:00:12 -07:00
Tomoya Kashifuku
5f9d2c55ca
docs: fix the link to another document (#53599)
The link used to be "https://github.com/acdlite/rfcs/blob/first-class-promises/text/0000-first-class-support-for-promises" but actually "https://github.com/acdlite/rfcs/blob/first-class-promises/text/0000-first-class-support-for-promises.md" is correct (needs ".md" at the end)
2023-08-05 17:06:21 +00:00
Zack Tanner
6beec2f6b1
Reduce flakiness of app-fetch-logging test (#53612)
Updates `app-fetch-logging` tests to not start/stop the server each run and instead slice the relevant log output. Also moves log parsing inside of `check` since logs get appended asynchronously.

ref: https://github.com/vercel/next.js/actions/runs/5767647854/job/15637691191#step:28:662
2023-08-05 16:12:21 +00:00
vinay
081151fed1
(Docs) Remove appDir from experimental flag in mdx configuration docs. (#53610)
<!-- 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 #

-->
2023-08-05 10:14:00 -04:00
vercel-release-bot
f47081f15b v13.4.13-canary.16 2023-08-05 00:20:47 +00:00
Zack Tanner
26c19b1fa2
return a 404 when /next/_data build IDs are mismatched (#53596)
`normalizeNextData` in `next-server` used to exit early with a 404 when there was a build ID mismatch, but a recent refactor accidentally removed this functionality. This PR updates it to behave similarly to [web-server](https://github.com/vercel/next.js/blob/canary/packages/next/src/server/web-server.ts#L180-L187) where we render404 if there's a mismatch.

[slack x-ref](https://vercel.slack.com/archives/C03S8ED1DKM/p1691111541353749)
2023-08-05 00:15:42 +00:00
Lee Robinson
b7aa7d4aa4
docs: fix typo on caching page (#53597)
- reduce: `MISS`
- reduces: `HIT`
2023-08-04 23:55:20 +00:00
Josh Story
e06880ea4c
Implement new forking technique for vendored packages. (#51083)
## Vendoring

Updates all module resolvers (node, webpack, nft for entrypoints, and nft for next-server) to consider whether vendored packages are suitable for a given resolve request and resolves them in an import semantics preserving way.

### Problem

Prior to the proposed change, vendoring has been accomplished but aliasing module requests from one specifier to a different specifier. For instance if we are using the built-in react packages for a build/runtime we might replace `require('react')` with `require('next/dist/compiled/react')`.

However this aliasing introduces a subtle bug. The React package has an export map that considers the condition `react-server` and when you require/import `'react'` the conditions should be considered and the underlying implementation of react may differ from one environment to another. In particular if you are resolving with the `react-server` condition you will be resolving the `react.shared-subset.js` implementation of React. This aliasing however breaks these semantics because it turns a bare specifier resolution of `react` with path `'.'` into a resolution with bare specifier `next` with path `'/dist/compiled/react'`. Module resolvers consider export maps of the package being imported from but in the case of `next` there is no consideration for the condition `react-server` and this resolution ends up pulling in the `index.js` implementation inside the React package by doing a simple path resolution to that package folder.

To work around this bug there is a prevalence of encoding the "right" resolution into the import itself. We for instance directly alias `react` to `next/dist/compiled/react/react.shared-subset.js` in certain cases. Other times we directly specify the runtime variant for instance `react-server-dom-webpack/server.edge` rather than `react-server-dom-wegbpack/server`, bypassing the export map altogether by selecting the runtime specific variant. However some code is meant to run in more than one runtime, for instance anything that is part of the client bundle which executes on the server during SSR and in the browser. There are workaround like using `require` conditionally or `import(...)` dynamically but these all have consequences for bundling and treeshaking and they still require careful consideration of the environment you are running in and which variant needs to load.

The result is that there is a large amount of manual pinning of aliases and additional complexity in the code and an inability to trust the package to specify the right resolution potentially causing conflicts in future versions as packages are updated.

It should be noted that aliasing is not in and of itself problematic when we are trying to implement a sort of lightweight forking based on build or runtime conditions. We have good examples of this for instance with the `next/head` package which within App Router should export a noop function. The problem is when we are trying to vendor an entire package and have the package behave semantically the same as if you had installed it yourself via node_modules

### Solution

The fix is seemingly straight forward. We need to stop aliasing these module specifiers and instead customize the resolution process to resolve from a location that will contain the desired vendored packages. We can then start simplifying our imports to use top level package resources and generally and let import conditions control the process of providing the right variant in the right context.

It should be said that vendoring is conditional. Currently we only vendor react pacakges for App Router runtimes. The implementation needs to be able to conditionally determine where a package resolves based on whether we're in an App Router context vs a Page Router one.

Additionally the implementation needs to support alternate packages such as supporting the experimental channel for React when using features that require this version.

### Implementation

The first step is to put the vendored packages inside a node_modules folder. This is essential to the correct resolving of packages by most tools that implement module resolution. For packages that are meant to be vendored, meaning whole package substitution we move the from `next/(src|dist)/compiled/...` to `next/(src|dist)/vendored/node_modules`. The purpose of this move is to clarify that vendored packages operate with a different implementation. This initial PR moves the react dependencies for App Router and `client-only` and `server-only` packages into this folder. In the future we can decide which other precompiled dependencies are best implemented as vendored packages and move them over.

It should be noted that because of our use of `JestWorker` we can get warnings for duplicate package names so we modify the vendored pacakges for react adding either `-vendored` or `-experimental-vendored` depending on which release channel the package came from. While this will require us to alter the request string for a module specifier it will still be treating the react package as the bare specifier and thus use the export map as required.

#### module resolvers
The next thing we need to do is have all systems that do module resolution implement an custom module resolution step. There are five different resolvers that need to be considered

##### node runtime
Updated the require-hook to resolve from the vendored directory without rewriting the request string to alter which package is identified in the bare specifier. For react packages we only do this vendoring if the `process.env.__NEXT_PRIVATE_PREBUNDLED_REACT` envvar is set indicating the runtime is server App Router builds. If we need a single node runtime to be able to conditionally resolve to both vendored and non vendored versions we will need to combine this with aliasing and encode whether the request is for the vendored version in the request string. Our current architecture does not require this though so we will just rely on the envvar for now

##### webpack runtime
Removed all aliases configured for react packages. Rely on the node-runtime to properly alias external react dependencies. Add a resolver plugin `NextAppResolverPlugin` to preempt perform resolution from the context of the vendored directory when encountering a vendored eligible package.

##### turbopack runtime
updated the aliasing rules for react packages to resolve from the vendored directory when in an App Router context. This implementation is all essentially config b/c the capability of doing the resolve from any position (i.e. the vendored directory) already exists

##### nft entrypoints runtime
track chunks to trace for App Router separate from Pages Router. For the trace for App Router chunks use a custom resolve hook in nft which performs the resolution from the vendored directory when appropriate.

##### nft next-server runtime
The current implementation for next-server traces both node_modules and vendored version of packages so all versions are included. This is necessary because the next server can run in either context (App vs Page router) and may depend on any possible variants. We could in theory make two traces rather than a combined one but this will require additional downstream changes so for now it is the most conservative thing to do and is correct

Once we have the correct resolution semantics for all resolvers we can start to remove instances targeting our precompiled instances for instance making `import ... from "next/dist/compiled/react-server-dom-webpack/client"` and replacing with `import ... from "react-server-dom-webpack/client"`

We can also stop requiring runtime specific variants like `import ... from "react-server-dom-webpack/client.edge"` replacing it with the generic export `"react-server-dom-webpack/client"`

There are still two special case aliases related to react
1. In profiling mode (browser only) we rewrite `react-dom` to `react-dom/profiling` and `scheduler/tracing` to `scheduler/tracing-profiling`. This can be moved to using export maps and conditions once react publishses updates that implement this on the package side.
2. When resolving `react-dom` on the server we rewrite this to `react-dom/server-rendering-stub`. This is to avoid loading the entire react-dom client bundle on the server when most of it goes unused. In the next major react will update this top level export to only contain the parts that are usable in any runtime and this alias can be dropped entirely

There are two non-react packages currently be vendored that I have maintained but think we ought to discuss the validity of vendoring. The `client-only` and `server-only` packages are vendored so you can use them without having to remember to install them into your project. This is convenient but does perhaps become surprising if you don't realize what is happening. We should consider not doing this but we can make that decision in another discussion/PR.

#### Webpack Layers
One of the things our webpack config implements for App Router is layers which allow us to have separate instances of packages for the server components graph and the client (ssr) graph. The way we were managing layer selection was a but arbitrary so in addition to the other webpack changes the way you cause a file to always end up in a specific layer is to end it with `.serverlayer`, `.clientlayer` or `.sharedlayer`. These act as layer portals so something in the server layer can import `foo.clientlayer` and that module will in fact be bundled in the client layer.

#### Packaging Changes
Most package managers are fine with this resolution redirect however yarn berry (yarn 2+ with PnP) will not resolve packages that are not defined in a package.json as a dependency. This was not a problem with the prior strategy because it was never resolving these vendored packages it was always resolving the next package and then just pointing to a file within it that happened to be from react or a related package.

To get around this issue vendored packages are both committed in src and packed as a tgz file. Then in the next package.json we define these vendored packages as `optionalDependency` pointing to these tarballs. For yarn PnP these packed versions will get used and resolved rather than the locally commited src files. For other package managers the optional dependencies may or may not get installed but the resolution will still resolve to the checked in src files. This isn't a particularly satisfying implemenation and if pnpm were to be updated to have consistent behavior installing from tarballs we could actually move the vendoring entirely to dependencies and simplify our resolvers a fair bit. But this will require an upstream chagne in pnpm and would take time to propogate in the community since many use older versions

#### Upstream Changes

As part of this work I landed some other changes upstream that were necessary. One was to make our packing use `npm` to match our publishing step. This also allows us to pack `node_modules` folders which is normally not supported but is possible if you define the folder in the package.json's files property.

See: #52563

Additionally nft did not provide a way to use the internal resolver if you were going to use the resolve hook so that is now exposed

See: https://github.com/vercel/nft/pull/354

#### additional PR trivia
* When we prepare to make an isolated next install for integration tests we exclude node_modules by default so we have a special case to allow `/vendored/node_modules`

* The webpack module rules were refactored to be a little easier to reason about and while they do work as is it would be better for some of them to be wrapped in a `oneOf` rule however there is a bug in our css loader implementation that causes these oneOf rules to get deleted. We should fix this up in a followup to make the rules a little more robuts.


## Edits
* I removed `.sharedlayer` since this concept is leaky (not really related to the client/server boundary split) and it is getting refactored anyway soon into a precompiled runtime.
2023-08-04 23:47:10 +00:00
JJ Kasper
e4aecabc7d
Update ISR revalidateTag handling (#53595)
This ensures `revalidateTag()` doesn't cause an async/background revalidation unexpectedly and instead does a blocking revalidate so fresh data is shown right away when a path is using ISR. 

Test deployment with patch can be seen here: https://next-revalidation-test-47rqf8q5s-vtest314-ijjk-testing.vercel.app/

Fixes: https://github.com/vercel/next.js/issues/53187
2023-08-04 23:31:18 +00:00
Steven
acf5e84556
chore(docs): update static exports documentation with missing info (#53592)
- Related to https://github.com/vercel/next.js/issues/48022
2023-08-04 22:16:59 +00:00
Wyatt Johnson
1df2686bc9
Remove Base Path from usePathname output (#53582)
This removes the `basePath` from the output of `usePathname`. Previously this always resulted in hydration errors, this now strips the `basePath` when it's found/configured.

Now when you configure `basePath`, you don't have to factor it into your application logic and can instead rely on the values always returning the pathname without it.

Fixes #46562
2023-08-04 22:10:00 +00:00
Will Binns-Smith
1d8a633595
Update to turbopack-230804.2 (#53588)
- vercel/turbo#5671
- vercel/turbo#5675
- vercel/turbo#5676
- vercel/turbo#5662
- vercel/turbo#5663
2023-08-04 21:51:35 +00:00
Gonzalo
a66aca1e67
EXAMPLE: fix with-supabase signup button style (#53531)
### What?
Fix example `with-supabase` https://github.com/vercel/next.js/tree/canary/examples/with-supabase signup button

### Why?
Signup button text color is not the right one so the developer is not able to see the text.

### How?
Updated the style using tailwind as it is what we are using in the example.

Before:
![image](https://github.com/vercel/next.js/assets/1652286/269c3be1-70ee-4b92-9161-4d1c35cbd01c)

After (Fixed):
![image](https://github.com/vercel/next.js/assets/1652286/3aa6af87-7958-470d-bf05-d1187963e792)
2023-08-04 20:36:52 +00:00
William Li
aac4d9c3f7
use import type to import from 'next' in ts examples (#53568)
Updates typescript examples in https://nextjs.org/docs/app/building-your-application/optimizing/metadata#static-metadata to use `import type` instead of `import`.

![CleanShot 2023-08-04 at 17 28 12](https://github.com/vercel/next.js/assets/179761/d14503a4-1453-4f8f-95de-9d40ad1917ef)
2023-08-04 20:30:09 +00:00
José Olórtegui
49d4f8af3b
docs: update webhook snippet for cache revalidation (#53585)
This PR updates cache revalidation snippets in the docs. It seems that `res` should not be there since you can't find it anywhere in the snippet so I suppose that the intent was to use `NextResponse` instead. Another thing is that now we're checking the existence of the params so typescript doesn't get mad at us. And last I changed the methods to `POST` since AFAIK webhooks normally use the `POST` method.

Please let me know if there's anything left to do on my side.

Have a great day!

Co-authored-by: Steven <229881+styfle@users.noreply.github.com>
2023-08-04 20:22:02 +00:00
Steven
e7a3fd9163
chore(lint): fix lint warning about unused import current_dir (#53587)
<img width="660" alt="image" src="https://github.com/vercel/next.js/assets/229881/a9cc7270-7aee-4258-b30e-b371d9924a64">
2023-08-04 20:14:34 +00:00
Leah
542c4fc26a
chore: update to pnpm@8.6.11 (#50923)
https://github.com/pnpm/pnpm/releases/tag/v8.0.0
2023-08-04 19:40:20 +00:00
Tobias Koppers
94709ef1b9
update turbopack and update code for API changes (#53576)
* https://github.com/vercel/turbo/pull/5640
* https://github.com/vercel/turbo/pull/5661
2023-08-04 21:14:41 +02:00
vercel-release-bot
324814f2ae v13.4.13-canary.15 2023-08-04 19:13:19 +00:00
Michal Landsman
4b13d80744
doc: styled-components has stable version (#53539)
replace rc.1 by stable version

Co-authored-by: Steven <229881+styfle@users.noreply.github.com>
2023-08-04 19:08:08 +00:00
Jiachi Liu
99372fbedf
Add test for catching metadata error in error boundaries (#53581) 2023-08-04 20:57:49 +02:00
Jiachi Liu
ab14895ada
Fix dynamic route not-found boundary matching (#53564)
### What & Why

The dynamic not-found boundary didn't work as expected as it was using the `pathname` to match how many levels of the segements should be matched. For dynamic routes this doesn't work, unlike normal page, the unmatched segment can also hit the not found boundary in the same level.

### How

Use `segment` of loader tree nodes to determine if not-found boundary searching is reached to the end instead of using `pathname`. 
> NOTE: For production `/_not-found` case since it's a valid page on production and still has the original tree, so we handle that as a special case to use the not found loader tree (with empty child routes) to render.

Fixes #53344
2023-08-04 16:07:58 +00:00
Jiachi Liu
cc4879d1dc
Move metadata error under error boundaries (#53551)
### What & Why

Using `notFound()` in `generateMetadata()` or in page will lead to unacught global not found error when you do navigation, this is because `head` cache is actually not inside the error boundary as designed to stay in the beginning of the content. But in this way we won't be able to catch the notFound error thrown from metadata API. So we created a new approach that can separate the error itself from metadata result, and throw as error under the error boundaries, and metadata itself will always be safe to render.

### How

We use a new promise that resolve the `error` thrown from metadata resolving, and let the render result always return successfully and always has a value, using default metadata when there's error thrown. Create two components, one rendering the metadata tags, and another `MetadataOutlet` to throw the error when the resolving is failed but rendered under error boundaries.



```jsx
const [MetadataTree, MetadataOutlet] = createMetadataComponents(/*...*/)
const ComponentTree = createComponentTree({ metadataOutlet: <MetadataOutlet /> })

renderRSC(
  <AppRourer head={<MetadataTree />}>
    <ComponentTree />
  </AppRourer>
)
```

`metadataOutlet` will stay next to page component in the layout hierarchy

discuessed with @gnoff 

Minor changes: 

* When there's rendering root layout layer, not found boundary should be `DefaultNotFound` if the custom one doesn't exisit


Fixes #53371
Fixes #53149
2023-08-04 15:32:36 +00:00
vercel-release-bot
f04dc5ad51 v13.4.13-canary.14 2023-08-04 09:02:27 +00:00
Tobias Koppers
4ea1d8a45d
update turbopack (#53545)
* https://github.com/vercel/turbo/pull/5582 
* https://github.com/vercel/turbo/pull/5633 
* https://github.com/vercel/turbo/pull/5637 
* https://github.com/vercel/turbo/pull/5648 <!-- OJ Kwon - test(turbopack): run daily with --experimental  -->
* https://github.com/vercel/turbo/pull/5618 
* https://github.com/vercel/turbo/pull/5624 
* https://github.com/vercel/turbo/pull/5597 
* https://github.com/vercel/turbo/pull/5632 
* https://github.com/vercel/turbo/pull/5636 
* https://github.com/vercel/turbo/pull/5666
2023-08-04 07:19:20 +00:00