1. 29 Sep, 2026 24 commits
    • next-js-bot[bot]'s avatar
      v16.4.0-canary.53 · b1fa1213
      next-js-bot[bot] authored
      b1fa1213
    • Jan Kassens's avatar
      [create-next-app] Enable Cache Components by default in create-next-app (#99436) · 61fb9359
      Jan Kassens authored
      Updates the default of `create-next-app` to enable Cache Components.
      This makes sure new apps have an easier transition. Also updates
      documentation.
      
      Closes NAR-928
      61fb9359
    • Josh Story's avatar
      Include async module evaluation in client loading metrics (#99427) · 40a91948
      Josh Story authored
      ## Summary
      
      Include async client-module evaluation in loading metrics. A module with
      top-level `await` can make `require()` return a Promise; measuring only
      until that return omits the subsequent evaluation wait. This follows
      #99322 and addresses [Hendrik’s
      review](https://github.com/vercel/next.js/pull/99322#discussion_r4132744744).
      
      Observe native Promise resolution and rejection while preserving the
      original return value and per-render attribution. Synchronous modules
      keep their existing behavior, including exports named `then` and thrown
      errors.
      
      ## Verification
      
      - End-to-end regression: a real Client Component waits five seconds
      during top-level `await`; an HTML request must report more than one
      second of accumulated loading time through the standard Performance API.
      The pre-fix code reported only 38 ms; the fixed code passes.
      - Replaced the PR-added mocked-loader tests. The existing eight logger
      tests remain unchanged and pass.
      - Full client-loading group: dev Webpack and production Turbopack, 6
      passed each. Types, lint, formatting, and the full build pass.
      
      <!-- NEXT_JS_LLM -->
      40a91948
    • Jimmy Miller's avatar
      turbo-tasks-backend: fix leaf distance tracing compilation (#99443) · 1e0b765e
      Jimmy Miller authored
      Initialize queued tracing spans and borrow them before entering. Fix
      compilation with trace_leaf_distance_update enabled.
      1e0b765e
    • Jamiboy Mohammad's avatar
      Enable proxy export tests in deploy mode (#99400) · ef4aa3db
      Jamiboy Mohammad authored
      ## Summary
      
      Enable deploy coverage for all six proxy export cases by checking in
      each `proxy.ts` variant and giving it an independent test instance with
      the shared app fixture. Valid exports retain their browser rendering
      assertions; invalid exports use rejected startup and retain the complete
      compiler diagnostics, replacing local file writes and repeated builds on
      one instance.
      
      ## Verification
      
      - All six cases pass in dev and production with Turbopack and Webpack.
      - Turbopack production was verified with normal fixture isolation; the
      local `NEXT_SKIP_ISOLATE=1` run reports a different diagnostic path.
      - Formatting and ESLint passed.
      - Deploy execution has not been run locally; this PR enables all six
      cases for deploy CI.
      
      <!-- NEXT_JS_LLM -->
      ef4aa3db
    • Aurora Scharff's avatar
      docs: record API stabilization across Next.js 16 releases (#99420) · 96a33793
      Aurora Scharff authored
      ## Summary
      
      Fill gaps in API reference history so readers can tell which Next.js 16
      release stabilized an API or renamed its experimental form.
      
      - **16.0.0:** Record stabilization of `cacheLife()`, `cacheTag()`, `use
      cache`, the caching configuration options, React Compiler support, and
      Turbopack production builds. Add the missing `enablePrerenderSourceMaps`
      reference, shared with the Pages Router, documenting its current default
      and promotion out of `experimental`.
      - **16.2.0:** Record the promotion of `adapterPath` to a stable,
      top-level option.
      - **16.3.0:** Replace the `v16.x.x` placeholders for the `instant` and
      `prefetch` route exports with their stabilization version and previous
      names.
      - **16.4.0:** Clarify that the new `prefetch()` and `navigation()`
      functions replace names used in earlier canaries.
      
      The `catchError` and `retry` histories already correctly record
      introduction in 16.2.0 and stabilization in 16.3.0, so they are
      unchanged.
      
      ## Verification
      
      - Checked the 16.0 release and upgrade guides, PR #84877, and the
      configuration definitions/migrations in the v15.5.0 and v16.0.0 tags.
      - Checked the route exports against the v16.2.0/v16.3.0 source and
      stabilization commits #94578 and #94571; checked the function renames
      against #99241.
      - Checked the new source-map reference against the current config
      default and prerender worker implementation.
      - Prettier and diff checks passed. Documentation only; no runtime code
      changed.
      
      <!-- NEXT_JS_LLM -->
      96a33793
    • Jamiboy Mohammad's avatar
      test: migrate and explain custom server deploy exclusions (#98994) · 7f3821a9
      Jamiboy Mohammad authored
      ## Summary
      
      Custom-server suites depend on local server entrypoints that deploy mode
      does not launch. Replace their legacy `skipDeployment` exclusions and
      `skipped` returns with `@force-gate !deploy` and explain the dependency,
      while preserving their existing local mode restrictions and assertions.
      
      This covers six test files, including the custom-server sections of API
      body parsing and OpenTelemetry. The ordinary API JSON body-parser case
      remains enabled in deploy mode; only the Express pre-parsing cases are
      excluded. The custom-server shutdown suite also requires the runner to
      signal its server process and observe `after()` completion.
      
      Stack: #99012 → #98994 → #99392 → #98911. Based on #99012; #99392
      separately explains local process-control exclusions.
      
      ## Verification
      
      - The two added suites passed in both webpack development and production
      modes: five tests in each mode.
      - Collection with the real gate runtime and fixture setup stubbed
      confirmed all five tests enabled locally, and only the ordinary API
      body-parser test enabled in deploy mode. Both parameterized shutdown
      signals are excluded in deploy.
      - All 24 gate-transform tests passed. Formatting and ESLint passed for
      the added files.
      - The JavaScript workspace build passed. The full bootstrap build failed
      in the native Rust step (`cargo metadata failed to run`).
      - No new deployment was created. The ordinary API body-parser case
      passed in the earlier deployment experiment.
      
      <!-- NEXT_JS_LLM -->
      7f3821a9
    • Jamiboy Mohammad's avatar
      test: migrate and explain root-inference deploy exclusions (#99012) · 71de7e6a
      Jamiboy Mohammad authored
      ## Summary
      
      Base this PR directly on #98430 and migrate the six workspace-root
      inference suites from `skipDeployment` to `@force-gate !deploy`,
      including removal of their `skipped` early returns. This PR now contains
      its own conversions and no longer depends on the migration in #98156.
      
      Retain the deployment exclusions with concrete explanations: Vercel’s
      builder supplies `NEXT_PRIVATE_OUTPUT_TRACE_ROOT`, bypassing automatic
      workspace-root inference. Diagnostic assertions would not exercise that
      path, while successful imports and absent warnings would not establish
      that workspace detection worked. The home-directory boundary tests also
      change `HOME` for a locally managed Next.js process.
      
      ## Verification
      
      - Formatting and ESLint passed for all six files.
      - All 24 gate pragma-transform unit tests passed, including
      `describe.each` support.
      - Verified all six force-gates attach successfully and test logic
      matches #98430 after removing only the legacy deployment skip machinery.
      Final file contents match the previously reviewed PR head.
      - Deployment-mode collection and gate-runtime tests were blocked by
      missing `node-fetch` in the local installation; no deployments ran.
      - Bootstrap and watch builds were attempted but stalled without output
      and were stopped.
      
      <!-- NEXT_JS_LLM -->
      71de7e6a
    • Jamiboy Mohammad's avatar
      Enable build diagnostic suites in deploy mode (#99402) · a28f7acf
      Jamiboy Mohammad authored
      ## Summary
      
      Enable seven e2e suites to validate build diagnostics on deployments.
      Expected build failures now use deferred `next.start()` rejection and
      retained build logs, preserving the routing, codemod and `after()`
      diagnostics. The successful `generateStaticParams` case uses deployment
      startup and accepts timestamp-prefixed build events.
      
      ## Verification
      
      - Production: all seven suites passed with Turbopack and Webpack,
      including the existing diagnostic snapshots.
      - Development: all six applicable suites passed with both bundlers; the
      existing production-only suite remains skipped in dev.
      - Confirmed build-event parsing preserves payloads for plain and
      timestamp-prefixed logs.
      - Formatting and ESLint passed. Deploy execution remains for CI.
      
      <!-- NEXT_JS_LLM -->
      a28f7acf
    • Tobias Koppers's avatar
      test(turbopack): remove filesystem fuzzer unit tests (#99089) · 46586eea
      Tobias Koppers authored
      ### What?
      
      Remove the eight unit tests added to the manual filesystem-watcher
      fuzzer by #98982 and #98983.
      
      ### Why?
      
      This follows up on bgw's review feedback in
      [#98982](https://github.com/vercel/next.js/pull/98982#discussion_r4075847283)
      and
      [#98983](https://github.com/vercel/next.js/pull/98983#discussion_r4076126033)
      that unit tests are overkill for this stress-testing CLI. Its supported
      behavior is exercised by running the fuzzer itself.
      
      ### How?
      
      Remove only the fuzzer's `#[cfg(test)]` module. Both production fixes
      from the original PRs remain unchanged.
      
      Verified with:
      
      - `cargo fmt -- --check`
      - `cargo check -p turbo-tasks-fuzz`
      - `cargo clippy -p turbo-tasks-fuzz --all-targets -- -D warnings -A
      deprecated`
      - `cargo build --release -p turbo-tasks-fuzz`
      - 30-second manual smoke runs for normal reads, tracked read/writes, and
      directory symlinks (443 total iterations; no panics or terminal errors)
      
      <!-- NEXT_JS_LLM -->
      
      
      <!-- fleet 6488265d-2685-49d3-b632-6511b4b47690 -->
      Co-authored-by: 's avatarvercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com>
      Co-authored-by: 's avatarTobias Koppers <1365881+sokra@users.noreply.github.com>
      Co-authored-by: 's avatarBenjamin Woodruff ‮ <180404+bgw@users.noreply.github.com>
      46586eea
    • Jimmy Miller's avatar
      [turbopack] Support webpack loader build dependency requests (#99071) · e725f8f7
      Jimmy Miller authored
      Adds support for resolving build dependencies to modules (cjs or mjs)
      the way that webpack does. There is more support, but this was a nice
      isolatable slice.
      e725f8f7
    • Jimmy Miller's avatar
      [turbopack] Track webpack loader build dependency directories (#98838) · 2f3cb719
      Jimmy Miller authored
      Track explicit directories while continuing to warn for unsupported
      module and package inputs.
      
      I will keep removing more and more of the unsupported cases with each PR
      2f3cb719
    • Sebastian "Sebbie" Silbermann's avatar
      [ci] Wire preview builds variables consistently (#99323) · 5e097685
      Sebastian "Sebbie" Silbermann authored
      `build_reusable.yml` now defines `NEXT_TEST_PREVIEW_BUILDS_BASE_URL`
      next to `PREVIEW_BUILDS_ACCESS`, so every test job inherits both via
      `process.env` instead of relying on per-call-site threading. The same
      class of gap on next-15-5 broke private-preview deploy tests in the
      mirror with an E401 ([failing
      run](https://github.com/vercel/next-js-mirror/actions/runs/36334147525/job/108664261165)).
      
      ## test plan
      
      - [x] [test_e2e_deploy_release
      run](https://github.com/vercel/next.js/actions/runs/36347194442)
      Co-authored-by: 's avatarClaude Code (kimi-k3[1m]) <noreply@anthropic.com>
      5e097685
    • Sebastian "Sebbie" Silbermann's avatar
      [ci] Enable PR comment in any repo (#99315) · 5baba818
      Sebastian "Sebbie" Silbermann authored
      This comment is just as valuable in the mirror.
      
      Forks disable GH Actions by default nowadays. Individual workflows can
      also be disabled. That avenue should be chosen instead of hardcoding
      disablement in the workflow file.
      5baba818
    • Will Binns-Smith's avatar
      Fix bundle analyzer route selector (#98702) · 1bf5bf76
      Will Binns-Smith authored
      Fix route selector overflow for long route names and constrain the
      popover to the viewport.
      
      Deduplicate route names when generating analyzer data and before
      rendering the picker so parallel routes and existing analyzer corpora
      cannot produce duplicate command items.
      
      <!-- NEXT_JS_LLM -->
      Co-authored-by: 's avatarvercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com>
      Co-authored-by: 's avatarWill Binns-Smith <755844+wbinnssmith@users.noreply.github.com>
      1bf5bf76
    • Will Binns-Smith's avatar
      bundle-analyzer: use Rust React compiler (#98695) · d71d13d3
      Will Binns-Smith authored
      ## Summary
      
      Enable the Rust React compiler when building the bundle analyzer UI.
      Update its pinned Next.js version to one that supports the compiler
      option.
      
      ## Verification
      
      - `pnpm --filter @next/bundle-analyzer-ui build`
      
      <!-- NEXT_JS_LLM -->
      
      ---------
      Co-authored-by: 's avatarvercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com>
      Co-authored-by: 's avatarWill Binns-Smith <755844+wbinnssmith@users.noreply.github.com>
      d71d13d3
    • Will Binns-Smith's avatar
      Link bundle analyzer empty states to source mode (#98542) · 8c1f5501
      Will Binns-Smith authored
      Offer a direct environment switch when the active Client or Server
      filter has no rows but the other environment has sources matching the
      selected file types.
      
      Keep the generic empty state when neither environment has matching
      sources.
      
      <!-- NEXT_JS_LLM -->
      
      ---------
      Co-authored-by: 's avatarvercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com>
      Co-authored-by: 's avatarWill Binns-Smith <755844+wbinnssmith@users.noreply.github.com>
      8c1f5501
    • Josh Story's avatar
      Consolidate HTML render completion cleanup (#99426) · 94c8017c
      Josh Story authored
      ## Summary
      
      End the App Router HTML render span and client-component load tracking
      from the same SSR completion callback. This follows #99322’s move to
      HTML-render-scoped telemetry and keeps the two measurements from
      drifting to different completion points.
      
      Node retains its immediate `onAllReady` boundary; Web SSR handles both
      fulfilled and rejected `allReady` outcomes. Prerender and error-recovery
      behavior are unchanged.
      
      ## Verification
      
      - Existing streamed-render telemetry tests: dev Webpack and production
      Turbopack, 5 passed each.
      - Production Webpack standalone/Edge suite: 2 passed.
      - Existing logger and response-piping unit tests: 11 passed.
      
      <!-- NEXT_JS_LLM -->
      94c8017c
    • Josh Story's avatar
      Scope client component loading metrics to HTML renders (#99322) · bc8bf60a
      Josh Story authored
      ## Summary
      
      To measure how client component loading affects HTML render performance,
      replace telemetry based on process-global counters and incoming
      request-body completion. Those boundaries mixed overlapping renders and
      measured a lifecycle unrelated to HTML production.
      
      Scope the counters and reporting context to each HTML-producing render.
      Start tracking before SSR, finish dynamic measurements at React
      readiness (Node `onAllReady` / Web `allReady`), and finish prerendering
      when the prerender operation returns. Preparation, action execution, and
      dedicated Flight rendering do not start tracking. DATA-only resumes
      finish tracking locally without waiting for output; an empty tracker
      emits no span. HTML rendered after a form action is still measured.
      
      Already-started loads may settle and report afterward without keeping
      the response open. Preserve the first-write performance snapshot, but
      remove metrics stream wrapping and binding. This advances the larger
      effort to remove req/res lifecycle assumptions from App Router rendering
      without adding telemetry to `after()`.
      
      Behavioral tests cover overlapping renders in both completion orders,
      HTML after a form POST, enhanced actions that only produce Flight, and
      HTML readiness while unused Flight content remains blocked.
      
      ## Verification
      
      - Confirmed both new boundary regressions failed before the runtime
      change.
      - Five behavioral metrics cases pass in development and production with
      both Turbopack and Webpack.
      - Full production Turbopack instrumentation suite: 109 passed, 13
      existing skips.
      - Focused logger/response-piping units: 11 passed. Full repository
      build, package/root types, scoped Prettier, ESLint, and diff checks
      pass.
      - A broader unit run passed 3,065 tests but hit three macOS `/var`
      versus `/private/var` assertions in unchanged TypeScript CLI tests.
      
      Existing Node response-disconnect propagation to upstream SSR is
      unchanged; this PR does not claim to fix cancellation.
      
      <!-- NEXT_JS_LLM -->
      bc8bf60a
    • Jamiboy Mohammad's avatar
      fix: preserve HTTP status codes during prerendering (#99078) · b829c618
      Jamiboy Mohammad authored
      ## Summary
      
      Set the correct HTTP status and redirect location when a prerendered
      page throws `notFound()`, `unauthorized()`, `forbidden()`, `redirect()`,
      or `permanentRedirect()` inside Suspense. Preserve the prerendered
      layout and Suspense fallback so the client can recover at the
      appropriate error boundary.
      
      Redirects take precedence over HTTP access fallbacks. Among access
      fallbacks, or among redirects, the first observed error wins. The HTML
      error callback and prerender recovery catch share this rule, so a later
      fatal not-found error cannot overwrite an already captured redirect. The
      catch still classifies its own error independently of the selected
      response.
      
      Request-time streaming behavior is unchanged. A dynamic not-found after
      `connection()` can still return 200. The custom error UI itself is not
      prerendered and remains a follow-up.
      
      Related:
      [NAR-435](https://linear.app/vercel/issue/NAR-435/set-status-code-on-prerendered-output-whenever-notfound-or-redirect).
      
      ## Verification
      
      - All 57 production Turbopack tests pass with Cache Components enabled
      and disabled, with `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES=true`. This
      includes 44 ordered-error cases covering sibling Suspense boundaries and
      the outer recovery catch, status/location consistency, and preserved
      layout/fallback HTML.
      - Removing the precedence fix causes 22 regression cases to fail.
      - All 36 existing on-demand prerender recovery tests pass with Cache
      Components enabled: `NEXT_SKIP_ISOLATE=1 NEXT_TELEMETRY_DISABLED=1
      __NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES=true __NEXT_CACHE_COMPONENTS=true
      pnpm test-start-turbo
      test/e2e/app-dir/on-demand-prerender-error-boundary/on-demand-prerender-error-boundary.test.ts`.
      - Dev gate verified: all 57 tests are skipped.
      - Local tests used the installed SWC canary.38 binary with Next.js
      canary.42 and emitted a version mismatch warning. Deploy mode was not
      run locally.
      
      <!-- NEXT_JS_LLM -->
      
      ---------
      Co-authored-by: 's avatarJamiboy Mohammad <2085704+jamiboym@users.noreply.github.com>
      b829c618
    • Jamiboy Mohammad's avatar
      test: enable deploy coverage for five verified suites (#99193) · b114f7cf
      Jamiboy Mohammad authored
      ## Summary
      
      Enable deploy testing for five suites: middleware page extensions, mixed
      proxy page extensions, false aliases, CSS module ordering, and
      conflicting service worker registrations. Their deploy-mode assertions
      check served responses, browser-rendered styles, or a specific remote
      build failure.
      
      ## Verification
      
      The retained changes passed [Turbopack deploy
      CI](https://github.com/vercel/next.js/actions/runs/36188078111) at
      `293d58d`, including cache-components jobs. Webpack deploy behavior
      remains unverified.
      
      Local formatting and ESLint checks passed. The four restored files match
      the PR base exactly, and the five retained files are unchanged. A full
      local bootstrap could not complete because this worktree lacks
      package-level dependencies (`microbundle`).
      
      <!-- NEXT_JS_LLM -->
      
      ---------
      Co-authored-by: 's avatarClaude Opus 5 <noreply@anthropic.com>
      b114f7cf
    • Aurora Scharff's avatar
      Document agent feedback field limits (#99415) · 63bb9d6a
      Aurora Scharff authored
      ## Summary
      
      Document the schema v5 field-length limits enforced by the agent
      feedback review form so agents can prepare valid report links instead of
      receiving a generic decode failure.
      
      Add a focused test that keeps the protocol aligned with the form limits.
      
      ## Verification
      
      - `pnpm exec jest
      packages/next/src/cli/internal/agent-feedback-instructions.test.ts
      --runInBand`
      - Prettier and ESLint on the changed files
      
      <!-- NEXT_JS_LLM -->
      63bb9d6a
    • Josh Story's avatar
      test: migrate tooling deploy exclusions to force gates (#98156) · cfa2956c
      Josh Story authored
      ## Summary
      
      Migrate the remaining configuration, TypeScript, bundler, compiler,
      loader, export, and monorepo deployment exclusions to `@force-gate` and
      remove their `skipDeployment`/`skipped` control flow. This stack is
      rooted at canary and independent of #98430; it preserves deployment
      coverage already enabled on canary.
      
      The workspace/root-inference files covered by #99012 are omitted.
      
      ## Verification
      
      - Compared test registration against canary in development, production,
      and deploy modes with test bodies and hooks disabled (Webpack). Existing
      active deployment assertions are preserved; development/production test
      selection is unchanged apart from replacing empty skip placeholders with
      skipped real tests.
      - Gate unit tests: 78 passed.
      - TypeScript, Prettier, and ESLint checks passed. Registration probes
      use a default config for lazy predicates and do not exercise fixture
      setup or test bodies.
      - Full bootstrap attempted, but the local native SWC build fails at
      `cargo metadata` with `EPERM`; full integration/deployment execution
      remains for CI.
      
      <!-- NEXT_JS_LLM -->
      cfa2956c
    • Benjamin Woodruff ‮'s avatar
      Turbopack: Don't force non-recursive watcher for additional roots (#99396) · 6a8cec78
      Benjamin Woodruff authored
      I was forcing non-recursive mode here because I imagined it might be
      better for the GVS use-case where we only care about relatively few
      files, but apparently setting up new fsevents watches on macOS is very
      slow, which caused this to effectively hang the compiler for any project
      with many dependencies on macOS.
      6a8cec78
  2. 28 Sep, 2026 16 commits
    • next-js-bot[bot]'s avatar
      v16.4.0-canary.52 · 664b9bb5
      next-js-bot[bot] authored
      664b9bb5
    • Hendrik Liebau's avatar
      [test] Stabilize middleware revalidation test (#99378) · ac00f185
      Hendrik Liebau authored
      The grid page title used a random value whose string length varied. The
      RSC shell byte offset includes the title bytes. The test removes the
      title value before comparing two responses, but the `b:` row retains the
      original offset, so the equality assertion fails when the title lengths
      differ. The fixture now formats the value to 16 decimal places to keep
      the offset stable.
      
      [Flakiness
      metrics](https://app.datadoghq.com/ci/test/runs?query=test_level%3Atest%20%40git.repository.id%3A%22github.com%2Fvercel%2Fnext.js%22%20%40test.name%3A%22middleware-static-rewrite%20should%20revalidate%20the%20overview%20page%20without%20replacing%20it%20with%20a%20404%22%20%40test.status%3A%28%22fail%22%20OR%20pass%29&agg_m=count&agg_m_source=base&agg_t=count&fromUser=false&index=citest&start=1790020370174&end=1790625170174&paused=false)
      
      <img width="416" height="175" alt="Screenshot 2026-09-28 at 21 53 35"
      src="https://github.com/user-attachments/assets/6ca08128-6bd3-4c2e-aa41-37d2897425e0"
      />
      ac00f185
    • Jimmy Miller's avatar
      test: scope loader build dependency update to Turbopack (#99380) · e2de3c0b
      Jimmy Miller authored
      Run the loader build-dependency update assertion only with Turbopack.
      Webpack records `addBuildDependency` for build-cache invalidation but
      does not watch it for dev recompilation, which caused this assertion to
      fail in webpack CI. Replace the neighboring dependency-file test’s fixed
      delay with polling so it waits for the actual update.
      e2de3c0b
    • Jarren's avatar
      Remove CLAUDE.md symlinks in favor of AGENTS.md (#98910) · 52ee9256
      Jarren authored
      ### What?
      
      Removes the three `CLAUDE.md` symlinks that point at `AGENTS.md` (repo
      root, `.github/`, and `turbopack/`), drops the "CLAUDE.md is a symlink"
      note from `AGENTS.md`, and removes the now-unused `CLAUDE.md` entry from
      `.alexignore`.
      
      ### Why?
      
      Claude Code now reads `AGENTS.md` directly, so the symlinks are
      redundant. Keeping a single instruction file avoids the two drifting
      apart.
      
      ### Notes
      
      - The `CLAUDE.md` fixtures under `evals/next-upgrade/evals/*` are
      intentionally untouched. They simulate user projects for the upgrade
      evals rather than repo instructions.
      - No changes to `create-next-app` or `@next/codemod`, which still
      generate `CLAUDE.md` for user projects.
      52ee9256
    • Luke Sandberg's avatar
      Align ExecuteContext task accessor names (#99258) · ca3a3279
      Luke Sandberg authored
      ### What?
      
      Align `ExecuteContext` task accessors around their behavior when a task
      is absent: keep the frequently used `task`, use `try_task` for optional
      access, and `task_or_create` where storage may need to be materialized.
      
      ### Why?
      
      The three operations had inconsistent names despite sharing the same
      task-access mechanism. In addition, the diagnostic `get_task_name` path
      could create storage merely to name a missing task.
      
      ### How?
      
      Keep the shared private task-opening logic and its existing access
      policies; rename the public context methods and their callers.
      `get_task_name` now takes the optional path and returns `"unknown"` if
      the task is absent, without creating storage. The separate
      `Backend::get_or_create_task` API is unchanged.
      
      ### Verification
      
      - `cargo fmt --all -- --check`
      - `cargo test -p turbo-tasks-backend --test basic --test errors --test
      invalidation` (19 passed)
      - `git diff --check`
      
      
      <!-- fleet 8ec6f3d1-8af4-46e7-9a88-fd25742f533d -->
      
      ---------
      Co-authored-by: 's avatarvercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com>
      Co-authored-by: 's avatarLuke Sandberg <210140+lukesandberg@users.noreply.github.com>
      ca3a3279
    • Jimmy Miller's avatar
      [test] Stabilize responsive dev overlay header layout test (#99376) · 238fe941
      Jimmy Miller authored
      Check one-row and wrapped layouts using the rendered header widths so
      the test remains valid as the displayed version changes.
      238fe941
    • Jimmy Miller's avatar
      Turbopack: skip trimmed side-effect imports in SideEffectsModule (#95781) · 5eb90193
      Jimmy Miller authored
      A star re-export barrel with imports but no top-level side effects is
      classified ModuleEvaluationIsSideEffectFree.
      follow_reexports_with_side_effects
      treats that as effectful and builds a SideEffectsModule that emits
      TURBOPACK_IMPORT(<eval part id>), but
      compute_side_effect_free_module_info
      classifies the same module as side-effect-free, so binding-usage prunes
      the
      Evaluation edge and the eval part never gets a module id. The build then
      panicked with 'ModuleId not found for ident: .../barrel.ts <internal
      part 0>'
      during middleware chunking.
      
      SideEffectsModule is designed so graph tree-shaking may trim these
      imports, so
      the consumer must tolerate a trimmed side effect. Add
      ModuleIdStrategy::try_get_id_from_module (returns None instead of
      erroring when
      an explicit id map lacks the module) and have chunk_item_content skip
      side
      effects with no id -- a pruned side-effect-free module has nothing to
      evaluate.
      
      Adds an e2e regression test (treeshake-mw).
      5eb90193
    • Jimmy Miller's avatar
      Turbopack: preserve import `with` clauses when direct-binding (#95529) · 9f93a7eb
      Jimmy Miller authored
      binding_source now carries the import's `with` clause
      (Option<Box<ObjectLit>>) so re-emitting the import in the consuming
      fragment keeps the same resolution semantics. Dropping it made
      transition imports (e.g. turbopack-transition) resolve to undefined at
      evaluation under tree-shaking.
      9f93a7eb
    • Jimmy Miller's avatar
      Turbopack: fix split_module correctness for app-router (#95522) · 6725df0a
      Jimmy Miller authored
      Turbopack: fix split_module correctness for app-router
      
      - Don't split the generated __nextjs-internal-proxy. client-reference
        proxy module. Its exports are all used, so splitting yields no benefit
        and duplicates its <exports> part in the module graph, tripping the
        duplicate-ident check in ModuleGraph::from_graphs.
      - Pass the original comments to each fragment so magic-comment
        annotations (turbopackChunkingType, turbopackExports) are still
        parsed. Fragment ASTs keep their original spans, so comments resolve
        at the same byte positions. Without this, references fall back to
        defaults (ChunkingType::Shared -> Parallel), breaking app-router
        layout-segment chunk groups.
      6725df0a
    • Jimmy Miller's avatar
      Turbopack: fix empty tree-shake chunks desyncing part ids (#93424) (#95516) · 1219f499
      Jimmy Miller authored
      split_module skipped chunks whose body ended up empty, but the group
      index is used directly as a part id by outputs
      (Key::Export/Key::ModuleEvaluation), part_deps, and the PartId::Internal
      asserts embedded in the emitted chunk ASTs. Skipping shifted every later
      module's position and desynced those indices, causing out-of-bounds
      panics in split_module and wrong-fragment selection in part_of_module.
      Always push a module for every group; use a well-formed side-effect-free
      `export {}` placeholder when the body is empty.
      
      Update tree-shaker analyzer snapshots to include the placeholder parts.
      1219f499
    • Hendrik Liebau's avatar
      Fix custom cache handlers missing on initial requests (#99372) · b2534bc4
      Hendrik Liebau authored
      Startup preloading can initialize the built-in handler map before a
      configured handler finishes loading. A request that reaches `'use
      cache'` during the import can use the built-in handler instead of the
      configured handler. Next.js now waits for registration to finish before
      rendering that request. The server, route module, and export helper
      share the registration promise.
      
      Regression tests verify that the first request uses the configured
      handler with startup preloading enabled. The affected fixtures no longer
      disable preloading. Preloading also logs failed handler imports without
      an unhandled rejection.
      b2534bc4
    • Hendrik Liebau's avatar
      Allow Draft Mode on unlisted closed routes in adapter deployments (#99370) · b9adf551
      Hendrik Liebau authored
      On adapter deployments, a Draft Mode request for an unpublished URL
      incorrectly returns 404 instead of rendering the preview. This affects
      App Router pages with `dynamicParams = false` and Pages Router pages
      with `fallback: false` when the build did not generate that URL. An
      ordinary request to the same URL should still return 404.
      
      The adapter previously required both `__prerender_bypass` and
      `__next_preview_data` to route the request. Pages Router
      `setDraftMode()` and App Router `draftMode().enable()` set only
      `__prerender_bypass`. The adapter now routes requests whose bypass
      cookie matches the build's preview ID. Pages Router still validates
      legacy preview data when present and rejects malformed payloads.
      
      The Pages regression tests cover document and data requests, malformed
      preview data, and public cache isolation. The App Router draft test now
      runs on adapter deployments. These cases also run in dev and `next
      start`. The legacy builder deploy jobs skip them.
      b9adf551
    • Will Binns-Smith's avatar
      Fix bundle analyzer source table delta sorting (#99369) · 3932a6bd
      Will Binns-Smith authored
      ## Summary
      
      Follow-up to #98539 addressing [Luke’s `toSorted()`
      feedback](https://github.com/vercel/next.js/pull/98539#discussion_r4098899189),
      [signed Δ ordering
      feedback](https://github.com/vercel/next.js/pull/98539#discussion_r4098962512),
      and [locale-aware name tie-breaker
      feedback](https://github.com/vercel/next.js/pull/99369#discussion_r4125394575).
      
      The source table sorts individual rows and package aggregates by signed
      Δ in either direction; identical rows and groups remain last for every
      column. The separate impact-ranked route picker is unchanged, and table
      sorting uses `toSorted()` to preserve input arrays. Numeric ties now use
      the same locale-aware name ordering as the Name column.
      
      In compare mode the table defaults to **Changes**, showing added,
      removed, and changed sources; **All** opts into unchanged sources. The
      footer still reports full build totals. Single-build mode remains
      unfiltered because its rows are all compared to themselves.
      
      ## Verification
      
      - Focused filter checks: 6/6 passed (baseline 2/6).
      - Focused sorting checks: 12/12 passed (two new comparator cases failed
      before the fix).
      - `pnpm exec prettier --check
      apps/bundle-analyzer/components/diff-table.tsx`
      - `pnpm exec eslint --config eslint.config.mjs
      apps/bundle-analyzer/components/diff-table.tsx`
      - `pnpm exec tsc -p apps/bundle-analyzer/tsconfig.json --noEmit`
      
      <!-- NEXT_JS_LLM -->
      
      <!-- fleet d2af60a7-2332-4bf1-a425-0329992b44dd -->
      
      ---------
      Co-authored-by: 's avatarvercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com>
      Co-authored-by: 's avatarWill Binns-Smith <755844+wbinnssmith@users.noreply.github.com>
      3932a6bd
    • Janka Uryga's avatar
      test: fix stale snapshots after `unstable_{prefetch,navigation}` rename (#99371) · 520925bb
      Janka Uryga authored
      `ensureStatic = "navigation"` was merged without rebasing, so the
      snapshots had some references to `unstable_{prefetch,navigation}` even
      though the APIs already dropped the `unstable_` prefix on canary.
      520925bb
    • Will Binns-Smith's avatar
      Virtualize bundle analyzer source table (#98539) · 2319b65b
      Will Binns-Smith authored
      Virtualize source rows with `react-virtuoso` to avoid mounting the full
      table at once.
      
      Preserve sorting, filtering, grouped package expansion, sticky headers,
      totals, selection, and semantic table markup. Render an additional
      viewport around the visible range to avoid blank content during fast
      scrolling.
      
      <!-- NEXT_JS_LLM -->
      Co-authored-by: 's avatarvercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com>
      Co-authored-by: 's avatarWill Binns-Smith <755844+wbinnssmith@users.noreply.github.com>
      2319b65b
    • Janka Uryga's avatar
      [PPF] Remove leftover debug log in router (#99365) · 3a5205b8
      Janka Uryga authored
      Debugging leftover from #99171.
      3a5205b8