Commit graph

20915 commits

Author SHA1 Message Date
Tim Neutkens
b85210d64e
Implement Turbopack trace server bindings (#65410)
## What?

Implements support for running the Turbopack trace server, which is the
websocket server that powers https://turbo-trace-viewer.vercel.app/ when
using `NEXT_TURBOPACK_TRACING=1 NEXT_TURBOPACK_TRACE_SERVER=1`.

Currently you have to manually run the server through the Turbo
repository which in practice means that only people working on Turbopack
are able to run it.

With the bindings implemented anyone should be able to run the trace
server.

Note that the traces that come out of Turbopack are very low level,
they're meant for optimizing Turbopack like finding slowdowns / large
memory usage / optimizing performance.

However, it's useful for people that want to peek into why their
application is slow to compile. I.e. we've used
https://turbo-trace-viewer.vercel.app to investigate reports in #48748.

This PR adds support for `trace.log` by default, so if you add
`NEXT_TURBOPACK_TRACING=1 NEXT_TURBOPACK_TRACE_SERVER=1` it will
automatically select the `trace.log` for the current instance of
Next.js. You can only have one trace server running at the same time.

### `next internal` 

In order to support running the trace server standalone, which is useful
for investigating trace files other people have shared, I've added a new
subcommand `internal` that is not covered by semver / use at your own
risk. It's meant for internal tools that are useful to be bound to the
version of Next.js, the turbo-trace-server is a great example of that as
it has an internal binary format for storing data that needs to match
the trace.log file.

If you want to take a look at `.next/trace` instead the new `next
internal` subcommand can be used for that:

```sh
# Replace [path] with a path to a file.
next internal turbo-trace-server [path]
```

For example:

```sh
next internal turbo-trace-server ~/Downloads/trace
```

Currently the trace server does not support loading multiple files, just
hasn't been implemented yet. Once we can load two or more files we can
load both `.next/trace` and `trace.log` when
`NEXT_TURBOPACK_TRACE_SERVER=1` and support multiple paths passed to
`next internal turbo-trace-server`.


### Turbopack upgrade


PR includes a Turbopack upgrade:

* https://github.com/vercel/turbo/pull/8073 <!-- OJ Kwon -
feat(webpack-loaders): support dummy span interface -->
* https://github.com/vercel/turbo/pull/8083 <!-- OJ Kwon - fix(webpack):
print resource, project path when relative calc fails -->
* https://github.com/vercel/turbo/pull/8094 <!-- Tim Neutkens -
Implement bindings for Turbopack trace server -->


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

-->


Closes NEXT-3328
2024-05-06 15:23:40 +00:00
Zack Tanner
c56d69da5d
use correct not-found component when triggered from a parallel route (#65343)
When `notFound()` is thrown from metadata, it's caught by a
`<MetadataOutlet />` rendered as a sibling to the page component. But we
currently only pass the custom not-found component to the
`<NotFoundBoundary />` for the `children` slot. This means that if a
parallel route throws a `notFound()` in `generateMetadata`, it'd be
caught by the root not found, which would be unexpected.

This mirrors the logic for determining whether or not a `notFound`
boundary should be provided. A side effect of this is that if you throw
a `notFound()` in `generateMetadata` for a segment that _only_ has
parallel routes, and no `children` slot, it won't be caught by the
boundary. But fixing this will require a larger refactor.

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

-->


Closes NEXT-3320
2024-05-06 14:46:54 +00:00
Steven
cf0cec1b06
chore(test): add more tests for image optimizer formats (#65363)
There were a few cases that were untested so I added new tests to cover
them.

Closes NEXT-3322
2024-05-06 10:23:44 -04:00
Sebastian Silbermann
581fb0c988
Improve Head > script coverage (#65399)
Closes NEXT-3324
2024-05-06 10:47:18 +02:00
Sebastian Silbermann
7cfe6fd898
Support interrupts and focus in react-profiling-mode test (#65200)
Closes NEXT-3263
2024-05-06 07:28:43 +02:00
Mehdi Mashayekhi
55e6087ab6
Update 05-mdx.mdx (#65392)
There was a typo in the file that I fixed

<!-- 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-05-06 04:04:45 +00:00
tgt
a230495a90
use backticks instead of quotes (#65393)
Fixes minor typo on docs
2024-05-06 04:00:58 +00:00
vercel-release-bot
1ae14bafdb v14.3.0-canary.40 2024-05-05 23:21:26 +00:00
Reza Mauliadi
f713c954a7
Remove duplicate code example in authentication page (#65354)
I found a duplicate code example in
https://nextjs.org/docs/app/building-your-application/authentication#context-providers
for the layout.ts.

Co-authored-by: Sam Ko <sam@vercel.com>
2024-05-05 17:36:24 +00:00
vercel-release-bot
c9291d6dd5 v14.3.0-canary.39 2024-05-04 23:21:52 +00:00
Tim Neutkens
9ec37c120a
Upgrade Turbopack (#65320)
<!-- 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 #

-->


Closes NEXT-3311
2024-05-04 13:18:08 +02:00
vercel-release-bot
7ee16934e9 v14.3.0-canary.38 2024-05-03 23:22:07 +00:00
Sam Ko
34f675a501
docs(unstable_cache): add data cache mentions (#65342)
## Why?

There is no mention that Data Cache is being used for the
`unstable_cache` API in our documentation.

Closes NEXT-3319
2024-05-03 15:41:14 -07:00
Zack Tanner
d89c2e0b0f
add explicit test for parallel routes in a root layout (#65338)
Didn't seem like we had any tests that explicitly check a non-nested
parallel route works in a root layout, so adding one here.

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

-->


Closes NEXT-3317
2024-05-03 15:05:48 -07:00
Benjamin Woodruff
8dc0eff89a
Delete dead concatenate_output_assets function (#65337)
I noticed this was dead while working on other changes to this file.

Checked that it built with:

```
cargo check
```
2024-05-03 14:20:08 -07:00
Benjamin Woodruff
e8acd2d9e5
Remove broken #[turbo_tasks::value(transparent)] attributes (#65336)
The `transparent` option only does something when the struct is a field-less unit struct with a single item.

Right now, an invalid `transparent` option is silently ignored. I'm working on a PR to change this to a compilation error, so that it's obvious that the option won't work. These are the callsites in `next.js` that my tweak brought up as potential issues.

Functionally, this PR should be a no-op.
2024-05-03 14:17:44 -07:00
Vercel Release Bot
287786eb54
Update Turbopack development test manifest (#65312)
This auto-generated PR updates the development integration test manifest
used when testing Turbopack.
2024-05-03 21:00:30 +00:00
Benjamin Woodruff
eba364a985
Emit polyfill-nomodule.js into the build manifest polyfillFiles (#65223)
### Why?

`polyfill-nomodule.js` is a pre-built file containing polyfills for
older browsers (gated by the `<script>` tag `nomodule` attribute).

### How?

- The turbopack server needs to emit a raw OutputAsset for this file, so
that it is copied into the output chunks directory.
- That file needs to be passed into `polyfillFiles`, and preserved when
we're merging manifests inside of the development server.

### Test Plan

```
HEADLESS=true pnpm testonly-dev test/e2e/app-dir/app/index.test.ts -t 'should serve polyfills for browsers that do not support modules'
HEADLESS=true pnpm testonly-dev-turbo test/e2e/app-dir/app/index.test.ts -t 'should serve polyfills for browsers that do not support modules'
```

Build a project with `next dev --turbo` and inspect:

![Screenshot 2024-05-01 at
10.40.39 PM.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/HAZVitxRNnZz8QMiPn4a/fe0214b2-ca56-4c03-a133-921f1dc51775.png)
![Screenshot 2024-05-01 at
10.40.20 PM.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/HAZVitxRNnZz8QMiPn4a/d41dbf91-34d2-44c4-90ec-30e3212ce0f8.png)

Verify that the polyfill file exists and resolves in the browser.

Closes PACK-2993
2024-05-02 22:15:09 -07:00
JJ Kasper
64ef34ec7b
Revert "Remove extra suspense boundary for default next/dynamic" (#65309)
Reverting temporarily while we investigate a bug where the page crashes
due to the missing `Suspense`.

x-ref: [slack
thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1714691721631339)

Reverts vercel/next.js#64716

Closes NEXT-3307
2024-05-02 19:37:18 -07:00
JJ Kasper
025f5b6bf6
Update revalidateTag to batch tags in one request (#65296)
As discussed this collects all `revalidateTag` calls and invokes in a
single request to avoid race conditions and overhead from multiple
pending requests.

x-ref: [slack
thread](https://vercel.slack.com/archives/C0676QZBWKS/p1714688045037509?thread_ts=1710902198.529179&cid=C0676QZBWKS)

Closes NEXT-3306
2024-05-02 19:27:29 -07:00
Vercel Release Bot
ec74cd9cda
Update font data (#65301)
This auto-generated PR updates font data with latest available
2024-05-02 19:14:41 -07:00
vercel-release-bot
50f3823d7e v14.3.0-canary.37 2024-05-02 23:23:31 +00:00
Sam Ko
0864e21931
chore(github-workflow): Update title for update-font-data workflow (#65293)
## Why?

We're constantly getting failures when attempting to update our font
data.

Update: I couldn't find anything why this was failing, so I'm guessing
there just wasn't any changes that were needed? It just worked with the
same code.

-
https://github.com/vercel/next.js/actions/runs/8916579201/job/24488235812
(fail)
- https://github.com/vercel/next.js/actions/runs/8931168481 (successful)

Closes NEXT-3304
2024-05-02 22:55:00 +00:00
Will Binns-Smith
60069e769c
Trace uploader: add worker spans to allowed events (#65255)
These are ancestor spans to most work done when workers are used.
2024-05-02 15:06:32 -07:00
Lee Robinson
d8e1e50524
docs: update Route Handler streaming example (#65286)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2024-05-02 16:46:27 -05:00
JJ Kasper
dccff3a82b
Enable preloading entries by default (#65289)
This enables the preloading entries on start flag by default as it has a
great benefit to preload eagerly when starting the server instead of
lazily when requests come in which makes the user eat the module
initialization time.

Closes NEXT-3303
2024-05-02 14:10:59 -07:00
Sebastian Silbermann
01826678fc
Improve test assertions (#65285)
Closes NEXT-3286
2024-05-02 22:40:08 +02:00
Sam Ko
2bbeab878c
chore(github-workflow): add linear: next labels to sync popular issues to linear (#65288)
## Why?

Helps us triage the most popular issues better by also having these in
linear.

Closes NEXT-3290
2024-05-02 19:25:35 +00:00
Rishabh Poddar
91444dfef8
Fixes with-supertokens example (#65267)
This PR fixes how a protected API is called once the user is logged in,
in the `with-supertokens` example app.

Co-authored-by: Sam Ko <sam@vercel.com>
2024-05-02 19:19:20 +00:00
Sebastian Silbermann
2a2a4e7c05
Remove unnecessary mocks (#65284)
Closes NEXT-3285
2024-05-02 20:49:11 +02:00
Andrew Gadzik
89ad612165
Fix an issue parsing catchall params (#65277)
This should fix the following scenarios,

- Given a page defined like `app/foo/[...bar]/page.tsx`
- Given a page defined like `app/bar/[[...foo]]/page.tsx`
- Given a parallel route defined like `app/@slot/[...catchall]/page.tsx`

If you navigate to `/foo/bar` the `params` prop in the parallel route
would be

```js
params: {
  catchall: [
    'foo',
    [ 'bar' ]
  ]
}
```

And if you navigate to `/bar/foo` the `params` prop in the parallel
route would be

```js
params: {
  catchall: [
    'bar',
    '[ ...foo ]'
  ]
}
```

With the fix in place, the `params` prop in the parallel route will be,

```js
params: {
  catchall: [
    'foo',
    'bar',
  ]
}
```

And

```js
params: {
  catchall: [
    'bar',
    'foo',
  ]
}
```

Respectively
2024-05-02 18:31:39 +00:00
Sebastian Silbermann
06c5ea4f16
Extract slow tests to avoid wasteful start/stop (#65265) 2024-05-02 13:07:23 +02:00
vercel-release-bot
6475431a4c v14.3.0-canary.36 2024-05-01 23:22:31 +00:00
Ryota Murakami
dbf22166ca
[create-next-app] remove "text-balance" custom class (#63742)
### What?
Remove "text-balance" custom class from create-next-app tailwindCSS
templates.
### Why?
TailwindCSS has exact same class since v3.4.0.
https://tailwindcss.com/docs/text-wrap

Co-authored-by: Sam Ko <sam@vercel.com>
2024-05-01 23:01:56 +00:00
vercel-release-bot
673abe469b v14.3.0-canary.35 2024-05-01 22:36:34 +00:00
Andrew Gadzik
bb7f5a317f
Provide non-dynamic segments to catch-all parallel routes (#65233)
Fixes an issue with https://github.com/vercel/next.js/pull/65063 where
the catch-all param only contains dynamic segments and is missing
non-dynamic route segments.

This makes building breadcrumbs extremely hard as we're missing
information to properly render the correct breadcrumb components.

This fix makes parallel route catch-all params behave like the standard
catch-all params in non-parallel routes

---------

Co-authored-by: Zack Tanner <1939140+ztanner@users.noreply.github.com>
2024-05-01 15:32:45 -07:00
Sam Ko
f2e7c8eeec
docs(staletime): add clarification around prefetch false (#65252)
## Why?

Add clarification around when the `prefetch` prop on the `Link`
component is set to `false`.

- x-ref:
https://github.com/vercel/next.js/issues/51788#issuecomment-2088521708
-
https://github.com/vercel/next.js/blob/canary/test/e2e/app-dir/app-client-cache/client-cache.test.ts#L202

Closes NEXT-3275
2024-05-01 14:26:10 -07:00
onFire(Abhi)
dcb7e681fd
fix redirect to url with semicolon (#65165)
Closes https://github.com/vercel/next.js/issues/64904

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2024-05-01 13:11:41 -07:00
Tommy D. Rossi
ad0c5bb083
Use POST for invokeIpcMethod (#65238)
args can be arbitrarily big, even MBs of data. But an url has a limit,
in Node.js it's 15Kb. This will cause the Node.js server to fail with
ECONNRESET

Fixes: https://github.com/vercel/next.js/issues/56005
Partially fix ECONNRESET errors in
https://github.com/vercel/next.js/issues/57491

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2024-05-01 12:29:34 -07:00
Steven
68d5a3892b
fix(next/image): detect react@19 for fetchPriority prop (#65235)
In a previous PR, https://github.com/vercel/next.js/pull/47302,
detection for `fetchPriority` assumed that
https://github.com/facebook/react/pull/25927 would land in react@18.3.0
because that was the react@canary version at the time. However, it
didn't land in react@18.3.0 and it is expected to land in react@19.0.0
due to the breaking change.

This means that users upgrading to react@18.3.0 will see a warning.

The fix is to stop looking at the `React.version` string and instead
check for `React.use`, a feature that [will land in
react@19.0.0](https://react.dev/blog/2024/04/25/react-19#new-feature-use)
but is also available in react@canary and react@beta today.

Note: There were tests added for App Router and Pages Router in a
previous PR https://github.com/vercel/next.js/pull/47302 but they seem
to run on react@18.2.0 which is why we don't see failures.

Fixes https://github.com/vercel/next.js/issues/65161
2024-05-01 15:17:54 -04:00
Sam Ko
9a5b971fc6
chore(github-workflow): update to check all reactions (#65228)
## Why?

We should check `reaction.total_count`, not just 👍🏼 reactions.

Closes NEXT-3271
2024-05-01 11:33:16 -07:00
Gabriel F
9870faf789
Fix export function name on docs/routing/layouts-and-templates (#65240)
### What?
Fix export function name on docs/routing/layouts-and-templates

### Why?
The way it is, it will return an error to the user following the
tutorial: `Unsupported Server Component type: undefined / next js 13`

### How?
- Change `Links()` function export to `NavLinks()`

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2024-05-01 11:20:45 -07:00
Jamie Barton
a0df9860c4
feat(examples): add with-turso (#61291) 2024-05-01 11:41:47 -05:00
vercel-release-bot
c9a34f8b5c v14.3.0-canary.34 2024-05-01 15:38:17 +00:00
Vercel Release Bot
d62b68fb04
Update Turbopack development test manifest (#65226)
This auto-generated PR updates the development integration test manifest
used when testing Turbopack.
2024-05-01 12:02:20 +02:00
Vercel Release Bot
9f9428d81e
Update Turbopack production test manifest (#65225)
This auto-generated PR updates the production integration test manifest
used when testing Turbopack.
2024-05-01 10:57:48 +02:00
DuC
7bd39f7b01
docs(app-routing-layoutsand-template): use the correct path (#65085)
The import path of the context is different. Does this cause ambiguity?
I'm not sure if this is intentional by the author.

---------

Co-authored-by: Sam Ko <sam@vercel.com>
2024-05-01 07:00:25 +00:00
Tobias Koppers
77706b68a7
Turbopack: rename source map prefix (#64965)
### What?

see https://github.com/vercel/turbo/pull/8034

### Why?

### How?
2024-05-01 05:21:50 +00:00
vercel-release-bot
34a96e126a v14.3.0-canary.33 2024-04-30 23:21:55 +00:00
Zack Tanner
b1ce1b24b3
docs: fix skipTrailingSlashRedirect middleware example (#65220)
The example here only updates the pathname, but the redirect path is
determined by taking the `req.nextUrl` object and stringifying it, which
means it would return the wrong redirect location.

Closes NEXT-3260
2024-04-30 15:51:20 -07:00