1. 27 Feb, 2026 22 commits
  2. 26 Feb, 2026 18 commits
    • nextjs-bot's avatar
      v16.2.0-canary.64 · 8f5afa35
      nextjs-bot authored
      8f5afa35
    • Will Binns-Smith's avatar
      Turbopack server hmr: Implement `restart` event (#90550) · dc3b6ede
      Will Binns-Smith authored
      This implements the `restart` event, fully evicting all caches. This is needed for when client manifest changes are made.
      
      Test Plan: CI for https://github.com/vercel/next.js/pull/90389
      dc3b6ede
    • Andrew Imm's avatar
      Pre-warm a single NodeJS instance when the next devserver starts (#90174) · ee885f86
      Andrew Imm authored
      When cold-booting `next dev` on a fresh create-next-app, on the first server hit we need to fetch fonts and compile CSS, which takes up nearly half of the request time.
      
      It shouldn't be necessary to wait until the first server request to launch the first NodeJS process (eventually used for PostCSS processing in Tailwind). Once the server has started, we can anticipate that first request and pre-warm a single Node process.
      
      Because we grab the boot semaphore, if a request comes in as soon as the server is ready, it waits on the semaphore to resolve, and at most it takes as long as it would before this change. In all likelihood, the Node process is ready before any server request comes in.
      
      It also slightly saves time on `next build`
      
      I'd appreciate scrutiny of all the ways this can go wrong.
      ee885f86
    • JJ Kasper's avatar
      Fix edge index page _next/data route (#90611) · 0db78041
      JJ Kasper authored
      Fixes failing assertion with turbopack
      
      Verified against turbopack + adapter deploy test locally
      <img width="2076" height="1336" alt="CleanShot 2026-02-26 at 13 25
      30@2x"
      src="https://github.com/user-attachments/assets/a8c66314-8163-4371-b02a-dc7146989425"
      />
      
      
      x-ref:
      https://github.com/vercel/next.js/pull/90600#issuecomment-3968044160
      0db78041
    • nextjs-bot's avatar
      v16.2.0-canary.63 · b6d47641
      nextjs-bot authored
      b6d47641
    • Luke Sandberg's avatar
      turbo-persistence: drop key compression dictionary from SST files (#90608) · d52877ef
      Luke Sandberg authored
      ## Summary
      
      - Remove the zstd key compression dictionary from SST files, simplifying
      the on-disk format
      - Key blocks now use plain LZ4 compression (same as value blocks),
      eliminating the zstd dependency
      - Update the turbo-persistence README to reflect the format changes
      
      ## Why
      
      The key compression dictionary added complexity (zstd dependency,
      dictionary computation, dual decompression paths) with diminishing
      returns. Plain LZ4 is already used for value blocks and provides
      sufficient compression for key blocks. This simplifies both the SST file
      format and the compaction/inspection tooling.
      
      This main goal is to unblock streaming SST writes.
      
      ## What Changed
      
      **On-disk format (breaking):**
      - SST files no longer start with a serialized key compression dictionary
      - Meta file entries no longer include the
      `key_compression_dictionary_length` field
      
      **Code:**
      - Removed `zstd` dependency from `turbo-persistence`
      - Removed dictionary computation in `StaticSortedFileBuilder`
      - Simplified `sst_inspect` tool (no more dictionary-aware decompression)
      - Removed `key_compression_dictionary_length` from
      `StaticSortedFileMetaData`, `MetaEntry`, and `MetaFileBuilder`
      
      **Docs:**
      - Updated README meta file format (removed dictionary length field)
      - Updated README SST file format (removed dictionary region)
      - Updated compression description to reference LZ4 directly
      
      ## Test Plan
      
      - Existing turbo-persistence tests and benchmarks pass with the format
      changes
      - `sst_inspect` tool updated to work without dictionary logic
      
      ---------
      Co-authored-by: 's avatarTobias Koppers <tobias.koppers@googlemail.com>
      d52877ef
    • Jiwon Choi's avatar
      Add `unstable_retry()` to error.js (#89685) · 9d13b676
      Jiwon Choi authored
      Extends the error components API to give better control over recovery.
      Previously, the `reset()` prop only cleared the error state and
      re-rendered the children. However, this only handles a temporary
      rendering error.
      
      The error can be due to data fetching or an RSC phase. In these cases,
      `reset()` alone is not sufficient. Users would even need to implement
      retry logic using `router.refresh()`.
      
      Therefore, this PR adds a new `unstable_retry()` prop that calls
      `router.refresh()` and `reset()` within a `startTransition()` to provide
      built-in retry logic. This feature is expected to be preferred over the
      `reset()` prop. Only the cases where you'd choose `reset()` are when you
      have a reason to do a sync reset without loading any new data.
      
      Closes NAR-767
      9d13b676
    • Hendrik Liebau's avatar
      Fix per-segment prefetching for initial loads with Cache Components (#90610) · 2ba73b7a
      Hendrik Liebau authored
      The `S` field in the RSC payload was only set to `true` during static
      generation, but the client used it to determine whether a route supports
      per-segment prefetching (`isPPREnabled` on the route cache entry). For
      partially static pages with Cache Components enabled, the initial HTML
      is served via PPR resume, which generates the RSC payload at request
      time with `isStaticGeneration` set to `false`. This caused `S` to be
      `false` even though the route fully supports per-segment prefetching.
      
      This caused the prefetch scheduler to fall back to the `LoadingBoundary`
      fetch strategy instead of `PPR`, which skipped fetching
      `_head.segment.rsc` and instead sent a `metadata-only` dynamic request.
      That request returned a 404 locally (harmless) but a 200 with an empty
      body on Vercel, which interfered with same-page navigation refreshes
      introduced in #76223 and exposed by the route cache keying fix in
      #90400.
      
      To fix this, `S` is now also set to `true` when `cacheComponents` is
      enabled, since all Cache Components routes support per-segment
      prefetching. When Cache Components is disabled, `S` continues to rely
      solely on `isStaticGeneration`, which is correct because fully static
      pages always have both their RSC payload and per-segment prefetch
      responses generated at build time.
      
      This PR also renames `isPPREnabled` to `supportsPerSegmentPrefetching`
      on the client and updates the `S` field comments in the RSC payload
      types to better reflect the field's actual meaning.
      2ba73b7a
    • Jiwon Choi's avatar
      Allow `reset()` from user's global-error (#89684) · 10725f84
      Jiwon Choi authored
      User's `global-error.js` is within the router. There's no reason it
      shouldn't have access to the options available to the `error.js`
      component. It was already available on prod. This PR syncs dev behavior
      to prod.
      
      For the follow-up feature, `retry()` will also be available in
      `global-error.js`.
      
      ---------
      Co-authored-by: 's avatarvercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
      10725f84
    • Sebastian "Sebbie" Silbermann's avatar
    • Sebastian "Sebbie" Silbermann's avatar
    • Hendrik Liebau's avatar
      [ci] Use `NEXT_TEST_CI` instead of `CI` for e2e test retry guard (#90606) · 420560d0
      Hendrik Liebau authored
      `run-tests.js` explicitly unsets `CI` in the spawned Jest child process
      and preserves the original value as `NEXT_TEST_CI`. Since
      `test/lib/e2e-utils/index.ts` runs inside that child process,
      `process.env.CI` is always empty, making the `jest.retryTimes(1)` call
      effectively dead code in CI.
      420560d0
    • Tobias Koppers's avatar
      Turbopack: Add Next.js version to "initialize project" trace span (#90545) · 891cfe69
      Tobias Koppers authored
      ## Summary
      
      Adds the Next.js version as a `version` field on the Turbopack
      "initialize project" tracing span. The version is passed from the
      TypeScript side (`process.env.__NEXT_VERSION`) through the NAPI bindings
      into Rust `ProjectOptions`, where it is recorded on the span.
      
      This makes it easy to correlate trace data with the specific Next.js
      version that produced it.
      
      Also standardizes all version reads in `packages/next/src/` to use
      `process.env.__NEXT_VERSION` (which is inlined at build time by
      `taskfile-swc.js`) instead of `require('next/package.json').version` or
      `import { version } from 'next/package.json'`.
      
      ### Changes
      
      **Trace span (commit 1):**
      - **`crates/next-api/src/project.rs`** — Added `next_version` field to
      `ProjectOptions`; recorded as `version` on the `"initialize project"`
      span
      - **`crates/next-napi-bindings/src/next_api/project.rs`** — Added
      `next_version` to `NapiProjectOptions` and wired it through the `From`
      impl
      - **`crates/next-build-test/src/main.rs`** — Added `next_version` to
      test `ProjectOptions` init
      - **`packages/next/src/build/swc/generated-native.d.ts`** — Added
      `nextVersion` to the TypeScript `NapiProjectOptions` interface
      - **`packages/next/src/server/dev/hot-reloader-turbopack.ts`**,
      **`packages/next/src/build/turbopack-build/impl.ts`**,
      **`packages/next/src/build/turbopack-analyze/index.ts`** — Pass
      `nextVersion: process.env.__NEXT_VERSION` when creating the Turbopack
      project
      - **`test/development/basic/next-rs-api.test.ts`** — Added `nextVersion`
      to both `createProject` call sites
      
      **Consistent `__NEXT_VERSION` usage (commit 2):**
      - **`packages/next/src/server/dev/hot-reloader-shared-utils.ts`** —
      `require('next/package.json').version` → `process.env.__NEXT_VERSION`
      - **`packages/next/src/lib/patch-incorrect-lockfile.ts`** —
      `nextPkgJson.version` → `process.env.__NEXT_VERSION`; narrowed import to
      only `optionalDependencies`
      - **`packages/next/src/telemetry/events/swc-load-failure.ts`** — `import
      { version as nextVersion }` → `process.env.__NEXT_VERSION`; narrowed
      import to only `optionalDependencies`
      
      ## Test Plan
      
      - Verified Rust compilation with `cargo check -p next-api`, `cargo check
      -p next-build-test`
      - Verified TypeScript types with `pnpm --filter=next types`
      
      ---------
      Co-authored-by: 's avatarClaude <noreply@anthropic.com>
      891cfe69
    • Vercel Release Bot's avatar
      Update Rspack production test manifest (#90565) · 26a38229
      Vercel Release Bot authored
      This auto-generated PR updates the production integration test manifest used when testing Rspack.
      26a38229
    • Vercel Release Bot's avatar
      Update Rspack development test manifest (#90566) · 4079c804
      Vercel Release Bot authored
      This auto-generated PR updates the development integration test manifest used when testing Rspack.
      4079c804
    • nextjs-bot's avatar
    • Niklas Mischkulnig's avatar
      test: remove stray TURBOPACK_BUILD=1 (#90602) · 91ab5709
      Niklas Mischkulnig authored
      Forgot to remove this in https://github.com/vercel/next.js/pull/83335
      
      This env var might filter some tests that should actually run (Webpack doesn't set it at all)
      91ab5709
    • Niklas Mischkulnig's avatar
      Turbopack: use xxhash3_128 for content hashes (#90583) · d1601a14
      Niklas Mischkulnig authored
      Move to 128 bit hashes, so that we can include the untruncated hashes in the manifest in #88607
      
      If anything, this is faster, surprisingly:
      
      ```
      upgrade twox-hash 448a36b449
          pnpm next build --experimental-build-mode=compile  430.13s user, 73.72s system, 724% cpu, 1:09.53 total
          pnpm next build --experimental-build-mode=compile  430.05s user, 82.51s system, 736% cpu, 1:09.56 total
          pnpm next build --experimental-build-mode=compile  419.95s user, 89.50s system, 697% cpu, 1:13.03 total
          pnpm next build --experimental-build-mode=compile  425.95s user, 75.87s system, 748% cpu, 1:07.00 total
      
      use Xxh3Hash128Hex for content hashes ffd6a87f09
          pnpm next build --experimental-build-mode=compile  397.42s user, 53.18s system, 670% cpu, 1:07.25 total
          pnpm next build --experimental-build-mode=compile  416.68s user, 66.32s system, 762% cpu, 1:03.32 total
          pnpm next build --experimental-build-mode=compile  412.63s user, 68.30s system, 774% cpu, 1:02.12 total
          pnpm next build --experimental-build-mode=compile  419.09s user, 68.57s system, 756% cpu, 1:04.50 total
      ```
      
      
      https://github.com/Cyan4973/xxHash says:
      | Hash Name     | Width | Bandwidth (GB/s) | Small Data Velocity | Quality | Comment |
      | ---------     | ----- | ---------------- | ----- | --- | --- |
      | __XXH3__ (SSE2) |  64 | 31.5 GB/s        | 133.1 | 10
      | __XXH128__ (SSE2) | 128 | 29.6 GB/s      | 118.1 | 10
      | __XXH64__     |    64 | 19.4 GB/s        |  71.0 | 10
      | __XXH32__     |    32 |  9.7 GB/s        |  71.9 | 10
      d1601a14