- 03 Oct, 2025 3 commits
-
-
nextjs-bot authored
-
Tobias Koppers authored
### What? * avoid dependencies due to tracing * Avoid invalidating client chunking context when chunk_suffix_path changes * BrowserChunkingContext::chunk_path only depends on a selected subset of fields * select cross_origin field instead of depending on the whole config * select NextConfig::output field instead of depending on the whole config * make all next config fields private to ensure using selector functions
-
Benjamin Woodruff authored
I added this in https://github.com/vercel/next.js/pull/66057 It's too noisy and not useful on CI. CI machines are often multi-tenant and/or running many other processes during initialization. We could check for `process.env.CI`, but I think just having the check in `next dev` is enough. https://vercel.slack.com/archives/C01A2M9R8RZ/p1759349240395449
-
- 02 Oct, 2025 15 commits
-
-
nextjs-bot authored
-
Zack Tanner authored
More things that are only broken because we assert on `.next` files. Updates snapshots and removes the failing tests from the clientSegmentCache manifest.
-
Zack Tanner authored
These tests were only failing with segment cache because I added an env variable to test `clientSegmentCache` independently. This updates the snapshots.
-
Josh Story authored
When prerenders abort we reject hanging promises so resources can clean up. This can lead to user code which logs errors from rejections reporting many more errors than expected and these logs are for semantically irrelevant errors. To make it clearer that these errors are not semantically relevant we will dim them. This is a partial solution because 3rd party loggers will not necessarily interpret this and so these logs might continue to show up as normal logs in donwstream systems. We may need to ask that consumers of these logs interpret the dimmed nature and convey this status to the viewer. We will follow up this work with a config that allows you to hide logs from aborted prerenders. This will completely suppress their emission to the underlying log system but it will run after any userland patches so you could still end up reporting errors for instance to an otel collector because the filtering would be applied after not before. The right way to solve this is for the log to check if there is a react cacheSignal that is aborted and do their own suppresion.
-
Brian Lou authored
-
Benjamin Woodruff authored
**Update:** This also fixes a bug pointed out by Graphite where the deletion function could hang forever because the `t` variable used for tracking attempts wasn't properly incremented. --- https://vercel.slack.com/archives/C04KC8A53T7/p1759360239193629 This is a critical path for `next dev` and `next build` initialization. On Windows, it's quite common to get an error while trying to recursively delete directories for one of two reasons: **Temporarily open files:** 1. You open the directory. 2. The user's AV detects the directory as opened and quickly scans the files in that directory. 3. You try to delete a file, but on Windows, files cannot be deleted when open. **Deletion is not instant/atomic:** It can take some time after deleting files for the directory to become empty. For this reason, we perform two retries with a 100ms delay after the first attempt and a 200ms delay after the second attempt. * Node does not use retries by default, but has an option to do so with a `100ms * attemptNumber` (linear backoff) delay, similar to what we do: https://github.com/nodejs/node/blob/b5638e1765d3d1241d07457e767f27e3ee6b9dd2/lib/internal/fs/utils.js#L774-L779 * Node used to use 3 retries by default, but that was changed in v14: https://github.com/nodejs/node/commit/7e85f068a48b284a253abcb5eb3173320869b8fe * Rust tries to delete 64 times in a loop without sleeping, but with a call to `thread::yield_now`: https://github.com/rust-lang/rust/blob/4da69dfff1929cc79872b3d05ab7112d84753dba/library/std/src/sys/fs/windows/remove_dir_all.rs#L154-L171 In the vein of reducing time spent sleeping in the critical initialization path (@timneutkens), I think we should be more aggressive, I'm thinking using a 10ms delay (arbitrary number), but with an exponential backoff, so that we still retry over the same 300ms period as we currently do? Thoughts? The difficulty is that this is on Windows, so it's hard for me to get good numbers about what impact this would have (if any).
-
Zack Tanner authored
When `output: export`, `experimental.clientSegmentCache`, and `trailingSlash: true` were all enabled, clicking links would update the URL but fail to render the page content. The issue was in how segment cache URLs were being constructed for static export mode. When a URL had a trailing slash (like /another/), the code tried to strip it using `substring(0, -1)`. However, substring() treats negative indices as 0, so this became `substring(0, 0)` and returned an empty string. This meant URLs like /another/ would generate segment requests to `/__next._tree.txt` instead of `/another/__next._tree.txt`. I also updated the brittle snapshot-like tests that were in here as well since we output more files with segment cache. I don't think this type of test adds that much value but didn't want to change any test behavior.
-
Vercel Release Bot authored
This auto-generated PR updates the production integration test manifest used when testing Rspack.
-
nextjs-bot authored
-
Hendrik Liebau authored
When using `'use cache'` in `generateMetadata` or `generateViewport`, the caching did not work correctly, because we didn't apply the same special handling for the `params` and `searchParams` props that we do for layout and page components. This caused the following issues: - `generateMetadata`/`generateViewport` for a page without params, or with static params, yielded cache misses when resuming - `generateMetadata` for a page/layout with unused params, became dynamic when prerendering a fallback shell - `generateMetadata` for a page with used search params, produced a timeout error during prerendering - `generateViewport` for a page/layout with unused params, produced a build error (unless opting into fully dynamic rendering) Still to be done in a follow-up: Omit unused `params` from cache keys, and upgrade cache keys when they are used, to avoid unnecessary cache misses when resuming. closes NAR-321
-
Zack Tanner authored
We are preparing to enable `clientSegmentCache` by default on canary. To prepare, this splits it into a separate CI runner and adds a failing test manifest so we can incrementally migrate / fix failing tests before stable release.
-
Joseph authored
Closes: https://linear.app/vercel/issue/DOC-5151/unconfigured-image-host --------- Co-authored-by:
Rich Haines <hello@richardhaines.dev>
-
Tim Neutkens authored
## What? Had Claude-4-Sonnet do a pass on optimizing this function. Let's see if the tests pass.
-
Zack Tanner authored
`experimental.ppr` is being superseded by `experimental.cacheComponents` and will not exist in the form that is currently being tested in CI. This frees up these CI resources until we delete the standalone PPR flag. `cacheComponents` is tested via the experimental runners.
-
Luke Sandberg authored
Revert "Revert "Revert "Revert "Add a --webpack flag and default --turbopack to true (#84216)"""" (#84394) Reverts vercel/next.js#84389 Attempt number 3, #84374 fixed propagation of bundler environment variables to vercel cli operations, to ensure the test configuration is respected. [Deployment Tests Run 1](https://github.com/vercel/next.js/actions/runs/18146684793/job/51649631635). A fair number of failures. [Deployment Tests Run 2](https://github.com/vercel/next.js/actions/runs/18154875270). After #84395. These still have a set of failures, but i confirmed that the deployment builds are running `webpack`. The tests that are failing are related to 'prefetches' (test/e2e/app-dir/segment-cache/prefetch-runtime/prefetch-runtime.test.ts and test/e2e/app-dir/segment-cache/prefetch-layout-sharing/prefetch-layout-sharing.test.ts) and generally the error is a timeout. Recent deployment runs for canary releases are also failing, but on different tests. Trying again after #[84419](https://github.com/vercel/next.js/pull/84419). [Deployment Tests Run 3](https://github.com/vercel/next.js/actions/runs/18173375427). Failures appeared flaky, rerunning failures...
-
- 01 Oct, 2025 22 commits
-
-
nextjs-bot authored
-
Jiachi Liu authored
-
Vercel Release Bot authored
This auto-generated PR updates the production integration test manifest used when testing Rspack.
-
Vercel Release Bot authored
This auto-generated PR updates the development integration test manifest used when testing Rspack.
-
nextjs-bot authored
-
Niklas Mischkulnig authored
Turns string decode and parse errors into warnings for extensionless files when in tracing mode. A `require(dynamic)` inside of node_modules can easily end up pulling in extensionless files such as binary files, or `LICENSE`, which would fail the build.
-
Hendrik Liebau authored
As of #49343, in dev mode only, we accidentally change the `metadataBase` from an `URL` instance to a URL string, when passing it to child layouts or pages via the `parent` argument in `generateMetadata`. This is because we clone the metadata object via `JSON.stringify`/`parse` and then freeze it, to prevent relying on mutating resolved metadata. The replacer/reviver functions we used to clone the metadata didn't properly handle preserving `URL` instances as intended, so they were turned into strings. Because user code already had to handle the case of `metadataBase` potentially being a string at runtime in dev mode, we can just officially reflect that as well in our types, not only for the `ResolvedMetadata` input type, but also for the `Metadata` output type. This also enables `'use cache'` being used in `generateMetadata`, because React currently does not support transporting `URL` instances from one environment to another (e.g. `Server` to `Cache`). Note that all other URL properties in `Metadata` and `ResolvedMetadata` already allowed `string`, so this only affects `metadataBase`. To resolve the ambiguity between dev and prod, we're now always transforming all URL instances to strings, before passing the resolved metadata to `generateMetadata`. This is also reflected in the `ResolvedMetadata` type.
-
nextjs-bot authored
Co-authored-by:Sebastian Sebbie Silbermann <sebastian.silbermann@vercel.com>
-
Niklas Mischkulnig authored
<!-- 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 ### 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 # -->
-
Niklas Mischkulnig authored
Use the current result of `baseline widely available` as the default browsers. If we used `baseline widely available` literally, then that would change the targets even within minor versions.
-
Sireesha Aguru authored
PR title - docs: polish Project Structure page (grammar, consistency, clarity) PR description - 1) Fixes an Oxford comma in the routing files description for consistency. 2) Normalizes heading capitalization to sentence case. 3) Corrects “Files conventions” → “File conventions”. 4) Aligns not-found.js description with earlier table (it’s not an error boundary). Clarifies intercepting routes microcopy. <!-- 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 ### 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:
Joseph <joseph.chamochumbi@vercel.com>
-
nextjs-bot authored
Co-authored-by:Sebastian Sebbie Silbermann <sebastian.silbermann@vercel.com>
-
Zack Tanner authored
Reverts vercel/next.js#84250 Need to investigate deployment failures [x-ref](https://github.com/vercel/next.js/actions/runs/18154875270)
-
Tim Neutkens authored
## What? Adds a fast path when there is an existing match already from matching earlier in the request lifecycle. This works for the majority of cases except for Parallel Routes as it will end up finding the wrong bundle path. That is fundamentally related to the implementation of parallel routes and where the bundles are created (under the specific parallel route name). This will need a larger refactor to fix but that doesn't have to block landing the fast path for all other cases.
-
Cong-Cong Pan authored
1. Added functionality to change the package name in the rspack release CI. 2. Fixed a bug in the get_resolve method of the NextExternalsPlugin. 3. Prepared the @next/rspack-core for the 1.0.0 version release.
-
Niklas Mischkulnig authored
To be improved by better NFT....
-
Jiachi Liu authored
-
Jiwon Choi authored
This PR removed the deprecated `unstable_rootParams`. This feature was not documented.
-
nextjs-bot authored
-
Chloe Yan authored
## Overview This PR replaces the existing Next.js boilerplate with a new minimal design in light and dark themes. <img width="1512" height="856" alt="light" src="https://github.com/user-attachments/assets/542f1a8a-3ee1-466d-9446-e7cdb6ecf3b8" /> <img width="3024" height="1710" alt="dark" src="https://github.com/user-attachments/assets/afb89daa-8bcf-4173-9d47-b7fb2fad70bb" /> ## Testing 1. Run `pnpm build` at root 2. Enter the template directory (e.g. `cd packages/create-next-app/templates/app/ts`) then install its dependencies `pnpm i` 3. Run `pnpm next dev packages/create-next-app/templates/app/ts` at root 4. Open [localhost:3000](http://localhost:3000/) --------- Co-authored-by:
graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com> Co-authored-by:
rauno <freiberggg@gmail.com> Co-authored-by:
skullface <skullface@users.noreply.github.com>
-
Jiwon Choi authored
This PR bumps the minimum TS version required for Next.js to `5.1.0`, which is the version that supports React Components that return a promise via `JSX.ElementType`. https://devblogs.microsoft.com/typescript/announcing-typescript-5-1/#decoupled-type-checking-between-jsx-elements-and-jsx-tag-types --------- Co-authored-by:
Sebastian "Sebbie" Silbermann <silbermann.sebastian@gmail.com>
-
Niklas Mischkulnig authored
- should encode chunk path correctly - Run a base version for all bundlers - Use `beforePageLoad` - nonce test: - open page once and wait for scripts to load - doesn't make sense to retry the whole thing
-