1. 11 Feb, 2026 24 commits
    • nextjs-bot's avatar
      v16.2.0-canary.36 · 2009c623
      nextjs-bot authored
      2009c623
    • JJ Kasper's avatar
      docs: update adapter docs for routing, handlers, and PPR (#89849) · be25b831
      JJ Kasper authored
      ## Summary
      - update `experimental.adapterPath` docs to match current
      `onBuildComplete` shape (`routing`, `buildId`, and latest output types)
      - document `@next/routing` usage and note its experimental status
      - add runtime entrypoint signature details for Node.js and Edge
      (`handler(..., ctx)`)
      - add a new PPR implementation section with markdown flow diagrams for
      shell/resume stream composition and `requestMeta.onCacheEntryV2` cache
      updates
      - link to `nextjs/adapter-vercel` as the reference adapter example
      be25b831
    • Sebastian "Sebbie" Silbermann's avatar
    • Niklas Mischkulnig's avatar
      Refactor prerenderManifest passing (#89765) · 486f6744
      Niklas Mischkulnig authored
      In all of these cases, the only reason the prerender manifest was passed
      around was for the previewProps.
      So do that directly instead.
      486f6744
    • Hendrik Liebau's avatar
      Fix cascading LRU eviction during prefetch batches (#89766) · b4724c15
      Hendrik Liebau authored
      When links remount (e.g. toggling between tabs), the prefetch scheduler
      processes tasks across multiple async batches due to network bandwidth
      limits. Between batches, LRU cleanup could fire and evict cache entries
      for tasks that hadn't been processed yet. Those tasks would then see
      cache misses, fetch fresh data, push the LRU over the limit again, and
      trigger more cleanup, cascading through nearly all entries.
      
      We fix this by moving LRU cleanup into the prefetch scheduler loop.
      Instead of scheduling cleanup independently via
      `requestIdleCallback`/`setTimeout`, the LRU module pings the scheduler
      when the cache exceeds its size limit, and the scheduler runs cleanup
      only when it's fully idle (no queued tasks, no in-flight requests). At
      that point, all active prefetch tasks have finished reading from the
      cache, so eviction targets genuinely stale data.
      
      The tradeoff is that the cache can temporarily exceed its size limit
      while prefetch tasks are in flight. This was already the case since
      cleanup was always async, but it's now more explicit since cleanup is
      tied to the scheduler settling rather than the next idle callback.
      b4724c15
    • Sebastian "Sebbie" Silbermann's avatar
    • Tobias Koppers's avatar
      Add CSS URL deployment ID suffix support (#89771) · 24c6e3e4
      Tobias Koppers authored
      ## Summary
      
      Adds deployment ID suffix (`?dpl=<deployment_id>`) to asset URLs referenced in CSS `url()` declarations (images, fonts) for both Turbopack and Webpack builds. This enables proper cache busting for CSS-referenced assets when using `deploymentId` in `next.config.js`.
      
      ### Turbopack
      - Added `static_suffix` field to the existing `UrlBehavior` struct, providing a build-time constant suffix for contexts that cannot use dynamic JS expressions (e.g., CSS `url()` references)
      - CSS URL resolution now calls `url_behavior(None)` and uses `static_suffix` instead of a separate method
      - Wired the suffix from `next.config.js` `deploymentId` through `asset_suffix_path()` into all three chunking contexts (client, server, edge) via `default_url_behavior` and `url_behavior_override`
      
      ### Webpack
      - Passed `deploymentId` through the CSS loader config pipeline (`webpack-config.ts` → `config/index.ts` → `css/loaders/` → `postcss-url-parser.ts`)
      - Appended `?dpl=<id>` to resolved asset URLs in the PostCSS URL parser plugin, placed before any hash fragment so it remains a server-visible query parameter
      
      ### Test
      - Added production test (`test/production/css-url-deployment-id/`) covering global CSS, CSS modules, and SCSS modules with image and font `url()` references
      - Verifies all asset URLs contain the `dpl` query parameter in both Turbopack and Webpack modes
      24c6e3e4
    • Sebastian "Sebbie" Silbermann's avatar
      [devtools] Wrap overlay in Activity (#89818) · 2d185084
      Sebastian "Sebbie" Silbermann authored
      This allows rendering the overlay in the background at a lower priority while it's hidden.
      
      Part of a larger refactor how we sourcemap errors. The end-goal is to lazily do the sourcemapping with some prefetching which should make the overlay more responsive for many errors or errors in modules with large sourcemaps or source content.
      2d185084
    • Sebastian "Sebbie" Silbermann's avatar
    • Sebastian "Sebbie" Silbermann's avatar
    • Sebastian "Sebbie" Silbermann's avatar
    • Tobias Koppers's avatar
      Turbopack: make routes hashes mainfest more incremental (#87107) · ae64f6cf
      Tobias Koppers 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 #
      
      -->
      ae64f6cf
    • Vasiliy Vanchuk's avatar
      docs: correct use term (#89438) · be56ce3a
      Vasiliy Vanchuk authored
      ### What?
      
      `use` is not a hook. It's highlighted in the doc
      
      > Unlike React Hooks, use can be called within loops and conditional
      statements like if. Like React Hooks, the function that calls use must
      be a Component or Hook.
      
      
      ### Why?
      
      It confuses consumers of Next.js and adds field provide misleading
      proofs
      
      ### How?
      
      Closes NEXT-
      Fixes #
      
      -->
      
      ---------
      Co-authored-by: 's avatarJoseph <joseph.chamochumbi@vercel.com>
      Co-authored-by: 's avatarJoseph <sephxd1234@gmail.com>
      be56ce3a
    • Tim Neutkens's avatar
      Remove --turbopack and --webpack flags from create-next-app (#89706) · 0b32ddc6
      Tim Neutkens authored
      ## What?
      
      Remove the `--turbopack` and `--webpack` CLI flags from
      `create-next-app`.
      
      ## Why?
      
      Turbopack is now the default bundler in Next.js. The `--turbopack` flag
      is redundant since it's already the default, and the `--webpack` flag is
      no longer needed as a `create-next-app` option. The only alternative
      bundler flag retained is `--rspack`.
      
      ## How?
      
      - Removed `--turbopack` and `--webpack` option definitions from the CLI
      in `packages/create-next-app/index.ts`
      - Simplified bundler selection logic: defaults to Turbopack, with
      `--rspack` as the only override
      - Removed `--turbopack` documentation from
      `packages/create-next-app/README.md`
      - Removed all `--no-turbopack` flags from test invocations across all
      create-next-app test files
      - Removed `--webpack` test cases from app, pages, and app-api template
      tests
      0b32ddc6
    • Tim Neutkens's avatar
      docs: improve Graphite workflow documentation (#89488) · d95b7bff
      Tim Neutkens authored
      ### What?
      
      Improves the Graphite workflow documentation in
      `.cursor/commands/gt-workflow.md`.
      
      ### Why?
      
      The previous documentation was unclear about when to use `gt` vs `git`
      commands, leading to potential workflow issues.
      
      ### How?
      
      - Clarifies that `gt` should be used for ALL git commands (not just
      specific ones)
      - Adds a critical section about staging changes BEFORE running `gt
      create` to avoid creating empty branches
      - Updates all `git` references to `gt` for consistency (`git show` → `gt
      show`, `git status` → `gt status`, etc.)
      - Improves the command reference table with `gt add`
      - Reorganizes checklists for clarity
      
      ### Improving Documentation
      
      - [x] Run `pnpm prettier-fix` to fix formatting issues before opening
      the PR (handled by lint-staged)
      d95b7bff
    • Niklas Mischkulnig's avatar
    • Luke Sandberg's avatar
      Add support for with `type: "text"` under a new experimental flag, following… · b067991e
      Luke Sandberg authored
      Add support for with `type: "text"` under a new experimental flag, following what webpack did (#89560)
      
      ## Summary
      
      Adds support for the TC39 `import ... with { type: "text" }` proposal to Turbopack, allowing files to be imported as strings.
      
      This is gated behind a new experimental flag `turbopackImportTypeText`.
      
      ```js
      // next.config.js
      export default {
        experimental: {
          turbopackImportTypeText: true,
        },
      }
      ```
      
      ```js
      import text from './file.txt' with { type: 'text' }
      // text is a string containing the file contents
      ```
      
      ### Related TC39 Proposals
      
      - **[`type: "text"`](https://github.com/tc39/proposal-import-text)** - Stage 2 - Import file contents as a string
      - **[`type: "bytes"`](https://github.com/nicolo-ribaudo/proposal-import-bytes)** - Stage 2.7 - Import file contents as a Uint8Array (already supported via `turbopackImportTypeBytes`)
      
      ### Implementation Details
      
      - Created `TextSourceTransform` which transforms any file into an ES module exporting the file contents as a string
      - Added `ResourceHasModifier` rule condition to match on ident modifiers, enabling proper module type resolution after source transforms
      - Refactored `BytesSourceTransform` to use the same pattern for consistency
      - Both transforms add a modifier to the ident (`text_module` / `bytes_module`) for uniqueness, allowing the same file to be imported both normally and with a type attribute
      
      Using a source transform is simpler and allows the modules to participate in other bundler optimizations more easily (scope hoisting in particular)
      
      This also fixes a few bugs where `with` imports would conflict with other module type rules:
        * if you attempted to import a `.js` file with `type:'bytes'` didn't work since the file extension matching would trigger first.
        * if you set a module type rule in your next config it would override the `with` attribute
      
      
      ## Test Plan
      
      - Expanded e2e tests at `test/e2e/turbopack-import-with-type/`
      b067991e
    • Tobias Koppers's avatar
      Add turbopackIgnoreIssue config to suppress Turbopack warnings (#89682) · adcac5df
      Tobias Koppers authored
      ## What?
      
      Adds the `experimental.turbopackIgnoreIssue` configuration option, which allows developers to suppress specific Turbopack warnings and errors based on file path, issue title, and/or description patterns. Filtered issues are hidden from both CLI output and the error overlay.
      
      ## Why?
      
      Developers need a way to suppress noisy or expected warnings from Turbopack without disabling all warnings. This is useful for:
      - Suppressing warnings from third-party code, generated files, or optional dependencies
      - Reducing noise in development server output
      - Hiding expected issues from the error overlay
      
      ## How?
      
      ### Configuration → Filtering Pipeline
      
      1. **Config types** (`packages/next/src/server/config-shared.ts`, `config-schema.ts`):
         Each rule has a required `path` (glob string or RegExp) and optional `title`/`description` (exact string or RegExp). All specified fields must match (AND logic).
      
      2. **RegExp serialization** (`packages/next/src/build/swc/index.ts`):
         Converts RegExp objects to `{ source, flags }` and glob strings to `{ type: 'glob', value }` for transfer to Rust.
      
      3. **Rust deserialization** (`crates/next-core/src/next_config.rs`):
         `TurbopackIgnoreIssueRule`, `TurbopackIgnoreIssuePathPattern`, and `TurbopackIgnoreIssueTextPattern` types deserialize the config. A `turbopack_ignore_issue_rules()` turbo-tasks function converts them to `IgnoreIssue` rules with proper cache invalidation.
      
      4. **Issue filtering** (`turbopack/crates/turbopack-core/src/issue/mod.rs`):
         `IssueFilter` is a turbo-tasks value that holds both severity filters and ignore rules. `IgnoreIssuePattern` supports exact string, glob, and regex matching (using `turbo-esregex` for ES-style regex). Matching issues are excluded before severity filtering.
      
      5. **Integration** (`crates/next-api/src/project.rs`, `route.rs`, `empty.rs`):
         `Endpoint::project()` trait method provides access to the project config. `issue_filter()` builds the `IssueFilter` from project config. All issue collection points use the project's dynamic filter instead of the previous hardcoded `NEXT_ISSUE_FILTER`.
      
      ### Documentation
      
      - New docs page: `docs/01-app/03-api-reference/05-config/01-next-config-js/turbopackIgnoreIssue.mdx`
      - Updated Turbopack reference page with experimental options table: `docs/01-app/03-api-reference/08-turbopack.mdx`
      
      ### Testing
      
      E2E test suite (`test/development/app-dir/turbopack-ignore-issue/`):
      - **With config**: verifies matching warnings are suppressed from CLI output, matching errors are suppressed from the error overlay, and unrelated pages still compile normally
      - **Without config**: verifies warnings and errors appear when no rules are defined
      
      ### Dependencies
      
      - Added `turbo-esregex` for ES-style regex support in Rust
      
      ## Example
      
      ```js
      // next.config.js
      module.exports = {
        experimental: {
          turbopackIgnoreIssue: [
            { path: '**/vendor/**' },
            { path: 'app/**', title: 'Module not found' },
            { path: /generated\/.*\.ts/, description: /expected error/i },
          ],
        },
      }
      ```
      adcac5df
    • Tobias Koppers's avatar
      Turbopack Persistence: Improve heuristic for compacted database access (#89497) · 384cb2da
      Tobias Koppers authored
      ### What?
      
      Adjusts block sizing constants and heuristics in turbo-persistence to improve the balance between small and medium values, reduce block count, and improve access performance.
      
      ### Changes
      
      1. **`MAX_SMALL_VALUE_SIZE`**: 64 KiB → **4 KiB**. Values up to 4 KiB are now stored as small values (packed into shared blocks). Values larger than 4 KiB become medium values with dedicated blocks that can be copied without decompression during compaction.
      
      2. **`MAX_SMALL_VALUE_BLOCK_SIZE` → `MIN_SMALL_VALUE_BLOCK_SIZE`**: Renamed and changed from a maximum (64 KiB) to a **minimum (8 KiB)**. Small value blocks are now emitted once they accumulate at least 8 KiB, resulting in actual block sizes of 8–12 KiB.
      
      3. **`KEY_BLOCK_ENTRY_META_OVERHEAD`**: Updated from 8 to 20 to reflect the actual worst-case overhead per entry in a key block (type, position, hash, block index, size, position in block).
      
      4. **Block count overflow protection**: Added `ValueBlockCountTracker` to prevent exceeding the u16 block index limit (`MAX_VALUE_BLOCK_COUNT = u16::MAX / 2`), which accounts for the 50/50 merge-and-split during compaction.
      
      5. **README**: Updated value type documentation with size boundaries and added a trade-off table covering compression, compaction, access cost, and storage overhead.
      
      ### Value type trade-offs
      
      |                       | Inline    | Small                       | Medium                | Blob                                      |
      | --------------------- | --------- | --------------------------- | --------------------- | ----------------------------------------- |
      | Size                  | ≤ 8 B     | 9 B .. 4 kB                | 4 kB .. 64 MB         | > 64 MB                                   |
      | Compression unit size | ≤ 16 kB   | 8 kB .. 12 kB              | 4 kB .. 64 MB         | > 64 MB                                   |
      | Access cost           | none      | decompress ~8 kB            | decompress value size | open file, decompress value size           |
      | Compaction            | re-compressed | re-compressed            | copied compressed     | pointer copied                             |
      384cb2da
    • Vercel Release Bot's avatar
      Update Rspack development test manifest (#89740) · d7e06519
      Vercel Release Bot authored
      This auto-generated PR updates the development integration test manifest used when testing Rspack.
      d7e06519
    • JJ Kasper's avatar
      Fix devlow job timeouts (#89804) · 5101d049
      JJ Kasper authored
      Attempting to fix the devlow job timeouts that have been happening on
      canary for a bit
      
      x-ref:
      https://github.com/vercel/next.js/actions/runs/21889767463/job/63192963474
      5101d049
    • Vercel Release Bot's avatar
      Update Rspack production test manifest (#89741) · b6311869
      Vercel Release Bot authored
      This auto-generated PR updates the production integration test manifest used when testing Rspack.
      b6311869
    • Benjamin Woodruff's avatar
      Turbopack: Fix slow filesystem benchmark warning for `next dev` (#89798) · 50d61f93
      Benjamin Woodruff authored
      Apparently we broke this about 6 months ago and didn't notice:
      
      - We briefly had both a `println` (legacy) and a compilation event, leading to duplicate logging.
      - First: https://github.com/vercel/next.js/pull/80631 - I added a filter to `backgroundLogCompilationEvents` that inadvertently filtered out `SlowFilesystemEvent` on dev.
      - Around the same time: https://github.com/vercel/next.js/pull/81972 - This removed the old `println` in favor of the compilation event
      
      Changes in this PR:
      
      - Add `SlowFilesystemEvent` to the filter used in dev.
      - Increase the threshold from 100ms to 200ms. I'm concerned that with Turbopack's File System cache, that the FS might be more heavily loaded during this benchmark than it was before, and I'd rather err on the "less aggressive" side.
      - Add a link to https://nextjs.org/docs/app/guides/local-development, which now has documentation on the antivirus thing.
      
      Tested with a threshold of 0ms:
      
      ![Screenshot 2026-02-10 at 5.09.41 PM.png](https://app.graphite.com/user-attachments/assets/e871ad6d-c718-4308-9a14-ba70bda23efb.png)
      
      There's not any easy way to test this, but it's also clearly not a big deal if it does break, as it's just a debugging hint for performance issues.
      50d61f93
    • JJ Kasper's avatar
      Update flakey E2E deploy tests no-prefetch (#89799) · a040e38f
      JJ Kasper authored
      Addressing this test being very flakey as well
      
      x-ref:
      https://github.com/vercel/next.js/actions/runs/21887115229/job/63188106850
      a040e38f
  2. 10 Feb, 2026 15 commits
    • JJ Kasper's avatar
      Update flakey E2E deploy tests (#89792) · 694b3756
      JJ Kasper authored
      These have been flaking for quite a while but when going through the
      steps manually on the deployments they do not repro issues so this
      appears to be flakey assertions from timing.
      
      x-ref:
      https://github.com/vercel/next.js/actions/runs/21881258559/job/63170127185
      694b3756
    • nextjs-bot's avatar
      v16.2.0-canary.35 · 381aa36e
      nextjs-bot authored
      381aa36e
    • Will Binns-Smith's avatar
      Turbopack: extract core hmr client logic into shared runtime (#88912) · d77eb040
      Will Binns-Smith authored
      This PR mostly moves existing code. Most of the diff churn is from re-recording shapshots. This PR is nowhere as scary as the diffstat would have you believe.
      
      This extracts the core HMR client logic, abstracting away hooks for platform-specific features like the websocket transport and page reload.
          
      In a future PR this will be implemented as an in-process backend for nodejs server hmr.
          
      Test Plan: CI, existing hmr tests
      d77eb040
    • Janka Uryga's avatar
      [Instant] Validation on client navs (#89777) · f7dd09fd
      Janka Uryga authored
      This PR makes instant validation work for client navigations, albeit in
      a pretty inefficent way. If we're navigating and have an `instant`
      config somewhere in the tree, we won't skip shared layouts like a client
      navigation usually would. Instead, we render all the shared segments too
      (via `createFullTreeFlightDataForNavigation`, a very simplified
      variation of `walkTreeWithFlightRouterState`) and use them to perform
      instant validation on the current page. The client router doesn't mind
      getting extra segments -- `startPPRNavigation` (and
      `updateCacheNodeOnNavigation` specifically) ignore segments that are
      already present in the old tree.
      
      This approach has some downsides:
      - It doesn't match prod behavior (parent layouts don't render there), so
      it could lead to user confusion
      - We're validating using different segments that the browser actually
      has, so we could see an error in the validation that isn't present in
      the browser
      
      but we'll iterate on this later. We only do this when a page is using
      `instant`, so for now the impact is narrowed down to early adopters.
      
      ### Test changes
      
      For each test case we have, we now run it both on initial load and on
      client nav.
      
      This got somewhat noisy because i had to reorganize the test files a
      bit. We use the index pages to test client navigations, but in order to
      do that, we need the source and the target to be inside the same root
      layout -- otherwise, they'd be an MPA nav.
      f7dd09fd
    • Will Binns-Smith's avatar
      Turbopack: Reorganize runtime files into shared/runtime directory (#89461) · 4385ed36
      Will Binns-Smith authored
      This change moves runtime code that does not use a module system and is concatenated by Rust into a dedicated `runtime/` directory so it's not confused with other code. 
      
      It also codifies this in a README and instructs agents to read nearby READMEs so they enforce this convention.
      
      **This change only moves code and does not refactor any further.** Snapshot updates reflect the new file paths in the generated runtime code.
      
      **Test Plan:** CI, existing tests
      4385ed36
    • Will Binns-Smith's avatar
      Turbopack: Server HMR infrastructure (#88870) · aac4ebb7
      Will Binns-Smith authored
      This adds some basic JavaScript/TypeScript infrastructure for Next to receive and handle server-side HMR updates from Turbopack.
      
      This:
      - Renames some existing hmr code as explicitly client hmr
      - Adds counterpart apis for server hmr (e.g. subscribe to server HMR events via `project.serverHmrEvents()`)
      - Add `__turbopack_server_hmr_apply__` runtime function (this is a stub for now, just logs on updates)
      
      **Alternatives considered**
      A single firehose for hmr events, pushing the filtering to the JS side. I figured separate dedicated apis would be cleaner since they’d have to be filtered and switched on anyway.
      
      **In future PRs**
      - Rust: Make Turbopack send 'partial' updates for server file changes
      - Node dev runtime: Implement module factory replacement in `__turbopack_server_hmr_apply__`
      - add client notification to trigger re-fetch of rsc
      - e2e tests
      aac4ebb7
    • nextjs-bot's avatar
      v16.2.0-canary.34 · a9ecc09b
      nextjs-bot authored
      a9ecc09b
    • Will Binns-Smith's avatar
      Tracing: trace render times as render-path (#89763) · 4d3ccd6a
      Will Binns-Smith authored
      Analagous to the existing compile-path, which records compile times for
      each path in development, we now record path render times as
      `render-path`. It corresponds with the value we write to the tty when
      rendering routes (e.g. `GET / 200 in 228ms (compile: 129ms, render:
      99ms)`).
      
      This change also adds tests for recording hmr data in the trace file.
      
      Test Plan:
      - CI
      - Made changes in a test app and verified the trace file included valid
        entries for these. Confirmed the duration matched what was shown in
      the cli.
      4d3ccd6a
    • Niklas Mischkulnig's avatar
      Improve not-found-with-pages test (#89538) · e8372967
      Niklas Mischkulnig authored
      The fixture contains both App and Pages router
      But the assertions only ever tested the App endpoints
      
      Fixed by https://github.com/vercel/vercel/pull/14878
      
      There is still a bug in the builder:
      ```
      FAIL webpack test/e2e/app-dir/not-found-with-pages-i18n/not-found-with-pages.test.ts (57.396 s)
        not-found-with-pages-i18n
          ✕ should prefer the app router 404 over the pages router 404 when both are present - browser /app-dir/foo (3528 ms)
          ✕ should prefer the app router 404 over the pages router 404 when both are present - browser /foo (401 ms)
          ✓ should prefer the app router 404 over the pages router 404 when both are present - SSR /app-dir/foo (141 ms)
          ✕ should prefer the app router 404 over the pages router 404 when both are present - SSR /foo (249 ms)
      
        ● not-found-with-pages-i18n › should prefer the app router 404 over the pages router 404 when both are present - browser /app-dir/foo
      
          expect(received).toBe(expected) // Object.is equality
      
          Expected: "APP ROUTER - 404 PAGE"
          Received: "PAGES ROUTER - 404 PAGE"
      
            27 |
            28 |       await browser.loadPage(next.url)
          > 29 |       expect(await browser.elementByCss('h1').text()).toBe(
               |                                                       ^
            30 |         'APP ROUTER - 404 PAGE'
            31 |       )
            32 |     }
      
            at toBe (e2e/app-dir/not-found-with-pages-i18n/not-found-with-pages.test.ts:29:55)
      
        ● not-found-with-pages-i18n › should prefer the app router 404 over the pages router 404 when both are present - browser /foo
      
          expect(received).toBe(expected) // Object.is equality
      
          Expected: "APP ROUTER - 404 PAGE"
          Received: "PAGES ROUTER - 404 PAGE"
      
            22 |     async (s) => {
            23 |       const browser = await next.browser(s)
          > 24 |       expect(await browser.elementByCss('h1').text()).toBe(
               |                                                       ^
            25 |         'APP ROUTER - 404 PAGE'
            26 |       )
            27 |
      
            at toBe (e2e/app-dir/not-found-with-pages-i18n/not-found-with-pages.test.ts:24:55)
      
        ● not-found-with-pages-i18n › should prefer the app router 404 over the pages router 404 when both are present - SSR /foo
      
          expect(received).toContain(expected) // indexOf
      
          Expected substring: "APP ROUTER - 404 PAGE"
          Received string:    "<!DOCTYPE html><html lang=\"en\" data-dpl-id=\"dpl_BM4HgVbmReroGBTz3augsyMX43xG\"><head><meta charSet=\"utf-8\" data-next-head=\"\"/><meta name=\"viewport\" content=\"width=device-width\" data-next-head=\"\"/><noscript data-n-css=\"\"></noscript><script defer=\"\" noModule=\"\" src=\"/_next/static/chunks/polyfills-42372ed130431b0a.js?dpl=dpl_BM4HgVbmReroGBTz3augsyMX43xG\"></script><script src=\"/_next/static/chunks/webpack-70c336f9a46f13b1.js?dpl=dpl_BM4HgVbmReroGBTz3augsyMX43xG\" defer=\"\"></script><script src=\"/_next/static/chunks/framework-8c604becf61eba86.js?dpl=dpl_BM4HgVbmReroGBTz3augsyMX43xG\" defer=\"\"></script><script src=\"/_next/static/chunks/main-16ce12b5863057b2.js?dpl=dpl_BM4HgVbmReroGBTz3augsyMX43xG\" defer=\"\"></script><script src=\"/_next/static/chunks/pages/_app-688aa0c7241baf30.js?dpl=dpl_BM4HgVbmReroGBTz3augsyMX43xG\" defer=\"\"></script><script src=\"/_next/static/chunks/pages/404-b7a49e5d00a03545.js?dpl=dpl_BM4HgVbmReroGBTz3augsyMX43xG\" defer=\"\"></script><script src=\"/_next/static/_buildManifest.js?dpl=dpl_BM4HgVbmReroGBTz3augsyMX43xG\" defer=\"\"></script><script src=\"/_next/static/_ssgManifest.js?dpl=dpl_BM4HgVbmReroGBTz3augsyMX43xG\" defer=\"\"></script></head><body><div id=\"__next\"><div><h1>PAGES ROUTER - 404 PAGE</h1><p>This page is using the PAGES ROUTER</p><p>Custom message fetched at build time</p></div></div><script id=\"__NEXT_DATA__\" type=\"application/json\">{\"props\":{\"pageProps\":{\"message\":\"Custom message fetched at build time\"},\"__N_SSG\":true},\"page\":\"/404\",\"query\":{},\"buildId\":\"build-TfctsWXpff2fKS\",\"isFallback\":false,\"isExperimentalCompile\":false,\"gsp\":true,\"locale\":\"en\",\"locales\":[\"en\",\"en-GB\"],\"defaultLocale\":\"en\",\"scriptLoader\":[]}</script></body></html>"
      
            38 |       const ssr = await next.fetch(s)
            39 |       expect(ssr.status).toEqual(404)
          > 40 |       expect(await ssr.text()).toContain('APP ROUTER - 404 PAGE')
               |                                ^
            41 |     }
            42 |   )
            43 | })
      
            at toContain (e2e/app-dir/not-found-with-pages-i18n/not-found-with-pages.test.ts:40:32)
      ```
      e8372967
    • Tim Neutkens's avatar
      Add 2nd cloned body to FinalizationRegistry. Only used RuntimeStyles component for webpack (#88577) · 53481e3f
      Tim Neutkens authored
      ### What?
      
      Reduces memory retention in two areas: response stream cleanup in
      `cloneResponse` and unnecessary runtime style initialization in
      Turbopack mode. Also adds a test fixture for standalone mode fetch
      memory leak detection.
      
      ### Why?
      
      Based on the reproduction provided in #85914, investigating potential
      sources of memory retention. When a `ReadableStream` is tee'd, both
      branches must be cancelled to release connection resources — previously
      only one branch was registered for GC cancellation. Additionally,
      `RuntimeStyles` and `_N_E_STYLE_LOAD` were always initialized even in
      Turbopack mode where they are unused.
      
      ### How?
      
      **`clone-response.ts`**: Register both `cloned1` and `cloned2` bodies
      with the `FinalizationRegistry` so that when either response is garbage
      collected, its stream branch is properly cancelled.
      
      **`app-router.tsx`**: Guard `_N_E_STYLE_LOAD` and style tracking `Set`
      initialization behind `!process.env.TURBOPACK && typeof window !==
      'undefined'`. Rename the component to `RuntimeStylesForWebpack` and skip
      rendering it entirely when using Turbopack.
      
      Fixes #85914
      
      ---------
      Co-authored-by: 's avatarUnghee Lee <unghee66@gmail.com>
      53481e3f
    • Hendrik Liebau's avatar
      [test] Add regression test for segment cache prefetch memory leak (#89756) · a2409549
      Hendrik Liebau authored
      Follow-up to #89610.
      
      Adds an e2e test that detects linear heap growth caused by unclosed
      prefetch response streams. The test cycles through mounting/unmounting
      links to trigger repeated prefetches and LRU evictions, then uses CDP
      heap profiling with linear regression to verify the heap plateaus rather
      than growing steadily.
      
      
      ![heap-growth-chart](https://github.com/user-attachments/assets/6151c0e4-7ae1-4526-b094-8d76154be664)
      a2409549
    • Abhishek Mardiya's avatar
      clarify unstable_cache replacement with use cache (#89435) · a7a01745
      Abhishek Mardiya authored
      There’s an inconsistency in the docs:
      [unstable_cache](https://nextjs.org/docs/app/api-reference/functions/unstable_cache)
      has already been replaced by use cache, so I think the documentation
      should be updated accordingly.
      I’d appreciate it if you could look into this, should that be the case.
      @icyJoseph
      
      <!-- 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: 's avatarJoseph <joseph.chamochumbi@vercel.com>
      a7a01745
    • Niklas Mischkulnig's avatar
      Pass shouldCache to all manifest loading calls (#89713) · c76b0fe2
      Niklas Mischkulnig authored
      A few calls were missing `shouldCache`
      c76b0fe2
    • Vercel Release Bot's avatar
      Update Rspack development test manifest (#89702) · a1cb030e
      Vercel Release Bot authored
      This auto-generated PR updates the development integration test manifest used when testing Rspack.
      a1cb030e
    • Vercel Release Bot's avatar
      Update Rspack production test manifest (#89701) · e407560d
      Vercel Release Bot authored
      This auto-generated PR updates the production integration test manifest used when testing Rspack.
      e407560d
  3. 09 Feb, 2026 1 commit