- 05 Feb, 2026 2 commits
-
-
nextjs-bot authored
-
JJ Kasper authored
-
- 04 Feb, 2026 14 commits
-
-
nextjs-bot authored
-
Janka Uryga authored
Mostly mechanical rename. Also changes the error page to `errors/invalid-instant-configuration`. I'm not really worried about dangling links here because this is a new API and we don't expect anyone to be using it yet.
-
Andrew Clark authored
## Summary Adds `experimental.exposeTestingApiInProductionBuild` to make the Instant Navigation Testing API available in production builds. This is a stopgap until a dedicated "profiling build" mode exists—similar to React's profiling builds that include extra instrumentation without the dev-mode overhead. The testing API lets e2e tests assert on prefetched UI before dynamic data streams in. Previously it was dev-only, but production builds have different timing characteristics (prefetches complete faster, code paths differ), so testing against production builds is valuable. ## Approach Introduces a single bundler environment variable `process.env.__NEXT_EXPOSE_TESTING_API` that's true when either: - Running in dev mode, OR - The experimental flag is enabled This replaces scattered `NODE_ENV !== 'production'` checks throughout the testing API code paths, making the gating logic consistent and centralized in the build configuration. Also renames `dev-navigation-lock.ts` to `navigation-testing-lock.ts` and updates header/cookie names from "dev-only" to "instant-navigation-testing" to reflect that the API is no longer dev-exclusive. ## Test plan - Updated existing e2e tests to run in both dev and production modes - Tests pass with `NEXT_TEST_MODE=start` (production build)
-
Jiachi Liu authored
For forwarded logs, we can also attach the owner stack if it's available, then we can see the proper errors trace shown in the terminal. In this way agent can directly detect where the error is happening from reading terminal log, and fix it | After | Before | |:---|:---| | <img width="937" height="778" alt="image" src="https://github.com/user-attachments/assets/666cc012-4e79-41f4-9d6f-b9c1969316bf" /> | <img width="942" height="641" alt="image" src="https://github.com/user-attachments/assets/a44f795a-d297-4fb8-9efe-25e6e3684014" /> |
-
Niklas Mischkulnig authored
Reapply https://github.com/vercel/next.js/pull/88959 Revert https://github.com/vercel/next.js/pull/89323 Closes PACK-6537 Closes PACK-6756 - Deployment skew (forcing a MPA nav instead of a SPA nav if a deployment happened inbetween) is handled by comparing a header on the client side. - The other case that used build ids was app router, which was changed to the same approach in https://github.com/vercel/next.js/pull/88855 - Then, when a deployment id is available, make the build id a constant - Particularly, this makes the rollout of this much easier as the data route paths stay the same (both in Next.js itself as well as in the builder) If you use `output:export` and set `config.deploymentId` (i.e. enable skew protection) you are still expected to set these headers.
-
Eric Rabinowitz authored
Fixes syntax for the code sample found on https://nextjs.org/docs/pages/guides/multi-zones#routing-requests-using-proxy --------- Co-authored-by:
Joseph <joseph.chamochumbi@vercel.com>
-
Jam Balaya authored
## Summary Remove the [with-tigris](https://github.com/vercel/next.js/tree/canary/examples/with-tigris) example and clean up its references in lint and test configs Build: - Remove with-tigris paths from .eslintignore - Remove with-tigris entry from turbopack-dev-examples-manifest.json Chores: - Delete the with-tigris example directory and all its files ## Why? [@tigrisdata/core](https://github.com/tigrisdata-archive/tigris-client-ts) package hasn't been maintained in 2 years. ## Adding or Updating Examples - [x] The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - [x] Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md cc: @samcx Co-authored-by:
Joseph <joseph.chamochumbi@vercel.com>
-
Niklas Mischkulnig authored
Some better suggestions
-
Andrew Clark authored
Based on: - https://github.com/vercel/next.js/pull/89465 --- The `instant()` testing API allows e2e tests to assert on prefetched UI before dynamic data streams in. This extends it to handle full page navigations: page reloads, plain anchor clicks, and browser back/forward. For client-side navigations, the API uses request headers to trigger static shell rendering. For MPA navigations, headers aren't available, so this uses a cookie-based approach instead. When `instant()` acquires a lock, it sets a cookie that tells the server to render the static shell. When the lock is released, the cookie is cleared and the page reloads to fetch dynamic content. On pages loaded with the test cookie, hydration is skipped entirely and a minimal testing API is set up in the bootstrap script. This is similar to how the `__nextppronly` debug parameter works (an internal experiment that was never shipped). This feature is the productionized version of that approach, designed for actual use in e2e tests. New test cases: - Static shell on page reload - Static shell on plain anchor navigation - Multiple MPA navigations within a single `instant()` scope - Verifies navigations work normally after exiting `instant()` scope
-
Andrew Clark authored
## Summary Adds a dev-mode primitive for writing e2e tests that assert on the prefetched/cached portion of a navigation. The API blocks dynamic data from streaming in until assertions complete, allowing deterministic testing of loading states without race conditions. This gives developers a way to verify that specific UI elements render instantly from cache, rather than relying on network timing. It also reinforces the mental model that navigation performance should be thought of primarily in terms of cached vs. dynamic. This PR implements the primitive that Next.js exposes on the window object. In practice, it's meant to be used via a testing framework integration, like a Playwright helper: ```typescript await instant(page, async () => { await page.click('a[href="/products/123"]'); await expect(page.locator('[data-testid="skeleton"]')).toBeVisible(); }); ``` The implementation forces a prefetch before navigation when inside an `instant` scope (since prefetching is normally disabled in dev), then holds dynamic data until the scope ends. All code is wrapped in dev checks and gets dead code eliminated in production. Current scope is client-side navigations only. SSR/MPA support is planned as a follow-up. ## Test plan - `test/e2e/app-dir/instant-navigation-testing-api` -
Tim Neutkens authored
## What? Use signal-based exit codes when shutting down the Next.js server to prevent the process from waiting for the debugger to disconnect. ## Why? When Node.js devtools are attached (via `--inspect` flag or the Next.js DevTools "Attach debugger" feature), pressing Ctrl+C causes the dev server to hang instead of exiting immediately. This happens because calling `process.exit(0)` makes Node.js treat it as a normal exit, which waits for all debuggers to disconnect before terminating. In contrast, plain Node.js terminates immediately on SIGINT even with a debugger attached, because signal-based termination doesn't wait for debuggers. ## How? Instead of calling `process.exit(0)` after cleanup, use signal-based exit codes: - SIGINT (signal 2) → `process.exit(130)` (128 + 2) - SIGTERM (signal 15) → `process.exit(143)` (128 + 15) This tells Node.js the process was terminated by a signal, which avoids the debugger wait behavior. Changes: - Modified the cleanup function to accept the signal that triggered it - Use `process.exit(signal === 'SIGINT' ? 130 : 143)` instead of `process.exit(0)` - Removed the previous `inspector.close()` workaround as it's no longer needed --------- Co-authored-by:Sebastian Sebbie Silbermann <sebastian.silbermann@vercel.com>
-
Niklas Mischkulnig authored
Part of PACK-6641 We don't have a way to silence (ignore-comment) warnings And additionally, warnings in node_modules are always hidden...
-
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.
-
- 03 Feb, 2026 16 commits
-
-
nextjs-bot authored
-
Niklas Mischkulnig authored
```js class X { [Symbol.for('nodejs.util.inspect.custom')] () { ... } } ``` -
JJ Kasper authored
x-ref: [slack thread](https://vercel.slack.com/archives/C04KC8A53T7/p1770151130656569?thread_ts=1770107873.440639&cid=C04KC8A53T7)
-
Rhys Evans authored
Co-authored-by:Joseph <joseph.chamochumbi@vercel.com>
-
Jam Balaya authored
## Summary Remove the deprecated [with-recoil](https://github.com/vercel/next.js/tree/canary/examples/with-recoil) example and update the examples manifest accordingly Chores: - Delete the examples/with-recoil directory and its contents - Remove the with-recoil entry from test/turbopack-dev-examples-manifest.json ## Why? [Recoil](https://github.com/facebookexperimental/Recoil) was archived by the owner on Jan 2, 2025. ## Adding or Updating Examples - [x] The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - [x] Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md cc: @samcx Co-authored-by:
Joseph <joseph.chamochumbi@vercel.com>
-
Niklas Mischkulnig authored
We use `vc deploy -f`, so the build cache is never read anyway.
-
nextjs-bot authored
-
JJ Kasper authored
This is just an exploration into a deferred entries hook in `next.config` to allow waiting to build specific entries until all other entries have processed allowing external discovery of assets from compilation that can be used in building these deferred entries. x-ref: [slack thread](https://vercel.slack.com/archives/C09125LC4AX/p1767991281352189?thread_ts=1766951034.768869&cid=C09125LC4AX)
-
Jude Gao authored
Fixes #89240 The `agents-md` codemod failed on Windows because it assumed forward slashes in file paths. This caused the doc tree builder to skip files, resulting in an empty index being injected into `AGENTS.md`. The path handling code used string operations like `.split('/')` and `.endsWith('/index.mdx')` which don't work with Windows backslashes. Now uses regex patterns that match both separators: `/[/\\]/` for splitting and `!/[/\\]index\.mdx$/` for filtering. Also normalizes all paths to forward slashes in the output. While here, switched from `execSync` to `execa` for git commands. This is the pattern already used elsewhere in the codemod package (`upgrade.ts`, `handle-package.ts`) and passes arguments as an array instead of shell string interpolation. Tests were replaced with e2e tests that run the full CLI and include a cross-platform path normalization test case. -
zoomdong authored
Support https://webpack.js.org/configuration/output/#outputchunkloadingglobal for turbopack Runtime code. In utoo case, we need to support the iframe apps or micro frontend apps. If the master apps and slave apps both use turbopack to build, it will cause the variable `globalThis.TURBOPACK` conflict. More details refer to: https://github.com/utooland/utoo/issues/2526
-
JJ Kasper authored
This renames the variable for clarity as we've had issues with unit mismatch with this constant specifically. Also fixes usage which was working accidentally because we converted it to a negative unit which is always in the past. x-ref: [slack thread](https://vercel.slack.com/archives/C02K2HCH5V4/p1770137071766599?thread_ts=1769515738.350369&cid=C02K2HCH5V4)
-
nextjs-bot authored
-
nextjs-bot authored
-
nextjs-bot authored
-
Niklas Mischkulnig authored
Closes PACK-6536 - with deployment id available: a header contains the process.env.NEXT_DEPLOYMENT_ID , the client knows its dpl id already, so we can use that already - with deployment id unavailable: a response field contains the BUILD_ID, keep the existing logic of storing the build id in the browser It's unfortunate that we have to keep the BUILD_ID response field approach as a fallback, but oh well. This has the benefit that we won't need the build id anymore when the deployment id is available. If you use `output:export` and set `config.deploymentId` (i.e. enable skew protection) you are still expected to set these headers. --- - [x] Fallback behavior for when there is no deployment id - [ ] Run deployment tests
-
Joseph 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? Updated `docs/01-app/02-guides/package-bundling.mdx` to use multi-package manager syntax for `next experimental-analyze` commands. ### Why? To clarify the correct way to run `next experimental-analyze` with different package managers (npx, yarn, pnpm), preventing common mistakes like using `pnpx` instead of `pnpm next` for local binary execution. ### How? Added `yarn next experimental-analyze` and `pnpm next experimental-analyze` alternatives to the `npx next experimental-analyze` code blocks in Step 1 and Step 4. Closes NEXT- Fixes # --> --- [Slack Thread](https://vercel.slack.com/archives/C046HAU4H7F/p1770024460553639?thread_ts=1770024460.553639&cid=C046HAU4H7F) <a href="https://cursor.com/background-agent?bcId=bc-9b5e5ceb-78cf-5495-953e-53c04d01399c"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> <a href="https://cursor.com/agents?id=bc-9b5e5ceb-78cf-5495-953e-53c04d01399c"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> --------- Co-authored-by:
Cursor Agent <cursoragent@cursor.com>
-
- 02 Feb, 2026 8 commits
-
-
nextjs-bot authored
-
Hendrik Liebau authored
Follow-up to #89407. Disables Server Function logging for `'use cache'` functions called from the client. The logging output for these Server Functions needs more work to be useful. Currently it shows internal details like `$$RSC_SERVER_CACHE_0` instead of the actual function name, as well as the encoded bound args promise.
-
JJ Kasper authored
Partial revert of https://github.com/vercel/next.js/pull/89269 the additional tracing is still necessary for webpack so this re-adds that and removes the silent failing to register require-hook. E2E deploy tests run https://github.com/vercel/next.js/actions/runs/21599777917
-
Hendrik Liebau authored
Restores Server Function logging to be enabled by default during development, as originally implemented in #88277. The change to opt-in in #89321 was overly conservative. The implicit default in #88277 was an intentional design decision. Users can still opt out via `next.config.js`: ```js module.exports = { logging: { serverFunctions: false, }, } ``` For `'use cache'` Server Functions called from the client, the logging still needs more work. We'll disable it for those in a follow-up PR rather than gating the entire feature. Also fixes a pre-existing error where `'verbose'` from the deprecated `experimental.browserDebugInfoInTerminal` config wasn't properly normalized to `logging.browserToTerminal`. This was now surfaced because the default `logging` value object was not typed as `LoggingConfig`. <!-- 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 # --> -
Jan Amann authored
I noticed the snippets were slightly broken when copying them to an app. <!-- 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>
-
Pavan Shinde authored
-
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.
-