Commit graph

21200 commits

Author SHA1 Message Date
Vercel Release Bot
f6bdd11c5b
Update font data (#66730)
This auto-generated PR updates font data with latest available
2024-06-11 08:01:47 -07:00
Karim Shehadeh
12190afcd3
Prevent append of trailing slash in cases where path ends with a file extension (#66636)
### What

Skip adding trailing slash for file pattern like same origin urls

### Why

Fixes #66635

Next.js will not append trailing slash for file like pattern urls when
`trailingSlash` is enabled. This PR aligns the behavior of the metadata
trailing slash appending with next-server route handling.

---------

Co-authored-by: Jiachi Liu <inbox@huozhi.im>
2024-06-11 16:29:02 +02:00
Delba de Oliveira
db9170c2b8
Docs: Fix typo (#66749)
Fix typo in `unstable_cache` API page. re:
https://github.com/vercel/next.js/pull/66716
2024-06-11 08:30:42 -05:00
vercel-release-bot
8bac76a5b3 v15.0.0-canary.25 2024-06-11 00:13:55 +00:00
Zack Tanner
e01d52abe6
Update React from 1df34bdf62 to 6230622a1a (#66726)
<details>
<summary>React upstream changes</summary>

- https://github.com/facebook/react/pull/29835

</details>
2024-06-11 00:06:12 +00:00
Zack Tanner
7b97f30c40
Revert "Fix esm property def in flight loader" (#66727)
This is causing unexpected errors.

Reverts vercel/next.js#66286
2024-06-11 00:04:33 +00:00
Ivan Torres
0e582a9b59
Update devdependecy @types/node (#66725)
Update DevDependecy to the last version: @types/node@20.14.2

Co-authored-by: torresgol10.itd <torresgol10.itd@gmail.com>
2024-06-10 23:45:06 +00:00
Zack Tanner
fa05f11553
tweak flaky module-imports test (#66728)
This test flakes a _lot_
([ref](https://github.com/vercel/next.js/actions/runs/9456072960/job/26048162244),
[ref](https://github.com/vercel/next.js/actions/runs/9456072960/attempts/2),
[ref](https://github.com/vercel/next.js/actions/runs/9456076941/job/26048598801))
likely due to all of the `context` mutation and sharing between tests.

This updates the test that fails the most with locally scoped context to
flakes introduced by other tests.

<!-- 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-10 23:29:49 +00:00
vercel-release-bot
fc03faedfb v15.0.0-canary.24 2024-06-10 23:23:08 +00:00
Delba de Oliveira
14ec3a288e
Docs: Update unstable_after based on community questions (#66716) 2024-06-10 22:45:00 +00:00
Sam Ko
78505fcb78
chore(test): add types to tests (#66724)
## Why?

Adding types to test—building on this
[PR](https://github.com/vercel/next.js/pull/65722).
2024-06-10 14:54:56 -07:00
Wyatt Johnson
edf8cc52fc
tests: fixed some test types and fixed darwin support (#65722)
This fixes some tests so that they can run on macOS that previously had
some issues with IPv6 during testing as well as updated some of the
tests to use `retry` over `check`.
2024-06-10 13:31:05 -07:00
Wyatt Johnson
996a290afd
[lint] Allow lint warnings to pass in CI (#66140)
To allow us to incrementally adopt more comprehensive linting rules,
this pull request disables the previous behaviour of failing CI when any
warnings were discovered. Instead, this modifies the previous warnings
to be errors which will preserve the previous linting behaviour. As we
enable new lint rules, they can be added as warnings which will gently
nudge us towards fixing in related pull requests.
2024-06-10 12:57:46 -07:00
JJ Kasper
16caf41995
Fix inconsistency with 404 getStaticProps cache-control (#66674)
While investigating unexpected stale responses when leveraging
`getStaticProps` on the 404 page noticed we have an inconsistency
between local and deployed due to `Cache-Control` being set to
`no-store, must-revalidate` even though a revalidate period is provided.
The inconsistency also differs between the HTML response and the data
response `_next/data` which causes even more unexpected behavior. To
avoid this behavior, this replaces the handling to ensure we honor the
originally provided revalidate period during `notFound: true` for the
`Cache-Control` header.

Validated against provided reproduction here
https://github.com/fusdev0/next-notfound-revalidate
Deployment:
https://vercel.live/link/next-notfound-revalidate-govzskknf-vtest314-ijjk-testing.vercel.app/fallback-blocking/fasdf

Prior PR for prior context that introduced this
https://github.com/vercel/next.js/pull/19165

x-ref: [slack
thread](https://vercel.slack.com/archives/C0676QZBWKS/p1717492459342109)
2024-06-10 12:13:05 -07:00
JJ Kasper
755c9e445b
Add timeout/retry handling for fetch cache (#66652)
As discussed this adds handling to timeout at a max of 500ms for fetch
cache request and retries a max of 3 times due to network instability.
This also adds cache service tests and fixes a case we've been trying to
track down where we were seeing `undefined` cache URL values which made
debugging fetches tricky.
2024-06-10 11:34:36 -07:00
Sebastian Silbermann
eb9f49b07e
Run Pages Router test with same version as Next.js peer dependency (#66712) 2024-06-10 19:03:13 +02:00
Wyatt Johnson
e7694b3f3d
[ppr] Enable static shell debugging in other environments (#65483)
To assist with the development and testing of the new partial
prerendering (PPR) paradigm, this introduces a stop-gap solution to let
us verify issues with pages in preview and production environments if
enabled. When a Next.js app is built and ran with the
`__NEXT_EXPERIMENTAL_STATIC_SHELL_DEBUGGING=1` environment variable,
pages that have PPR enabled in production and preview environments can
have only their static shell served when accessed with a
`?__nextppronly=1` query parameter.

If your project is not using PPR, it will not change anything. If a page
is accessed in production or development with the query parameter but
PPR is not enabled, it will not change anything. Tests have been added
to validate that going forward.
2024-06-10 09:42:32 -07:00
Karl Keefer
5be04cf8fd
Incremental Static Regeneration - docs update explaining surprising behavior (#66151)
The _requirement_ to export a `generateStaticParams` to get static cache
behavior _after_ build time was _really_ surprising behavior for me, and
I think others:
* https://github.com/vercel/next.js/issues/62195#issuecomment-1952091312
*
https://github.com/vercel/next.js/discussions/57961#discussioncomment-8491488

Potentially this is a bug, and not something that should be fixed with
documentation?
I don't understand next.js caching enough to make that determination, so
instead I'm proposing these changes to docs which might be encountered
by folks who are surprised by this cache behavior.

One point in favor of this being a bug: The CLI reports that a route is
`SSG` enabled in the build output, but doesn't actually cache post-build
page renders if this export is missing.

@awinogrodzki made a demo repo showing this behavior, as described
[here](https://github.com/vercel/next.js/discussions/57961#discussioncomment-7468144).

---------

Co-authored-by: Delba de Oliveira <delbabrown@gmail.com>
Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
Co-authored-by: samcx <sam@vercel.com>
2024-06-10 15:48:54 +00:00
hrmny
6c1d700afc
feat(turbopack-ecmascript): cache external modules with wrapper (#63337)
### What?
This is a fix for a bundle potentially referring to two different
external modules (e.g. `react` because it gets invalided from the
require cache)

See https://github.com/vercel/turbo/pull/7988

### Turbopack Updates
* https://github.com/vercel/turbo/pull/8376 <!-- Tim Neutkens - Rename
ChunkLoading::None to ChunkLoading::Edge -->
* https://github.com/vercel/turbo/pull/8371 <!-- Donny/강동윤 - test: Add
an execution test for `paren_remover` -->
* https://github.com/vercel/turbo/pull/8370 <!-- Tobias Koppers - Tree
Shaking shared state and side effects -->
* https://github.com/vercel/turbo/pull/7988 <!-- hrmny -
feat(turbopack-ecmascript): cache external modules with wrapper -->

Closes PACK-2622
2024-06-10 15:39:40 +00:00
Jiachi Liu
f893c18528
Append sitemap extension and optimize imafe metadata static generation (#66477)
### What

Optimizing the static generation for dynamic metadata routes

If you're not using `generateSitemaps()` or `generateSitemaps()`, you
don't need to change any file conventions.
If you're using multi sitemap routes, make sure the returned `id`
properties from `generateSitemaps()` don't need to contain `.xml`, since
we'll always append one for you.

Analyzing the exports of metadata routes and determine if we need to
make them as dynamic routes.

### Why

Previously, users are struggling with the multi routes of sitemap or
images.
For sitemap, the `.xml` extension in url doesn't get appended
consistently to the multi sitemap route between dev and prod.
For image routes, the generated image routes are always dynamic routes
which cannot get static optimized.

The reason is that we need to always generate a catch-all route (such as
`/icon/[[...id]]` to handle both single route case (e.g. without
`generateImageMetadata`, representing url `/icon`) or multi route (e.g.
with `generateImageMetadata`, representing url `/icon/[id]`), only
catch-all routes can do it. This approach fail the static optimization
and make mapping url pretty difficult as parsing the file to check the
module exports has to be done before it.

#### Benifits

For image routes urls, this approach could help on static generation
such as single `/opengraph-image` route can be treated as static, and
then it can get static optimized if possible.

**Before**: `/opengraph-image/[[...id]]` cannot be optimized
**After**: single route `/opengraph-image` and multi-route
`/opengraph-image/[id]` are both possible to be statically optimized

For sitemap, since we removed appending `.xml` for dynamic routes, it’s
hard for users to have `/sitemap.xml` url with dynamic route convention
`sitemap.js` . But users desire smooth migration and flexibility.

**Before**: In v15 rc we removed the `.xml` appending that `sitemap.js`
will generate url `/sitemap` makes users hard to migrate, as users need
to re-submit the new sitemap url.
**After**: Now we'll consistently generate the `.xml`. Single route will
become `/sitemap.xml`, and multi route will become `/sitemap/[id].xml`.
It's still better than v15 as the urls generation is consistent, no
difference between dev and prod.

Here's the url generation comparsion

#### Before

All the routes are dynamic which cannot be optimized, we only had a
hacky optimization for prodution build multi-routes sitemap routes

| | only default export | `export generateImageMetadata()` | `export
generateSitemaps()` |
| -- | -- | -- | -- |
| opengraph-image.js | /opengraph-image/[[...id]] |
/opengraph-image[[...id]]/ | /opengraph-image/[[...id]] |
| sitemap.js | /sitemap/[[...id]] | /sitemap/[[...id]] | dev:
`/sitemap/[[...id]]` prod: `/sitemap/[id]` |

#### After

Most of the single route will are to get statically optimized now, and
the multi-routes sitemap are able to get SSG now

| | only default export | `export generateImageMetadata()` | `export
generateSitemaps()` |
| -- | -- | -- | -- |
| opengraph-image.js | /opengraph-image | /opengraph-image/[id] | - |
| sitemap.js | /sitemap.xml | - | /sitemap/[id].xml |

Next.js will have less overhead of mapping urls, we can easily multiply
the urls generation simply based on file conventions.

x-ref: feedback from #65507 
Closes #66232
2024-06-10 17:34:06 +02:00
Mayank
544fc0acdf
fix: Update docker base images to node:20 (#66702) 2024-06-10 16:40:26 +02:00
hrmny
1cb3a0b73d
fix(turbopack): remove tailwindcss from default external packages (#66706)
### Why?
Importing `tailwind/tailwind.css` is not possible right now with
turbopack, and there's no reason it needs to be marked as external.

### How?

Closes PACK-3013
Fixes #64837
2024-06-10 16:23:03 +02:00
mratlamwala
d7d5117777
Update 08-lazy-loading.mdx (#66705)
wording changes.

<!-- 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: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
2024-06-10 14:27:19 +01:00
vercel-release-bot
6862a53152 v15.0.0-canary.23 2024-06-10 13:23:50 +00:00
Sebastian Silbermann
fd0bc9466e
Update React from f994737d14 to 1df34bdf62 (19.0.0-rc.0) (#66533)
Co-authored-by: Hendrik Liebau <mail@hendrik-liebau.de>
2024-06-10 12:06:38 +00:00
Jiachi Liu
6cad9233fd
test: migrate dev error tests into separate sandbox test (#66666)
### What

Keep `test/e2e/app-dir/metadata-dynamic-routes/index.test.ts` with
successful build cases, move the dev error tests into separate test

### Why

x-ref:
https://github.com/vercel/next.js/actions/runs/9429301722/job/25975574075?pr=66286

Before the moving the tests, the error is flaky with turbopack since the
error will fail the hmr. Error observed with turbopack when seeing build
failed cases. So I moved the tests into the separate dev tests, running
inside sandboxes. Then each error test doesn't effect each other.

```
 ⨯ ./app/metadata-base/unset/icon--metadata.js:1:1
  Module not found: Can't resolve './icon.tsx'
  > 1 | import { generateImageMetadata } from "./icon.tsx"
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    2 | import { fillMetadataSegment } from 'next/dist/lib/metadata/get-metadata-route'
    3 |
    4 | const imageModule = { generateImageMetadata }

```
2024-06-10 11:57:33 +02:00
vercel-release-bot
891a30cb5d v15.0.0-canary.22 2024-06-10 09:29:43 +00:00
Jiachi Liu
38ac71b993
Fix esm property def in flight loader (#66286)
### What

Remove creating client proxy for each ESM export, instead for ESM we
create a CJS module proxy for itself and access the property with export
name as the actual export.

### Why

`proxy` is the module proxy that we treat the module as a client
boundary.
For ESM, we access the property of the module proxy directly for each
export.
This is bit hacky that treating using a CJS like module proxy for ESM's
exports,
but this will avoid creating nested proxies for each export. It will be
improved in the future.

Notice that for `next/dynamic`, if you're doing a dynamic import of
client component in server component, and trying to access the named
export directly, it will error. Instead you need to align the dynamic
import resolved value wrapping with a `default:` property (e.g. `{
default: resolved }`) like what `React.lazy` accepted.

Revert #57301
Fixes #66212

x-ref:
[slack](https://vercel.slack.com/archives/C04DUD7EB1B/p1716897764858829)
2024-06-10 11:21:03 +02:00
Ivan Torres
1afdbb8722
Update devdependecies tar and type (#66580)
Update devdependecies tar and type.

I have only imported the necessary function, maybe it is a little
unverbose, we can use instead of ‘x’ => ‘extract’.

---------

Co-authored-by: torresgol10.itd <torresgol10.itd@gmail.com>
Co-authored-by: Sam Ko <sam@vercel.com>
2024-06-09 22:21:28 -07:00
vercel-release-bot
4539e33d96 v15.0.0-canary.21 2024-06-09 17:41:40 +00:00
Zack Tanner
25d3581bc2
ensure router cache updates reference the latest cache values (#66681)
During navigations, the `FlightDataPath` property from the server
response can be an array if there are multiple parallel routes (eg,
`children` and `slot`). When we apply server response to the router
cache, we might call `applyFlightData` for each segment path, which will
copy existing cache values and insert new ones depending on what
changed.

However, the `existingCache` argument that we pass to this function is
the cache at the start of the navigation. That means subsequent calls to
`applyFlightData` will reference the cache _before_ updates are made to
it. This will cause it to erroneously think it needs to lazy fetch for
missing data.

<!-- 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-09 10:38:30 -07:00
vercel-release-bot
3c99b8ca57 v15.0.0-canary.20 2024-06-08 23:23:47 +00:00
JJ Kasper
19f9692bc7
Update URL provided from unstable_cache (#66651)
As discussed this updates the URL value provided from `unstable_cache`
to include the current pathname and sorted search params so that it's
easier to identify where the call is being done for using debug metrics.

x-ref: [slack
thread](https://vercel.slack.com/archives/C042LHPJ1NX/p1717012449080709?thread_ts=1716942410.700499&cid=C042LHPJ1NX)
2024-06-08 12:03:38 -07:00
Zack Tanner
a1f70ae2f3
prevent duplicate RSC fetch when action redirects (#66620)
When checking which segment(s) need to be refreshed, we currently
compare the current page URL with the segment's refresh marker.

We should inspect the `mutable.canonicalUrl` value first since that's
the URL we're changing to, followed by `state.canonicalUrl` as a
fallback (indicating that there's no URL change pending). This is
because the server action handler will receive a redirect URL prior to
`location.pathname` being updated, so the router will incorrectly think
it needs to refresh the data for the page we're going to.

Closes NEXT-3500
2024-06-08 10:56:38 -07:00
Zack Tanner
a9d842a24e
remove staticWorkerRequestDeduping flag & unused IPC code (#66655)
This flag remained experimental because the IPC implementation didn't
play nicely with requests containing large payloads, due to it being
stringified as GET parameters. This branching logic also poses
challenges for some upcoming work related to detecting IO.

This removes the handling for the
`experimental.staticWorkerRequestDeduping` flag which we can revisit in
the future with a sounder approach. This also cleans up some of the IPC
server utilities as it wasn't in use anywhere else.

<!-- 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-07 16:42:44 -07:00
vercel-release-bot
676a3bad83 v15.0.0-canary.19 2024-06-07 16:26:41 +00:00
Tobias Koppers
98257314da
Revert "feat: Update swc_core to v0.92.10" (#66640)
Reverts vercel/next.js#66521
2024-06-07 18:23:30 +02:00
Zack Tanner
b2a651ffa9
revert app-render changes related to determining RSC/Prefetch requests (#66648)
This change introduced some unexpected behavior when prefetching pages
that were statically generated on-demand. We currently conditionally
strip flight headers in base-server to opt into special rendering
behavior
([ref](71153eaa3b/packages/next/src/server/base-server.ts (L2153)))
but this doesn't apply to "request meta" properties.

This reverts that change specifically and adds a comment clarifying why
it's there, and adds a test-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-07 08:50:44 -07:00
vercel-release-bot
0cf0d43a48 v15.0.0-canary.18 2024-06-07 12:54:11 +00:00
Tobias Koppers
6820820a63
reliability of the release action (#66637)
### What?

* [allow to re-run the action that publishes the
release](ce4f629d73)
* [allow to force trigger a new
release](7e26cd7794)

### Why?

On failure we might want to re-run the whole action or publish a new
release without changes
2024-06-07 14:50:45 +02:00
vercel-release-bot
48396e80ae v15.0.0-canary.17 2024-06-07 08:38:55 +00:00
Tobias Koppers
c772c9f3d4
update turbopack (#66627)
* https://github.com/vercel/turbo/pull/8347 <!-- Tobias Koppers - Small
tree shaking fix and test case update -->
* https://github.com/vercel/turbo/pull/8348 <!-- Donny/강동윤 - fix: Apply
`paren-remover` while minifying -->
2024-06-07 08:11:36 +00:00
vercel-release-bot
004651b973 v15.0.0-canary.16 2024-06-06 23:23:52 +00:00
Chris Stott
a1eead87ea
Update image.mdx (#66618)
Using `overflow: hidden` on the image's parent element is not necessary,
as the image is already set to be the same dimensions as its parent with
no overflow, and `object-fit` only changes the image aspect ratio & crop
within those dimensions.

Co-authored-by: Steven <steven@ceriously.com>
2024-06-06 23:21:04 +00:00
Arnaud Favier
31222b53b4
Update code examples in documentation (12-third-party-libraries) (#66600)
Update four code examples in `12-third-party-libraries.mdx`:
- Old not working code syntax was used to send events to Google
Analytics and Google Tag Manager.

<!-- 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-06 22:49:42 +00:00
vercel-release-bot
f52f27896d v15.0.0-canary.15 2024-06-06 21:39:39 +00:00
Will Binns-Smith
9c7c92bcab
Update to turbopack-240606.2 (#66606)
Includes:
- https://github.com/vercel/turbo/pull/8346
- https://github.com/vercel/turbo/pull/8344
2024-06-06 21:31:48 +00:00
Jon Tewksbury
4118660930
Add videos to openGraph metadata object (#66613)
### What?
Adds a videos example to the `openGraph` object in `metadata`. 

### Why?
I came to the docs looking for `openGraph` video info and luckily
checked in the actual type definitions to find it was there and easy to
add. Figured some others would come looking for it as well and would be
good to have a quick example in the docs.

---------

Co-authored-by: Sam Ko <sam@vercel.com>
2024-06-06 21:29:11 +00:00
Shu Ding
04ce445105
Fix Server Actions closure idents tracking (#66601)
This PR fixes the same case mention in #66464. Instead of collecting all
values eagerly, here we merge fields (on any level of depth) of the same
value and skip methods. For example:

```ts
foo.bar
foo.bar.baz

qux.fn()
```

Previously we're (wrongly) collecting `[foo.bar, foo.bar.baz, qux.fn]`,
and now it will be just `[foo.bar, qux]`.

Merging of fields is critical for collecting methods correctly because
in theory we can't tell if an object member is a method or not:

```ts
data.push.call(data, 1)

// or inside a function that does the same:
doPush(data.push, data)
```

If we don't merge fields we'll collect `[data.push, data]` which still
fails.
2024-06-06 18:08:10 +02:00
Maikel
9aa197c03b
docs: otel use anchor instead of path (#66592) 2024-06-06 15:13:10 +00:00