1. 09 Jun, 2026 18 commits
    • next-js-bot[bot]'s avatar
      v16.3.0-preview.2 · e54d183b
      next-js-bot[bot] authored
      e54d183b
    • Sebastian "Sebbie" Silbermann's avatar
    • next-js-bot[bot]'s avatar
      v16.3.0-preview.1 · 0630b70f
      next-js-bot[bot] authored
      0630b70f
    • Sebastian "Sebbie" Silbermann's avatar
    • next-js-bot[bot]'s avatar
      v16.3.0-preview.0 · db6f8645
      next-js-bot[bot] authored
      db6f8645
    • Sebastian "Sebbie" Silbermann's avatar
    • Luke Sandberg's avatar
      [turbopack] add an extension to trace files (#94587) · a1c695a8
      Luke Sandberg authored
      Add `.bin` extension to trace files
      
      This will hint to tools like tailwind that scan for content not to open
      these.
      a1c695a8
    • Luke Sandberg's avatar
      disallow reads from .next-profiles (#94570) · ea744957
      Luke Sandberg authored
      `next` already disallows reading out of `.next` during a build, this
      extends that to the new `.next-profiles` directory
      
      This is currently hardcoded (not end user configurable), so we just
      hardcode the path in the next entrypoints.
      ea744957
    • Sam Selikoff's avatar
      Fix Navigation Inspector Continue Rendering with loading.tsx (#94355) · 554a1e3c
      Sam Selikoff authored
      ## Summary
      
      - Add regression coverage for Navigation Inspector `Continue Rendering`
      with a route-level `loading.tsx`
      - Fix Instant Navigation lock timing by snapshotting the active lock
      when a dynamic request starts
      - Prevent inspector re-arm from trapping in-flight dynamic responses
      behind the next capture lock
      
      ## Why
      
      The Navigation Inspector recently changed `Continue Rendering` to re-arm
      capture after releasing the current lock. That surfaced a race in the
      lower-level Instant Navigation lock handling.
      
      The flow was:
      
      1. `Continue Rendering` deletes the `next-instant-navigation-testing`
      cookie.
      2. Deleting the cookie releases the current navigation lock and triggers
      a soft refresh.
      3. The inspector quickly writes a new pending cookie to re-arm capture.
      4. A route-level `loading.tsx` navigation may still have dynamic data
      applying from the unlock-triggered refresh.
      5. Before this change, `fetchMissingDynamicData` waited on whichever
      lock was active when the response was applied.
      
      That meant the refresh response could accidentally see the newly
      re-armed lock and suspend forever.
      
      This surfaced with `loading.tsx` more reliably than inline Suspense
      because the route-level loading boundary commits the segment loading
      shell, then final content depends on the unlock refresh path. Inline
      Suspense generally keeps the deferred dynamic work associated with the
      original captured navigation, so it waits on the original lock and
      resumes when that lock is released.
      
      ## Fix
      
      Dynamic requests now capture the current navigation lock when the
      request starts, then wait only on that specific lock when applying the
      response.
      
      This preserves the intended behavior:
      
      - Requests started during a capture still wait for that capture to
      release.
      - Requests started after unlock are not blocked by a later re-arm.
      - The inspector can continue re-arming capture without racing in-flight
      refresh responses.
      
      Conceptually, a dynamic request should wait on the lock that existed
      when that request started, not whatever lock happens to exist later when
      its response is applied.
      554a1e3c
    • Aurora Scharff's avatar
      instant: polish client-hook overlay wording, cards, and docs links (#94496) · 5b99d26d
      Aurora Scharff authored
      ### What?
      
      Polishes the dev-overlay UX for the client-hook prerender error after
      Josh's framework fix landed in
      [#94494](https://github.com/vercel/next.js/pull/94494). The overlay now
      names the hook in the headline and shows per-hook fix cards.
      
      ### Why?
      
      Different hooks need different fixes. `useSearchParams` always suspends,
      but `generateStaticParams` doesn't apply to it. `useParams` is the only
      hook GSP resolves at build time. `usePathname` and
      `useSelectedLayoutSegment(s)` need a Suspense boundary or the `[block]`
      export.
      
      ### How?
      
      - Headline now reads "Next.js encountered URL data `useX()` in a Client
      Component outside of `<Suspense>`", matching the body factory wording.
      - Per-hook card sets in `instant-guidance-data.ts`: `useSearchParams` →
      Stream + Block; `useParams` → Stream + GSP + Block; `usePathname` /
      `useSelectedLayoutSegment(s)` → Stream + Block.
      - Build-time message in `ClientHookDynamicError` /
      `ParamClientHookDynamicError` matches the overlay card set.
      - Companion docs page:
      [vercel/front#72622](https://github.com/vercel/front/pull/72622).
      
      ### Verification
      
      Demo scenarios on the [error-messages-overhaul test
      app](https://error-messages-overhaul-ibsl.labs.vercel.dev/):
      [88-client-use-pathname](https://error-messages-overhaul-ibsl.labs.vercel.dev/scenario/88-client-use-pathname),
      [89-client-use-search-params](https://error-messages-overhaul-ibsl.labs.vercel.dev/scenario/89-client-use-search-params),
      [90-client-use-params](https://error-messages-overhaul-ibsl.labs.vercel.dev/scenario/90-client-use-params),
      [91-client-use-selected-layout-segment](https://error-messages-overhaul-ibsl.labs.vercel.dev/scenario/91-client-use-selected-layout-segment),
      [92-client-use-selected-layout-segments](https://error-messages-overhaul-ibsl.labs.vercel.dev/scenario/92-client-use-selected-layout-segments).
      
      <!-- NEXT_JS_LLM_PR -->
      
      ---------
      Co-authored-by: 's avatarJosh Story <gnoff@storyposted.com>
      5b99d26d
    • Hendrik Liebau's avatar
      Stream Cache Components dev render instead of restarting on cache miss (#94457) · 6f4d94ac
      Hendrik Liebau authored
      When Cache Components is enabled, `next dev` previously simulated a
      production loading experience on every cold request. The render did a
      prospective pass to detect cache misses, and on any miss it waited for
      every cache to fill via `cacheSignal.cacheReady()` and then restarted
      the render with warm caches before streaming anything, so the browser
      saw nothing until the slowest cache had filled. Every cold load blocked
      on cache population.
      
      This change replaces the restart-on-cache-miss flow with a single
      non-abandoning staged render that streams immediately and fills caches
      as a side effect. On a cold load the Suspense fallbacks stream right
      away and the cached content resolves as its cache fills; on a warm
      reload the staged progression matches the previous no-cache-miss path.
      The render is split into clearly owned pieces: `setUpStagedDevRender`
      builds the staged controller, cache signal, and resume cache;
      `streamStagedRenderInDev{Node,Web}` runs the streaming render and
      reports a result once the stream has fully finished; and
      `stagedRenderWithCachesInDev{Node,Web}` returns the stream and leaves
      the validation follow-up detached so it never blocks the response.
      
      The render advances its stages in sequential tasks, and the stream is
      not handed back the instant it exists: it is held until the render has
      advanced through the stage whose content belongs in the shell. That is
      the static stage for initial loads, HMR refreshes, and plain
      navigations, or the runtime stage for client navigations to a route with
      a runtime prefetch config, whose runtime-prefetchable content the
      navigation's prefetch would have settled. It never waits for the dynamic
      stage. Buffering the shell before the first flush keeps the streaming
      renderer from emitting a premature Suspense fallback for content that
      belongs in the shell, and it mirrors production, where the static shell
      (plus runtime-prefetchable content where configured) is served and the
      remaining holes stream in as fallbacks.
      
      Two internal reads that would otherwise register as synchronous IO and
      wrongly force the render to the dynamic stage, the cache handler's
      tag-expiry clock check and the hot reloader's module-scope dev client
      id, are now read untracked: via `performance.timeOrigin +
      performance.now()` like the `'use cache'` handler, and only in the
      browser where the HMR connection reads it, respectively.
      
      Cache Components rules validation now runs in that background follow-up,
      once the streamed render has fully settled. `planDevValidation` inspects
      the finished render and picks one of three paths: forward an invalid
      dynamic usage error the streamed render already recorded and stop (for
      example a request API used inside `'use cache'`); validate the streamed
      render's own chunks when it neither missed caches nor hit sync IO; or,
      when it did either, validate a dedicated warm-cache render instead.
      Because that warm render reads the filled caches back rather than
      filling them, it can surface an invalid dynamic usage error the cold
      streamed render cannot, such as a nested dynamic `use cache` cache life
      that propagated to a parent with no explicit `cacheLife`; that error is
      forwarded and validation is skipped, just as one recorded by the
      streamed render is.
      
      Since cold loads no longer block on cache fills, the transient
      cache-status indicator that reflected that wait is no longer emitted; a
      follow-up will instead add an indicator that tells the user whether a
      render streamed with cache misses, and so wasn't representative of
      production.
      6f4d94ac
    • Mikhail Stankevich's avatar
      docs: add pnpm installation step to module-not-found error page (#93773) · 1e601b6b
      Mikhail Stankevich authored
      Added missing pnpm command for installing dependencies to ensure
      consistency with other documentation pages.
      
      <!-- 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
      
      ### Signed commits
      
      - This repository requires verified commit signatures on protected
      branches.
      - If this pull request is blocked for unsigned commits, re-sign the
      commits and force-push the branch.
      - A `Signed-off-by` line in the commit message is not enough.
      
      
      ## 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?
      Added the missing `pnpm` installation command to the `module-not-found`
      error documentation page.
      
      ### Why?
      To ensure consistency across the documentation, as other error pages and
      guides in Next.js typically include examples for npm, yarn, and pnpm.
      
      ### How?
      Added `- When using pnpm: pnpm add swr` to the "Possible Ways to Fix It"
      section in `errors/module-not-found.mdx`.
      
      Closes NEXT-
      Fixes #
      
      -->
      1e601b6b
    • Karl Horky's avatar
      docs: fix 'time zone' spelling in FOUC guide (#93244) · ca2a022c
      Karl Horky authored
      <!-- Thanks for opening a PR! Your contribution is much appreciated.
      To make sure your PR is handled as smoothly as possible we request that
      you follow the checklist sections below.
      Choose the right checklist for the change(s) that you're making:
      
      ## For Contributors
      
      ### Improving Documentation
      
      - Run `pnpm prettier-fix` to fix formatting issues before opening the
      PR.
      - Read the Docs Contribution Guide to ensure your contribution follows
      the docs guidelines:
      https://nextjs.org/docs/community/contribution-guide
      
      ### Fixing a bug
      
      - Related issues linked using `fixes #number`
      - Tests added. See:
      https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
      - Errors have a helpful link attached, see
      https://github.com/vercel/next.js/blob/canary/contributing.md
      
      ### Adding a feature
      
      - Implements an existing feature request or RFC. Make sure the feature
      request has been accepted for implementation before opening a PR. (A
      discussion must be opened, see
      https://github.com/vercel/next.js/discussions/new?category=ideas)
      - Related issues/discussions are linked using `fixes #number`
      - e2e tests added
      (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
      - Documentation added
      - Telemetry added. In case of a feature if it's used or not.
      - Errors have a helpful link attached, see
      https://github.com/vercel/next.js/blob/canary/contributing.md
      
      ### Signed commits
      
      - This repository requires verified commit signatures on protected
      branches.
      - If this pull request is blocked for unsigned commits, re-sign the
      commits and force-push the branch.
      - A `Signed-off-by` line in the commit message is not enough.
      
      
      ## 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 #
      
      -->
      
      Followup to https://github.com/vercel/next.js/pull/92786 by @icyJoseph
      and @feedthejim, reviewed by @aurorascharff
      
      ### What?
      
      Switch "timezone" to "time zone"
      
      ### Why?
      
      "time zone" (with a space) is the more common spelling of the term:
      
      -
      https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime#time_zones_and_offsets
      - https://date-fns.org/v4.1.0/docs/Time-Zones
      - https://datatracker.ietf.org/doc/rfc9557/
      - https://www.iana.org/time-zones
      - https://www.postgresql.org/docs/current/datatype-datetime.html
      - https://unicode-org.github.io/icu/userguide/datetime/
      - https://www.merriam-webster.com/dictionary/time%20zone
      
      ### How?
      
      Manual replacement
      Co-authored-by: 's avatarJoseph <joseph.chamochumbi@vercel.com>
      ca2a022c
    • Josh Story's avatar
      4228478b
    • Josh Story's avatar
      Stabilize export const prefetch (#94571) · adb29136
      Josh Story authored
      This API is going to ship stable but some options may individually be
      marked unstable
      adb29136
    • Sam Poder's avatar
      [turbopack] Use an arena for `JSValue`s (#94297) · 409fa64d
      Sam Poder authored
      This PR takes the arena introduced in
      https://github.com/vercel/next.js/pull/94296 and uses it! It's large but
      shouldn't change functionality beyond the use of the arena. Some syntax
      related to pattern-matching had to change because `bumpalo`'s `Box`
      doesn't support the same pattern matching that the standard library's
      `Box` does but the code should be equivalent.
      
      `bumpalo`'s `Bump` type implements `Send` but not `Sync`, to allow us to
      pass a `Bump` into async-methods we wrap it in `ThreadLocal` (see
      https://docs.rs/thread_local/latest/thread_local/). `ThreadLocal`
      implements `Sync` by creating a new bumpalo allocator for each thread.
      We've tried to minimise the usage of `ThreadLocal` to just where it was
      needed. The downside of `ThreadLocal` is that we may find ourselves
      allocating memory for multiple arenas instead of just one. This is more
      time allocating if there are multiple threads compared to one shared
      allocation, however, it still appears to be a performance improvement
      over individually allocating memory for each `JSValue`
      
      ---------
      Co-authored-by: 's avatarBenjamin Woodruff <benjamin.woodruff@vercel.com>
      409fa64d
    • Jude Gao's avatar
    • Josh Story's avatar
      Rename prefetch option `force-runtime` to `allow-runtime` (#94568) · a9539183
      Josh Story authored
      While force-runtime does opt you into runtime prefetching today (i.e. it
      does force) the intended semantic is shifting to convey that the Segment
      itself is designed for and makes sense (i.e. cost / performance
      tradeoff) to runtime prefetch. In the future segments that may be
      runtime prefetched might not be for various optimization reasons. We
      therefore are renaming the option from force-runtime to allow-runtime.
      In the future if we change allow-runtime to sometimes not runtime
      prefetch we can always ship a new force-runtime as a codemod option that
      recovers the current behavior.
      
      This wording also better demonstrates why this is a feature of the
      Segment and not say an option on the link like `<Link
      prefetch="force-runtime" />`.
      a9539183
  2. 08 Jun, 2026 21 commits
    • next-js-bot[bot]'s avatar
      v16.3.0-canary.46 · e1affaea
      next-js-bot[bot] authored
      e1affaea
    • Aurora Scharff's avatar
      docs: move insight error pages from vercel/front to canary (#94564) · 2cc99c73
      Aurora Scharff authored
      ### What?
      
      Moves 14 insight-kind error pages from
      `vercel/front/apps/next-site/content/errors-extra/` into this repo's
      `errors/` directory.
      
      ### Why?
      
      `nextjs.org`'s sync pipeline already clones `errors/` from canary on
      every deploy. `errors-extra/` is meant for in-flight drafts. These pages
      have stabilized, so they belong with the framework code they describe.
      
      This unblocks Docs Link Validation in #94496: cross-links from this
      repo's API docs (`cookies.mdx`, `headers.mdx`, `use-params.mdx`,
      `use-pathname.mdx`, `generate-metadata.mdx`, `generate-viewport.mdx`,
      etc.) to `/docs/messages/blocking-prerender-*` now resolve.
      
      ### How?
      
      Copied each `.mdx` verbatim. No content changes. Frontmatter (`kind:
      insight`) routes them through the FixOption renderer. Follow-up PR in
      `vercel/front` will remove the `errors-extra/` copies; until then the
      override wins on slug collision but the content is byte-identical.
      
      <!-- NEXT_JS_LLM_PR -->
      2cc99c73
    • Danyal Ahmed's avatar
      docs: fix onRequestError error type example (#94518) · 5c9bc5c8
      Danyal Ahmed authored
      ### Fixes #94499
      
      
      ### Summary
      
      The `Instrumentation.onRequestError` type currently exposes the error
      parameter as `unknown`, but the docs described it as `Error & { digest:
      string }` and the example accessed `err.message` directly.
      
      This updates the docs/example to match the current type and narrows the
      caught value before reading `message`.
      
      ### Tests:
      - `git diff --check`
      5c9bc5c8
    • Luke Sandberg's avatar
      enable eviction by default (#94452) · 7041635b
      Luke Sandberg authored
      Enable memory eviction by default
      
      If this causes trouble setting
      `experimental.turbopackMemoryEviction=false` can disable this feature.
      7041635b
    • Joseph's avatar
      docs: clarify use cache persistence across deploys (#93554) · 9cde9169
      Joseph authored
      Clarify caching directives non-persistence across deploys.
      
      - [x] reinforce that in serverless deploys, the `use cache` directive
      doesn't persist between requests/different instances either
      9cde9169
    • Sam Poder's avatar
      [turbopack] Remove WebAssembly helpers from the default runtime (#94373) · 83eea78b
      Sam Poder authored
      This PR builds on https://github.com/vercel/next.js/pull/94372. It does
      a similar thing but for the WebAssembly-related helpers. Collectively,
      these cut the run time by about 2KB (5%).
      
      The WebAssembly-related module is inserted within
      `turbopack-wasm/src/loader.rs`. Similar design questions to #94372
      exist. `RUNTIME_ROOT` is added to `contextPrototype` and the JS-code
      lives in the `turbopack-wasm` package.
      83eea78b
    • Aurora Scharff's avatar
      fix(dev-overlay): Tidy up issues/insight menu and tab overlay (#94549) · 0a074bda
      Aurora Scharff authored
      ### What?
      
      Tidies up how the dev overlay surfaces Issues vs Insights:
      
      - Tab bar: when there are no insights, the Insights tab is hidden. When
      there are no issues but there are insights, the Issues tab stays in
      place but reads `No issues` (disabled, no hover).
      - Menu row: shows one row labeled `Issues`, `Insights`, or `Issues ·
      Insights` with a red badge for issues and an amber badge for insights,
      matching the trigger pill colors.
      
      ### Verification
      
      Test-app scenarios on the [error-messages-overhaul
      demo](https://error-messages-overhaul-ibsl.labs.vercel.dev/):
      [41-subnav-cookies](https://error-messages-overhaul-ibsl.labs.vercel.dev/scenario/41-subnav-cookies),
      [42-subnav-fetch](https://error-messages-overhaul-ibsl.labs.vercel.dev/scenario/42-subnav-fetch).
      
      ### Why?
      
      Reported by icyJoseph in Slack. The red `Issues 1` chip on an
      insights-only state looked like a real error; the `0/0` placeholder was
      inconsistent.
      
      <!-- NEXT_JS_LLM_PR -->
      0a074bda
    • Tim Neutkens's avatar
      Reduce new test concurrency to five (#94552) · c082ffe4
      Tim Neutkens authored
      ### What?
      
      Reduce the `test-new-tests-dev` and `test-new-tests-start` workflow
      matrices from ten groups to five.
      
      ### Why?
      
      Restore these flake-detection jobs to five concurrent shards.
      
      ### How?
      
      Change each matrix group list from `1/10` through `10/10` to `1/5`
      through `5/5`.
      
      ### Verification
      
      - `pnpm prettier --with-node-modules --ignore-path .prettierignore
      --check .github/workflows/build_and_test.yml`
      - `git diff --cached --check`
      
      <!-- NEXT_JS_LLM_PR -->
      c082ffe4
    • Sebastian "Sebbie" Silbermann's avatar
    • Tim Neutkens's avatar
      Remove dead cacheComponents web streams path (#93944) · 89bd4833
      Tim Neutkens authored
      ### What?
      
      Remove the cacheComponents + web streams rendering branches from
      `app-render`.
      
      ### Why?
      
      `cacheComponents` does not support the edge runtime, and Node streams
      are now always-on for the Node.js runtime in the parent PR. That makes
      the cacheComponents web-stream branches dead code.
      
      ### How?
      
      - Collapse cacheComponents staged RSC rendering to the Node-stream
      implementation.
      - Remove the web-stream cacheComponents helper functions and
      static-stage byte counter.
      - Keep the ordinary non-cacheComponents web-stream paths for
      edge/runtime compatibility.
      
      ### Verification
      
      - `pnpm --filter=next types`
      - `pnpm --filter=next build`
      - `pnpm test-start-webpack test/e2e/app-dir/app/standalone.test.ts`
      
      <!-- NEXT_JS_LLM_PR -->
      89bd4833
    • Tim Neutkens's avatar
      Remove `experimental.useNodeStreams` flag as it's enabled (#93938) · ec28a4fd
      Tim Neutkens authored
      ### What?
      
      Remove `experimental.useNodeStreams` from the public config surface and
      make Node streams always-on for Node.js App Router rendering.
      
      The smaller default-on change and dedicated CI cleanup landed in #94311.
      The standalone compatibility update landed separately in #94347.
      
      ### Why?
      
      Node streams are now the default Node.js runtime rendering path, so the
      opt-in config and runtime selection plumbing are stale. Edge bundles
      continue to use the web-stream path because Node streams are unavailable
      there.
      
      ### How?
      
      - Define `__NEXT_USE_NODE_STREAMS` as true for Node.js app runtime
      bundles and false for edge user bundles.
      - Remove config, schema, runtime, export, and server plumbing for
      `experimental.useNodeStreams`.
      - Delete the obsolete env-precedence fixture.
      - Clean benchmark docs and scripts that still set or compare
      `experimental.useNodeStreams`.
      
      ### Verification
      
      - `pnpm --filter=next types`
      - `pnpm build-all`
      
      <!-- NEXT_JS_LLM_PR -->
      ec28a4fd
    • Aurora Scharff's avatar
      docs: add updateTag example to cacheTag page (#94508) · 5e144103
      Aurora Scharff authored
      ### What?
      
      Adds an `updateTag` example to the `cacheTag` API reference page.
      
      ### Why?
      
      The `cacheTag` docs only showed `revalidateTag` for cache invalidation.
      For forms and user-triggered mutations (the dominant use case for
      `cacheTag`), `updateTag` is the recommended API because it provides
      read-your-own-writes semantics. DX agent friction logs showed agents
      defaulting to `revalidateTag` and hitting the deprecated single-arg
      error before discovering `updateTag` via web search.
      
      ### How?
      
      Added a second example block after the existing `revalidateTag` one,
      showing `updateTag('my-data')` in a Server Function.
      Co-authored-by: 's avatarJoseph Chamochumbi <joseph.chamochumbi@vercel.com>
      5e144103
    • SJvaca30's avatar
      docs: clarify next-env.d.ts regeneration (#94232) · bd9f0eb4
      SJvaca30 authored
      ## What?
      
      Closes #94153.
      
      Clarifies that `next-env.d.ts` is managed by Next.js and that its
      contents may change over time, including between commands such as `next
      dev` and `next typegen`.
      
      ## Why?
      
      Projects that still track `next-env.d.ts` can see command-order diffs
      when the generated route type imports switch between `.next/dev/types`
      and `.next/types`. The docs already recommend excluding the file from
      version control; this makes the generated-file contract and manual-edit
      guidance explicit.
      
      ## Testing
      
      - `npx --yes prettier@3.6.2 --check
      docs/01-app/03-api-reference/05-config/02-typescript.mdx`
      - `git diff --check`
      bd9f0eb4
    • next-js-bot[bot]'s avatar
      v16.3.0-canary.45 · 0dc1884c
      next-js-bot[bot] authored
      0dc1884c
    • Niklas Mischkulnig's avatar
      Turbopack: content hash polyfill sourcemap file (#94548) · ff865573
      Niklas Mischkulnig authored
      The sourcemap file of the polyfill chunk wasn't actually content hashed.
      it just used the name of the corresponding JS chunk.
      It was still emitted into `_next/static/immutable`. So it wasn't
      actually immutable.
      
      Now, it's content hashed (and this also removed the ad-hoc sourcemap
      construction from app.rs and instead uses the usual pattern that all
      other chunks use to reference their corresponding sourcemap chunks).
      
      
      We didn't catch this because it only happens with
      `nextConfig.productionBrowserSourceMaps: true` which isn't the default.
      The test now covers this as well
      ff865573
    • Sebastian "Sebbie" Silbermann's avatar
    • Niklas Mischkulnig's avatar
      Turbopack: refactor into `get_next_client_transforms_rules` (#94487) · f5718d2c
      Niklas Mischkulnig authored
      Straight up moving that `.extend()` into the function that produced the
      vector a few lines before.
      f5718d2c
    • Andrew Clark's avatar
      Partial Prefetching: Default to App Shell only (#94510) · 16b44a85
      Andrew Clark authored
      When Partial Prefetching is enabled (unstable_prefetch = 'partial'),
      this changes the default behavior of Link to only prefetch the App Shell
      of the target page, not the page data. Per-page data is only prefetched
      if the Link's `prefetch` prop is set to `true`.
      
      For dynamic/partially static pages, this roughly matches the pre-Cache
      Components behavior: links to those pages never include page content,
      only a reusable App Shell defined by `loading.tsx` (if defined).
      
      For fully static pages, this is a significant behavior change: the prior
      behavior of Next.js was to prefetch the entire static page, regardless
      of whether `prefetch={true}` was set. As a default behavior, this made
      sense for certain kinds of content-heavy sites, like blogs, where most
      of the content is expected to be generated at build time. These apps
      will now need to set the prefetch prop to `true` to maintain the
      previous behavior.
      
      The main motivation is to simplify the cost/performance model for
      prefetching: rendering a Link is now "free" unless `prefetch={true}` is
      set.
      
      I've put "free" in quotes because even if `prefetch={true}` is not set,
      Next.js will still prefetch a generic App Shell. However, this App Shell
      only needs to be rendered once per filesystem route, as opposed to once
      per link. So it's not prefetching in the usual sense that is meant in
      the context of SPA-based web applications. It's more like incremental
      bundle loading, except instead of loading just the code for the route,
      we also load the generic UI.
      
      To aid in incremental adoption of this feature, this also adds an
      "eager" prefetch mode that can be set on any layout or page
      (unstable_prefetch = 'unstable_eager'). When "eager" is set, every Link
      to that route is assigned an implied `prefetch={true}`, restoring the
      pre-Partial Prefetching behavior. Blog-like sites may find this useful,
      but it's mostly intended to support migrating existing apps.
      
      (For canary testers of Partial Prefetching, you can also enable eager
      mode globally by setting `partialPrefetching: 'unstable_eager'`. This is
      not recommended except for migration purposes, even for blog-like
      sites.)
      
      <!-- NEXT_JS_LLM_PR -->
      16b44a85
    • Andrew Clark's avatar
      Fix: Subtree hints not propagating correctly (#94489) · 6611813e
      Andrew Clark authored
      Fixes a mistake in the client when constructing a route tree from a
      partial server response. When applying the patch, we must propagate the
      new subtree hints all the way up to the root.
      
      This was an existing bug that I found when implementing the next PR in
      the stack, which relies on the subtree hint mechanism. I've split it out
      into its own step and confirmed the bug + fix using a regression test
      expressed via existing behavior.
      
      <!-- NEXT_JS_LLM_PR -->
      6611813e
    • Andrew Clark's avatar
      Add global config to enable Partial Prefetching (#94448) · f5af2845
      Andrew Clark authored
      Adds a global config option called `partialPrefetching` that changes the
      behavior of `<Link prefetch={true}>`.
      
      When Partial Prefetching is enabled, only Cache Components are included
      in a prefetch response. Dynamic data is omitted. This is the same idea
      as Partial Prerendering for initial page loads, now applied to client
      navigations.
      
      In the initial Cache Components release, Partial Prefetching was enabled
      for any Link that did not explicitly set a `prefetch` prop. However, if
      the `prefetch` prop was set to `true`, then the Link retained the old
      behavior where the _entire_ page was prefetched, including dynamic data.
      This was to ease the migration path for existing apps that already
      relied on dynamic data being included in the prefetch.
      
      For new apps that have Cache Components enabled from the start, it's
      suggested to also enable `partialPrefetching`.
      
      This PR also adds a per-segment opt-in: a route segment can set
      `unstable_prefetch = 'partial'` to enable Partial Prefetching just for
      that segment, so apps can migrate gradually before enabling it globally.
      
      <!-- NEXT_JS_LLM_PR -->
      f5af2845
    • Luke Sandberg's avatar
      [turbopack] standardize chunk entry names for webpack and postcss loaders (#94256) · 70149d7a
      Luke Sandberg authored
      ### What?
      
      Use the `chunk_path` api for computing entrypoint filepath names for our
      node worker pool files. For postcss loaders ensure that the config
      filepath is part of the module ident of the transformer.
      
      ### Why?
      
      I was investigating a bug in reported in next 16.2.6
      (https://vercel.slack.com/archives/C09GRCW5MQR/p1780088728756579) and
      noticed that the chunk entry path construction logic was unusual. It
      happens to be that https://github.com/vercel/next.js/pull/91338 fixed
      the reported bug (just not released yet). This migrates all entry
      construction to the standard form
      70149d7a
  3. 07 Jun, 2026 1 commit