- 11 Oct, 2025 4 commits
-
-
nextjs-bot authored
-
Cong-Cong Pan authored
should use `secrets.NPM_TOKEN_ELEVATED` to `env.NPM_TOKEN`
-
Vercel Release Bot authored
This auto-generated PR updates the development integration test manifest used when testing Rspack.
-
Vercel Release Bot authored
This auto-generated PR updates the production integration test manifest used when testing Rspack.
-
- 10 Oct, 2025 20 commits
-
-
nextjs-bot authored
-
Jiwon Choi authored
ESLint plugin defaults to flat config, and we also dropped the built-in lint check at https://github.com/vercel/next.js/pull/83136, so we can sunset the deprecated ESLint v8 testing.
-
Jiwon Choi authored
Installing `@next/third-parties` warns about peerDeps `next@16.0.0-beta.0` ``` Results: 0 errors 41 unmodified 0 skipped 0 ok Time elapsed: 2.276seconds
✔ Codemods have been applied successfully.⚠ Found 1 dependency that seem incompatible with the upgraded package versions. You may have to update these packages to their latest version or file an issue to ask for support of the upgraded libraries. @next/third-parties 16.0.0-beta.0 └── ✕ unmet peer next@"^13.0.0 || ^14.0.0 || ^15.0.0": found 16.0.0-beta.0 ``` --------- Co-authored-by:vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
-
Luke Sandberg authored
[turbopack] Fix a few references to caching configuration as it is no longer canary guarded (#84761)
-
Jiwon Choi authored
When using `proxy`, the `Compiled X in ...` message in Turbopack had hardcoded `middleware`. Therefore, modify to display `proxy` if using a proxy. Also, Webpack displayed with a leading slash `/proxy`, which could be misinterpreted as a route, so I removed the leading slash.
-
Luke Sandberg authored
This optimization is enabled by default and we already link to the docs so referencing the configuration option is more misleading than helpful. Fixes https://github.com/vercel/feedback/issues/111264
-
Josh Story authored
When Next.js prerenders with Cache Components enabled it will abort prerenders before they have completed. It is common for user code to log in a catch block and with this new prerendering behavior these logs will trigger frequently for cases where the rejection only happened because we are abandoning the work. This is analagous to treating a fetch rejection as an error even when you pass an abortSignal into the fetch and then abort it. Currently when logs occur after an aborted prerender we dim the log output to signify that the log line is not particuarly important. This is useful and for folks who want to see everything output by their program this is potentially the best behavior. However many log collectors don't support colors and have no way of contextualizing the dimmed log which can lead to them appearing to be more significant than they are. To combat this we expose a new experimental flag that allows you to completely disable logs after aborting. This means the log lines you see are much higher signal. The implementation is somewhat complex because we install the environment extensions as early as possible before any user code can run but we can't install the hiding behavior until we have a config in scope. I've added the hiding installation to next-server and the worker exportPages entrypoints. I believe this is sufficient to cover all contexts in which we will prerender.
-
Joseph authored
The pattern we use in other `config` metadata is to use the `config` name.
-
Jiwon Choi authored
Currently, it always logs 15 migration docs when upgrading, so version gate it. ``` Results: 0 errors 41 unmodified 0 skipped 0 ok Time elapsed: 2.276seconds
✔ Codemods have been applied successfully. Please review the local changes and read the Next.js 15 migration guide to complete the migration. https://nextjs.org/docs/canary/app/building-your-application/upgrading/version-15 ``` -
Niklas Mischkulnig authored
No need to use a hashmap here.
-
Jiwon Choi authored
Not affect release. Just a follow-up for https://github.com/vercel/next.js/pull/84726 Improved comment of emphasizing we should set the codemod version to the canary version for upgrading canary to canary.
-
nextjs-bot authored
-
Jiwon Choi 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 # -->
-
JJ Kasper authored
Ensures we use correct tag for beta publish same as rc publish.
-
Luke Sandberg authored
Previously we would `eprintln!` in this case, but that is missing key source information that would help with debugging. Example warning (i hacked the limit to be lower to make this less tedious to repro):  If there are more than 10K matches we will issue this warning. A tricky thing is that because we issue this warning during the module graph construction, but `resolve_reference` won't be called again for a FileSource reference during chunking the issue actually wouldn't get emitted. The fix is to drop the `take_issues` call inside of `whole_app_module_graphs` in production builds.
-
Benjamin Woodruff authored
Adds a bit more context about the current state of the world. Adds a warning if you set this to anything other than `undefined` on Turbopack: 
-
Benjamin Woodruff authored
Noticed this on https://github.com/vercel/next.js/pull/84673 We don't run rspack test on every PR, so this wasn't caught before.
-
nextjs-bot authored
-
Zack Tanner authored
This ensures we captured `middlewareClientMaxBodySize` in the config schema and rather than triggering a hard error, it will buffer up to the limit.
-
JJ Kasper authored
Corrects the expired/stale checks in the tags manifest and updates test case to capture this.
-
- 09 Oct, 2025 16 commits
-
-
Sam Selikoff authored
-
nextjs-bot authored
-
Jimmy Lai authored
 - update codemod script - upgrade both release scripts, not sure which one is correct <!-- 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:
graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com> Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
nextjs-bot authored
-
Wyatt Johnson authored
### What? Adds build-time validation to require explicit `default.js` files for all parallel route slots (except the implicit "children" slot). This validation is implemented in both Webpack and Turbopack bundlers. ### Why? Parallel routes without `default.js` files currently cause silent 404 errors when users navigate to those routes. This creates confusion and hard-to-debug issues because the routes appear to be configured correctly but fail at runtime without any indication of what went wrong. By making this validation explicit at build time, developers get immediate feedback about missing required files with clear error messages and documentation links, catching configuration mistakes before deployment. ### How? **Rust/Turbopack** (`crates/next-core/src/app_structure.rs`): Added `MissingDefaultParallelRouteIssue` that emits a build error when a parallel route slot is missing its `default.js` file. The validation is skipped for the "children" slot since it's implicit and doesn't require a default file. **Webpack** (`packages/next/src/build/webpack/loaders/next-app-loader/index.ts`): Added validation that throws `MissingDefaultParallelRouteError` when `default.js` cannot be resolved. The "children" slot falls back to the existing `PARALLEL_ROUTE_DEFAULT_PATH` behavior for backward compatibility. **Error Class** (`packages/next/src/shared/lib/errors/missing-default-parallel-route-error.ts`): New error type with helpful messaging that includes the slot path, explanation of the requirement, and a link to documentation. **Migration Path**: Users who want the previous 404 behavior can explicitly create a `default.js` that calls `notFound()`, or return `null` for empty slots: ```tsx import { notFound } from 'next/navigation' export default function Default() { notFound() } ``` Users can also run the following Deno script to generate the default files for them: https://gist.github.com/wyattjoh/ba7263ecb637ef399d3e3e4db63ffbd6 **Breaking Change**: This is a breaking change timed for Next.js 16 beta. Builds will now fail if parallel route slots are missing required `default.js` files. -
JJ Kasper authored
-
Steven authored
[Breaking] feat(next/image)!: add support for `images.dangerouslyAllowLocalIP` and `images.maximumRedirects` (#84676) This PR adds a two new options and sets a strict default value for each. - `images.dangerouslyAllowLocalIP` - `images.maximumRedirects` ### dangerouslyAllowLocalIP In rare cases when self-hosting Next.js on a private network, you may want to allow optimizing images from local IP addresses on the same network. However, this is not recommended for most users so the default is `false`. > [!NOTE] > BREAKING CHANGE: This change is breaking for those who self-hosting Next.js on a private network and want to allow optimizing images from local IP addresses on the same network. In those cases, you can still enable the config. ### maximumRedirects Since are also testing redirects for local IPs, we can also reduce the maximum number of redirects to 3 by default. Unlike normal websites which might redirect for features like auth, its unusual to have more than 3 redirects for an image. In some rare cases, developers may need to increase this value or set to `0` to disable redirects. > [!NOTE] > BREAKING CHANGE: This change is breaking for those who need image optimization to follow more than 3 redirects.
-
Jiwon Choi authored
This PR modifies Image behavior to require `images.localPatterns.search` value when used with search queries in the `src` property: ```jsx // Error <Image src="/api/user?id=1" width="50" height="50" /> ``` ```ts // next.config.ts export default { images: { localPatterns: [ { pathname: '/api/user', // Either set explicit query string or leave undefined to match all search: '?v=2', }, ], }, } ``` It is to prevent malicious actors like Denial of Wallet (DoW) attacks and strictly match the search queries for image optimization. The deprecation warning was added at https://github.com/vercel/next.js/pull/82627 --------- Co-authored-by:Steven <steven@ceriously.com>
-
Zack Tanner authored
This provides a way to refresh the client cache from within a server action. This is useful when you need to refresh the client UI / read your writes without needing to rely on `updateTag`. --------- Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
JJ Kasper authored
Closes: https://github.com/vercel/next.js/pull/84484
-
Karl Horky 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 # --> ### What? Make a note about the `$ACTION_` properties in `formData` ### Why? Starting with next@14.1.3, `$ACTION_` properties have appeared in the `formData`, which cause validation errors when used with a strict validation with a library such as Zod or Yup: ```tsx // Form Client Component export default function Form() { const [state, formAction] = useFormState(action, { type: 'initial', }); return ( <form action={action}> {/* ... */} </form> ); } // Server Action export async function action( prevState: ServerActionReturnValue, formData: FormData, ): Promise<ServerActionReturnValue> { const validationResult = await schema.validate( Object.fromEntries(formData.entries()), ); ``` The errors from Yup: Errors: - this field has unspecified keys: $ACTION_REF_1, $ACTION_1:0, $ACTION_1:1, $ACTION_KEY The data in the formData.entries() ```js { '$ACTION_REF_1': '', '$ACTION_1:0': '{"id":"59f475b...","bound":"$@1"}', '$ACTION_1:1': '[{"type":"initial"}]', '$ACTION_KEY': 'k187677481', // Real form data starts here: year: '2024', ``` ### How? 1. Document additional properties with keys starting with the prefix `$ACTION_` 2. Remove the obsolete mention of `.entries()`, since that is not being used in the code example anymore (previously, it was `const rawFormData = Object.fromEntries(formData.entries())`) ### History - The `$ACTION_` property change was added in https://github.com/vercel/next.js/pull/63048 - The `docs/01-app/02-guides/forms.mdx` file was added in PR https://github.com/vercel/next.js/pull/79288 , without the `$ACTION_` property change cc @delbaoliveira Co-authored-by:
Joseph <joseph.chamochumbi@vercel.com>
-
Jiwon Choi authored
Reverts vercel/next.js#84239 [slack thread](https://vercel.slack.com/archives/C06DGJ420TZ/p1760022841341369?thread_ts=1759907388.654779&cid=C06DGJ420TZ)
-
Jiwon Choi authored
### Why? When SSG, the pages can bail out when detected a dynamic usage. However, the routes that bailed out were still marked as SSG, which can confuse the users. ### How? Remove the bailed-out routes from the SSG routes list. If there are no more SSG routes for the dynamic route, mark it as dynamic in Build CLI. #### Before - Has 1, 2, 3, even though they bailed. ``` Route (app) Size First Load JS ┌ ○ /_not-found 0 B 114 kB └ ● /[id] 0 B 114 kB ├ /1 ├ /2 └ /3 + First Load JS shared by all 114 kB ├ chunks/29c57ad6b43f6070.js 75.8 kB ├ chunks/df142624801412ea.js 24.3 kB └ other shared chunks (total) 13.5 kB ○ (Static) prerendered as static content ● (SSG) prerendered as static HTML (uses generateStaticParams) ``` #### After - No longer has 1, 2, 3, and the route is marked as dynamic. ``` Route (app) Size First Load JS ┌ ○ /_not-found 0 B 114 kB └ ƒ /[id] 0 B 114 kB + First Load JS shared by all 114 kB ├ chunks/4963d796c068bb13.js 24.3 kB ├ chunks/f59bbf014aa0eff6.js 75.8 kB └ other shared chunks (total) 13.5 kB ○ (Static) prerendered as static content ƒ (Dynamic) server-rendered on demand ``` Fixes https://github.com/vercel/next.js/issues/76507 Closes NAR-194 --------- Co-authored-by:Wyatt Johnson <accounts+github@wyattjoh.ca>
-
brock-statsig authored
### What? Statsig is a popular AB Testing/ Feature Flagging solution to use in concert with Next.js. Today, their newest Server SDK doesn't play nicely with Next as its build around a Rust library, which doesn't play nice with webpack and causes build issues. ### Why? This'll remove a step for Statsig/Next developers having to troubleshoot and add @statsig/statsig-node-core to serverExternalPackages themselves. ### How? Added to the list published here: https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages
-
Steven authored
We took a look at unique Next.js projects that have one or more requests for a specific image size and here are the findings as seen from the Image Optimization API: - `w=16` 4.2% - `w=32` 17.1% - `w=48` 21.4% - `w=64` 22.6% - `w=96` 25.8% - `w=128` 29.5% - `w=256` 46.5% - `w=384` 35.1% - `w=640` 57.2% Only 4.2% of Next.js projects ever made a request to a 16px width image. This is low enough to remove from the default configuration so that all other projects can benefit from reduced html [srcset](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/srcset) and fewer variations exposed from the backend API. You might think that this means few developers are using `<Image width={16} />` but it probably means that most displays nowadays use devicePixelRatio 2 meaning that specifying a 16px image width will actually fetch the 32px width to ensure it won't looking blurry on your retina display. BREAKING CHANGE: this is technically a breaking change but it won't cause apps to stop working, its just 4% of them may have some requests serve a 32px image instead of 16px. Those apps can of course opt in by changing their `images.imageSizes` config back to allowing 16.
-
nextjs-bot authored
-