1. 13 Feb, 2026 4 commits
    • nextjs-bot's avatar
      v16.2.0-canary.41 · 8b2b0a6f
      nextjs-bot authored
      8b2b0a6f
    • Will Binns-Smith's avatar
      Turbopack hmr: fix missing factories (#89934) · dbb7791e
      Will Binns-Smith authored
      This fixes a bug introduced in d77eb040 where
      installCompressedModuleFactories would skip installing factories for an
      entire group of module IDs if any ID in the group already had a factory
      registered.
      
      Test Plan: build
      https://github.com/vercel/workflow/tree/main/workbench/nextjs-turbopack
      dbb7791e
    • Matt Mastracci's avatar
      [turbopack] Add #[derive(ValueToString)] and convert ~45 manual impls (#89788) · 5070ad0d
      Matt Mastracci authored
      ## What
      
      Add a `#[derive(ValueToString)]` proc macro and convert ~45 manual `ValueToString` implementations across turbopack crates to use it (-660 lines of boilerplate, 49 files touched).
      
      ## Why
      
      Nearly every `ValueToString` impl follows the same pattern: format some fields into a string, possibly awaiting `Vc` values first. These hand-written impls are noisy boilerplate that obscure the actual format string.
      
      ## How
      
      The derive macro generates the `#[turbo_tasks::value_impl] impl ValueToString` block automatically. A helper trait `ValueToStringify` with a blanket impl for `Display` and specializations for `Vc<T>`/`ResolvedVc<T>` handles async resolution of fields.
      
      ### Supported forms
      
      - **No attribute** — delegates to `Display::to_string(&self)`
      - `#[value_to_string("constant")]` — emits `rcstr!` directly
      - `#[value_to_string("{field} text {other_field}")]` — auto-resolves named/positional fields via `ValueToStringify`
      - `#[value_to_string("fmt {}", expr1, expr2)]` — explicit expressions as format args
      - `#[value_to_string(expr)]` — single expression delegation
      
      Enums support per-variant attributes (defaulting to variant name) or a single top-level attribute.
      5070ad0d
    • Joseph's avatar
      docs: adapterPath amends (#89930) · 02f2183d
      Joseph authored
      - use experimental versioning
      - fix spacing for graphs
      - spacing in [!NOTE]
      02f2183d
  2. 12 Feb, 2026 20 commits
    • nextjs-bot's avatar
      v16.2.0-canary.40 · ea8651a7
      nextjs-bot authored
      ea8651a7
    • Luke Sandberg's avatar
      Add a better error message for when turbopack cannot be loaded (#89633) · 462b116a
      Luke Sandberg authored
      Add a more direct error message when next is running on a platform that turbopack doesn't support
      
      document supported turbopack platforms
      
      ## Testing
      
      To test i just set `NEXT_TEST_WASM=1` and ran a build
      
      ```
      Error: Turbopack is not supported on this platform (darwin/arm64) because native bindings are not available. Only WebAssembly (WASM) bindings were loaded, and Turbopack requires native bindings.
      
      To use Next.js on this platform, use Webpack instead:
        next dev --webpack
      
      For more information, see: https://nextjs.org/docs/app/api-reference/turbopack#supported-platforms
          at ignore-listed frames
      
      ```
      so it should work.  Messaging probably could be better (there is also a messge about not being able to set the lockfile) but this should be much better
      
      Fixes #89305
      462b116a
    • nextjs-bot's avatar
    • nextjs-bot's avatar
      v16.2.0-canary.39 · ceb281e1
      nextjs-bot authored
      ceb281e1
    • Will Binns-Smith's avatar
      Trace upload: include experimental flag states (#89845) · b3774eae
      Will Binns-Smith authored
      This includes the set of experimental flag states in events sent to the
      trace upload receiver when `--experimental-trace-upload` is set. It only
      includes a subset of experimental flags (so things like the trace upload
      flag itself isn't meaninglessly sent).
      
      Since reporting is often limited to the scope of a single span, the flag
      state attributes are denormalized and copied onto every descendent span.
      Limiting the set of flags prevents this from being unnecessarily large.
      
      Test Plan: Added `test/development` test and built an app and verified
      these tags are sent with `NEXT_TRACE_UPLOAD_DEBUG`
      
      ---------
      Co-authored-by: 's avatarvercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
      Co-authored-by: 's avatarLuke Sandberg <lukesandberg@users.noreply.github.com>
      b3774eae
    • Andreas Lubbe's avatar
      Fix memory leak in dev mode caused by fast-set-immediate (#89779) · 8266e03a
      Andreas Lubbe authored
      ## Summary
      
      Fixes dev-time memory retention in `fast-set-immediate` caused by module
      re-evaluation chaining patched globals.
      
      ## Root Cause
      
      In dev/HMR, `fast-set-immediate.external` can be re-evaluated multiple
      times.
      On each evaluation, it captured `globalThis.setImmediate`,
      `globalThis.clearImmediate`, and `process.nextTick` as “originals”. If
      those were already patched, new patched closures referenced older
      patched closures, retaining old module graphs.
      
      I have 2GB local heapdump from a few minutes before the local dev server
      crashed OOM that looks like this because of it:
      <img width="632" height="253" alt="Screenshot 2026-02-10 at 18 49 24"
      src="https://github.com/user-attachments/assets/8162b042-ae5a-4289-9166-b11d6374a57a"
      />
      
      ## What Changed
      
      - Added a process-wide sentinel of base/original timer functions on
      `globalThis`:
        - `Symbol.for('next.fast-set-immediate.originals')`
      - `originalSetImmediate`, `originalClearImmediate`, and
      `originalNextTick` now always resolve from that base sentinel, not from
      currently patched globals.
      - Kept the existing patch behavior/API surface:
        - `install()` still runs at module load
      - `DANGEROUSLY_runPendingImmediatesAfterCurrentTask`,
      `expectNoPendingImmediates`, and `unpatchedSetImmediate` exports remain
      available
      
      ## Tests
      
      `module re-evaluation` test now verifies `unpatchedSetImmediate` remains
      bound to the same base/original function across repeated
      `jest.resetModules()` reloads, and is not rebound to the previously
      patched global.
      8266e03a
    • Janka Uryga's avatar
      [Instant] Fix crash with search params (#89922) · f9d5df3b
      Janka Uryga authored
      In dev validation, we're disassembling a payload from a dynamic render.
      If the request had search params, page segments in the router state will
      have them attached: `__PAGE__?{"q":"123"}`. In
      `findNavigationsToValidate`, we do the equivalent of constructing a
      flightRouterState, so we need to match that, otherwise we'll name the
      segment `__PAGE__` instead and then can't look it up in the cache, and
      crash during validation.
      f9d5df3b
    • Luke Sandberg's avatar
      Change UrlBehavior.static_suffix to ResolvedVc<Option<RcStr>> (#89921) · 14865920
      Luke Sandberg authored
      ## Summary
      
      Changes `UrlBehavior.static_suffix` from `Option<RcStr>` to `ResolvedVc<Option<RcStr>>` so that `css_url_suffix` stays as a Vc longer instead of being eagerly resolved at the call site. This improves caching behavior by keeping the value cell-based through the chunking context construction.
      
      - Updated `UrlBehavior` struct definition in `turbopack-core`
      - Updated default fallbacks in browser/nodejs chunking contexts
      - Updated CSS url reference consumer to `.await?` the `ResolvedVc`
      - Replaced `.owned().await?` with `.to_resolved().await?` in next-core callers
      14865920
    • nextjs-bot's avatar
      v16.2.0-canary.38 · 002f5197
      nextjs-bot authored
      002f5197
    • Matt Mastracci's avatar
      [turbopack] Simplify JS `ChunkItem` with a single impl in most cases (#89548) · ff636469
      Matt Mastracci authored
      # What
      
      Removes the vast majority of `ChunkItem` implementations in favour of
      one `EcmascriptModuleChunkItem`.
      
      # Why
      
      Almost all of the `ChunkItem` implementations are trivial and were, for
      the most part, just places where additional traits could be implemented.
      
      By removing all of the various, trivial implementations, this might open
      up opportunities to better implement other features across the entire
      codebase.
      
      # How
      
      Most chunk items are migrated over to EcmascriptModuleChunkItem. The
      EcmascriptChunkPlaceable trait gains three new methods that modules can
      optionally override:
      
        -  `chunk_item_content()` - generates the chunk item's JavaScript code
      - `chunk_item_content_ident()` - returns the content identity for cache
      invalidation
      - `chunk_item_output_assets()` - returns output assets the chunk item
      depends on
      
      The generic EcmascriptModuleChunkItem delegates to these trait methods,
      eliminating the need for per-module wrapper structs.
      ff636469
    • Tobias Koppers's avatar
      Turbopack: Pass asset_suffix_path as Vc (#89899) · 9b0277f0
      Tobias Koppers authored
      ## Summary
      - Pass `asset_suffix_path` as `Vc<Option<RcStr>>` instead of eagerly resolving it to `Option<RcStr>` in the chunking context option structs
      - Add filesystem cache size growth assertions to e2e tests to detect unbounded cache growth regressions
      
      ## Why
      
      Previously, `css_url_suffix` was eagerly awaited in `project.rs` before being passed into `ClientChunkingContextOptions`, `ServerChunkingContextOptions`, and `EdgeChunkingContextOptions`. This caused a new chunking context `Vc` to be created for every build, duplicating the entire build in cache and recompiling it.
      
      By keeping it as a `Vc`, the chunking context identity is stable across builds, preventing unnecessary cache duplication.
      
      ## How
      
      - Changed `css_url_suffix` field from `Option<RcStr>` to `Vc<Option<RcStr>>` in all three chunking context option structs
      - Removed `.owned().await?.clone()` in `project.rs` (3 call sites), passing the `Vc` directly
      - Added `.owned().await?` at the point of use in the 5 context builder functions
      - Added cache size measurements to `filesystem-cache.test.ts`: normal changes limited to 10% growth, renames allow up to 50% due to dead cache entries
      9b0277f0
    • Joseph's avatar
    • Sebastian "Sebbie" Silbermann's avatar
      [fragment-scroll] Add `experimental.appNewScrollHandler` (#83107) · 3dafc76f
      Sebastian "Sebbie" Silbermann authored
      Just plumbing and enabling that flag in the experimental shards. The flag will enable our Layout router to use Fragment refs for scroll restoration. Implementation will be done in a follow-up.
      3dafc76f
    • Sebastian "Sebbie" Silbermann's avatar
      [fragment-scroll] Cleanup scroll and focus restoration in layout router (#83110) · 507ab36d
      Sebastian "Sebbie" Silbermann authored
      Just removing some unnecessary runtime checks and typecasts to make future diffs smaller.
      507ab36d
    • Tobias Koppers's avatar
      Turbopack: Store task error as pointer to the source error (#89293) · d41c50b8
      Tobias Koppers authored
      Store task error as pointer to the source error
      
      <!-- 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 #
      
      -->
      d41c50b8
    • Vercel Release Bot's avatar
      Update Rspack development test manifest (#89811) · 5415c3f3
      Vercel Release Bot authored
      This auto-generated PR updates the development integration test manifest used when testing Rspack.
      5415c3f3
    • JJ Kasper's avatar
      test: allow query suffix in related media URL e2e assertions (#89872) · 51d97c8b
      JJ Kasper authored
      ## Summary
      - apply the same deploy query-suffix tolerance (`(?:\?.*)?`) to related
      e2e background-image URL assertions
      - update SCSS URL tests (`url-global-partial`,
      `url-global-asset-prefix-1`, `url-global-asset-prefix-2`) and
      `url-imports` CSS background-image assertion
      
      ## Context
      - follow-up to #89856, which applied this fix to `url-global`
      
      ## Verification
      - regex sanity checks with and without query suffixes passed
      - attempted local `testonly` run for `url-imports`, but local
      Turbopack+urlImports limitations caused unrelated failures
      51d97c8b
    • Andrew Imm's avatar
      Allow sitemap.ts and sitemap/page.tsx to coexist in Turbopack (#89789) · b6cf46a8
      Andrew Imm authored
      Solves #78609
      
      Today, Turbopack maps `app/sitemap.ts` to an AppPage of `/sitemap/route`, and `app/sitemap/page.tsx` maps to `/sitemap/page`, which leads to a conflict.
      
      This treats sitemap.xml the same way as robots.txt and site.webmanifest, and puts the xml extension in the AppPage, and not later in the path resolution. This creates an AppPage of `/sitemap.xml/route` which no longer conflicts. This is pretty much what webpack was doing.
      
      Because the page segment is now sitemap.xml, I had to update downstream logic for routes that export sitemap / generateSitemap.
      
      The turbopack-utils is needed for dynamic sitemap routes like the example here: https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap#generating-multiple-sitemaps
      
      In that setup, when a request for /product/sitemap/1.xml comes in, the "multiple" matcher matches and definition.page is "/product/sitemap/[__metadata_id__]/route". This becomes the page in the hot reloader. After that, normalizedPageToTurbopackStructureRoute strips [__metadata_id__] and it becomes /products/sitemap, but our updated Rust key is now /products/sitemap.xml/route... so add back the .xml!
      
      My demo app tests four things in parallel:
      1) app/sitemap.ts renders at /sitemap.xml
      2) app/sitemap/page.tsx renders at /sitemap and the two do not conflict 3) app/product/sitemap.ts works when generating a static sitemap (/product/sitemap.xml) 4) app/product/sitemap.ts works when generating a dynamic sitemapo (/product/sitemap/1.xml) as in the linked docs above
      
      Also I asked Claude if I've fixed all the relevant codepaths, and here's its output:
      
      ```
        Case 1: Single dynamic sitemap — app/products/sitemap.ts (no generateSitemaps)
        - Input page: /products/sitemap.xml/route, ext: .ts
        - Strip /route → /products/sitemap.xml
        - No [__metadata_id__] → skip
        - Doesn't end with /sitemap (ends with /sitemap.xml) → skip
        - Add /route → /products/sitemap.xml/route
        - Entry key: /products/sitemap.xml/route ✓
      
        Case 2: Multi-dynamic sitemap — app/products/sitemap.ts with generateSitemaps
        - Input page: /products/sitemap/[__metadata_id__]/route, ext: .ts
        - Strip /route → /products/sitemap/[__metadata_id__]
        - Strip [__metadata_id__] → /products/sitemap
        - Ends with /sitemap and ext .ts ≠ .xml → add .xml → /products/sitemap.xml
        - Add /route → /products/sitemap.xml/route
        - Entry key: /products/sitemap.xml/route ✓
      
        Case 3: Static sitemap — app/sitemap.xml
        - Input page: /sitemap.xml/route, ext: .xml
        - Strip /route → /sitemap.xml
        - No [__metadata_id__] → skip
        - ext IS .xml → skip .xml addition
        - Add /route → /sitemap.xml/route
        - Entry key: /sitemap.xml/route ✓
      
        Case 4: Non-sitemap metadata — app/opengraph-image.tsx
        - Input page: /opengraph-image/route, ext: .tsx
        - Strip /route → /opengraph-image
        - No [__metadata_id__] → skip
        - Doesn't end with /sitemap → skip
        - Add /route → /opengraph-image/route ✓
      
        Case 5: Non-sitemap multi-dynamic — app/opengraph-image.tsx with generateImageMetadata
        - Input page: /opengraph-image/[__metadata_id__]/route, ext: .tsx
        - Strip /route → /opengraph-image/[__metadata_id__]
        - Strip [__metadata_id__] → /opengraph-image
        - Doesn't end with /sitemap → skip
        - Add /route → /opengraph-image/route ✓
      
        All cases produce the correct entry key.
      ```
      
      Seems legit. Would still appreciate someone with more Next.js knowledge validating my assumptions
      b6cf46a8
    • freek-boon-greenberry's avatar
      Update documentation to explain behavior in a Catch-all route (#89742) · 317b7d26
      freek-boon-greenberry 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 #
      
      -->
      
      ---------
      Co-authored-by: 's avatarJoseph <sephxd1234@gmail.com>
      Co-authored-by: 's avatarvercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
      Co-authored-by: 's avatarJoseph <joseph.chamochumbi@vercel.com>
      317b7d26
    • Joseph's avatar
      docs: Move browserToTerminal into logging (#88901) · c5c46992
      Joseph authored
      `browserToTerminal` stabilizes `browserDebugInfoInTerminal` - since it
      lives under logging, let's remove the page and redirect to logging w/
      fragment
      c5c46992
  3. 11 Feb, 2026 16 commits