1. 10 Mar, 2026 6 commits
  2. 09 Mar, 2026 19 commits
    • nextjs-bot's avatar
      v16.2.0-canary.87 · 92b854dd
      nextjs-bot authored
      92b854dd
    • Benjamin Woodruff's avatar
      docs(turbopack): Copy over turbopack-trace-server docs (#91111) · ae6406af
      Benjamin Woodruff authored
      **Rendered:** https://github.com/vercel/next.js/blob/dd1cc6fba3cff5fbc38dac3ff4426b481bfcbcb5/contributing/turbopack/tracing.md
      
      This is the content from https://turbopack-rust-docs.vercel.sh/tracing_turbopack.html with some minor updates:
      
      - Use GitHub Flavored Markdown for the warning block
      - Some grammar fixes/tweaks
      - Add an extra note about `--release` being important
      - Add a mention of `pnpm next internal trace`
      - Add a link to @timneutkens's youtube video
      - Change the filepath from the old confusingly named `.next/trace.log` to `.next/trace-turbopack`
      - Add a link to https://trace.nextjs.org/
      ae6406af
    • nextjs-bot's avatar
      v16.2.0-canary.86 · 2ecfbfc1
      nextjs-bot authored
      2ecfbfc1
    • Zack Tanner's avatar
      fix: app-page URL normalization (#91121) · 4e2353ed
      Zack Tanner authored
      ## Summary
      
      Fix an App Router request normalization gap where app-page route-module
      requests could keep internal RSC/segment-prefetch URLs in `req.url`.
      
      This could leak paths like:
      
      - `.../.segments/_tree.segment.rsc`
      - `.../__PAGE__.segment.rsc`
      
      into App Router render state and surface through `usePathname()` during
      server rendering.
      
      ## What changed
      
      - Normalize `req.url` in the app-page route-module path after `.rsc` and
      `.segments/*.segment.rsc` pathname normalization.
      
      ## Why
      
      `base-server` already keeps `req.url` in sync after RSC normalization
      ([ref](https://github.com/vercel/next.js/blob/5e11e67759fa38fe67f70790d7bba8c9ff9ba5fd/packages/next/src/server/base-server.ts#L676-L680)),
      but the app-page route-module path only updated `parsedUrl.pathname`.
      
      Since App Router render state seeds its canonical URL from `req.url`,
      that desync could cause internal segment-prefetch paths to be treated as
      the current pathname.
      4e2353ed
    • Zack Tanner's avatar
      partial fallbacks: gate behind experimental flag (#91123) · c0bf4b6f
      Zack Tanner authored
      This puts the partial fallback upgrading feature introduced in
      https://github.com/vercel/next.js/pull/89063 behind a flag to make it
      easier to test the rollout/eventual stabilization in isolation.
      c0bf4b6f
    • Will Binns-Smith's avatar
      Turbopack: Pass hmr_enabled to ImportMetaBinding (#91118) · 5e11e677
      Will Binns-Smith authored
      `is_hot_module_replacement_enabled` was removed from ChunkingContexts.
      Instead, pass it through from CompileTimeInfo when constructing
      ImportMetaBinding during analysis.
      
      Test Plan: CI
      5e11e677
    • Benjamin Woodruff's avatar
      docs(contributing): Update setup in contributing/core/developing.md (#91018) · 15d9b717
      Benjamin Woodruff authored
      A lot of stuff here was slightly out-of-date or not as helpful as it could be.
      
      For the Linux bits, I tested with a fresh Ubuntu image in LXD.
      15d9b717
    • Tobias Koppers's avatar
      Turbopack: implement module.hot.accept(deps, cb) and module.hot.decline(deps) (#90443) · 014b9987
      Tobias Koppers authored
      ### What?
      
      Implements dependency-level HMR accept and decline for Turbopack,
      covering both ESM (`import.meta.turbopackHot`) and CJS (`module.hot`)
      modules.
      
      Previously Turbopack only supported self-accept (`module.hot.accept()`
      with no arguments) and self-decline. This PR adds the full
      dependency-targeted API:
      
      - `module.hot.accept(dep, cb)` / `import.meta.turbopackHot.accept(dep,
      cb)` — single dep
      - `module.hot.accept([depA, depB], cb)` /
      `import.meta.turbopackHot.accept([depA, depB], cb)` — array of deps
      - `module.hot.decline(dep)` / `import.meta.turbopackHot.decline(dep)` —
      single dep
      - `module.hot.decline([depA, depB])` /
      `import.meta.turbopackHot.decline([depA, depB])` — array of deps
      
      ### Why?
      
      Libraries like `react-refresh` and user code often need to accept
      updates for specific dependencies rather than self-accepting the entire
      module. Without this, those HMR patterns fall back to full page reloads
      in Turbopack.
      
      ### How?
      
      **Runtime** (`turbopack-ecmascript-runtime`):
      - Extended `HotState` with `acceptedDependencies`,
      `acceptedErrorHandlers`, and `declinedDependencies` maps (keyed by
      `ModuleId`)
      - Updated `hot.accept()` and `hot.decline()` to handle string and array
      signatures
      - Updated `getAffectedModuleEffects` to check accepted/declined
      dependencies when propagating updates through the module graph
      - Added `'declined'` effect type that throws an `UpdateApplyError`
      - Track `outdatedDependencies` (map of parent → set of updated deps)
      alongside `outdatedModules`
      - In the apply phase, invoke per-dependency accept callbacks with the
      correct outdated deps
      - Use `Set` for `outdatedDependencies` dedup (O(1) vs O(n) lookups)
      
      **Compiler** (`turbopack-ecmascript`):
      - Added `ModuleHotReferenceAssetReference` — a single asset reference
      type for both accept and decline deps, with shared resolve logic for ESM
      (`esm_resolve`) and CJS (`cjs_resolve`)
      - Added `ModuleHotReferenceCodeGen` — generates code that replaces dep
      string literals with resolved module IDs at compile time
      - ESM binding auto-update: when an ESM module accepts a dependency that
      it also `import`s, the compiler wraps the accept callback to re-import
      the namespace variable (`__TURBOPACK__imported__module__<id> =
      __turbopack_import__(<id>)`) before the user callback runs, so ESM
      bindings reflect updated values without needing `require()`
      - Added `import.meta.turbopackHot` as the ESM equivalent of
      `module.hot`, with TypeScript type declarations in
      `packages/next/types/global.d.ts`
      - Static analysis extracts dep strings from
      `module.hot.accept`/`decline` calls; non-analyzable deps emit a warning
      with distinct error codes (`TP1204` for accept, `TP1205` for decline)
      
      **HMR gating** (`CompileTimeInfo`):
      - Added `hot_module_replacement_enabled` flag to `CompileTimeInfo` to
      gate recognition of `module.hot` and `import.meta.turbopackHot` as
      well-known objects
      - Without this flag, production builds would recognize
      `module.hot.accept(...)` and generate HMR-specific code, leading to
      runtime errors
      - Flag set to `true` for dev servers and `false` for production builds
      across Next.js and turbopack-cli entry points
      - `import.meta.turbopackHot` getter is only emitted when HMR is enabled
      
      **Server HMR** (`next-api`, `next-core`):
      - Server-side `compile_time_info` now also sets
      `hot_module_replacement_enabled` so that `module.hot` /
      `import.meta.turbopackHot` are recognized during analysis of server
      modules
      - Server HMR requires the `--experimental-server-fast-refresh` CLI flag;
      the flag is passed through `ProjectOptions` to the Rust side so
      `server_compile_time_info` only enables HMR when appropriate
      
      **Tests** (`test/development/app-dir/hmr-dep-accept/`):
      - ESM single dep accept — verifies parent module is not re-evaluated,
      accept callback fires, ESM bindings auto-update
      - ESM array dep accept — same as above with `accept(['./dep-a',
      './dep-b'], cb)`
      - CJS `module.hot.accept` — pure CJS dep observer pattern with `.cjs`
      files
      - Single dep decline — verifies full page reload occurs
      - Array dep decline — verifies full page reload with
      `decline(['./dep-a', './dep-b'])`
      014b9987
    • Tobias Koppers's avatar
      Improve unsafe code safety documentation in turbo-tasks-backend (#90755) · 6a733742
      Tobias Koppers authored
      ### What?
      
      Improves safety documentation for all `unsafe` code in the
      `turbo-tasks-backend` crate (6 files, comment-only changes).
      
      ### Why?
      
      A comprehensive audit of all 14 files containing `unsafe` code in
      `turbo-tasks-backend` found **no soundness bugs**, but identified
      several safety comments that were incorrect, misleading, or missing
      entirely. Correct safety documentation is critical for maintaining
      unsafe code over time — reviewers and future contributors rely on these
      comments to understand invariants.
      
      ### How?
      
      **Fixes applied (comment-only, no behavior changes):**
      
      1. **`backend/operation/mod.rs`** — Fixed transmute safety comment that
      referenced wrong lifetime names (`'a`/`'l` → `'e`/`'tx`)
      2. **`database/read_transaction_cache.rs`** — Fixed reference to wrong
      struct name (`LmdbBackingStorage` → `ReadTransactionCache`); added
      struct-level doc explaining the field-ordering invariant required for
      drop safety
      3. **`database/startup_cache.rs`** — Added struct-level doc explaining
      the self-referential pattern and field-ordering invariant; improved
      inline safety comment
      4. **`utils/dash_map_multi.rs`** — Added safety justification for
      `unsafe impl Send/Sync` on `RefMut` explaining bucket pointer
      exclusivity
      5. **`backing_storage.rs`** — Added `// Safety:` comments to 6 `unsafe`
      blocks in the `Either` impl that were missing them
      6. **`kv_backing_storage.rs`** — Made the `flush()` safety comment more
      specific about what "finished processing" means
      
      **Audit summary (14 files reviewed):**
      
      | Risk | Category | Files | Verdict |
      |------|----------|-------|---------|
      | HIGH | Lifetime transmutation | 3 | Sound ✓ — comments fixed |
      | MEDIUM | DashMap raw bucket access | 3 | Sound ✓ — Send/Sync docs
      added |
      | LOW | Unsafe trait method contracts | 8 | Sound ✓ — missing comments
      added |
      | NEGLIGIBLE | Test code | 1 | No issues |
      6a733742
    • Tobias Koppers's avatar
      Fix preview tarball script to include @next/swc-linux-x64-gnu (#91099) · 9c939729
      Tobias Koppers authored
      ### What?
      
      Adds `@next/swc-linux-x64-gnu` to the preview tarball patching script
      (`scripts/patch-preview-tarball.mjs`):
      
      1. Adds the package to the `PACKAGES_TO_PATCH` list so its tarball URL
      is fetched.
      2. Adds the package as an explicit dependency in the patched
      `package.json`, in addition to the overrides/resolutions.
      
      ### Why?
      
      The `@next/swc-linux-x64-gnu` native binary package is an optional
      dependency of `next` and may not be installed automatically depending on
      the platform/package manager. When testing preview tarballs (e.g., in CI
      or on Linux environments), the SWC binary needs to be explicitly present
      for Next.js to function correctly. Without this change, preview tarball
      testing on Linux x64 could fail because the native binary isn't resolved
      from the preview build.
      
      Adding it as a direct dependency (not just an override/resolution)
      ensures the package manager actually installs it, since optional
      dependencies from overridden tarballs may not be auto-resolved.
      
      ### How?
      
      - Added `'@next/swc-linux-x64-gnu'` to the `PACKAGES_TO_PATCH` array so
      the script fetches its tarball URL.
      - After writing overrides/resolutions, the script now also adds
      `@next/swc-linux-x64-gnu` as an explicit entry in `pkg.dependencies`
      pointing to the tarball URL.
      Co-authored-by: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      9c939729
    • Kowyo's avatar
      example: remove duplicate items in .dockerignore (#91079) · 5a226232
      Kowyo authored
      Removed duplicate entries for cache and temporary directories.
      
      ```diff
      - # Cache directories and temporary data
      - .cache/
      - .parcel-cache/
      - .eslintcache
      - .stylelintcache
      - .turbo/
      - .tmp/
      # Cache directories and temporary data
      .cache/
      .parcel-cache/
      .eslintcache
      .stylelintcache
      .swc/
      .turbo/
      .tmp/
      .temp/
      ```
      Co-authored-by: 's avatarJoseph <joseph.chamochumbi@vercel.com>
      5a226232
    • Ethan (Taehoon) Lee's avatar
      docs(localFont): enhance details about using the localFont function (#88189) · 5e4a54ea
      Ethan (Taehoon) Lee authored
      ### What?
      Enhance the documentation about how to use the `localFont` function.
      
      ### Why?
      The Next.js documentation about [local
      fonts](https://nextjs.org/docs/app/getting-started/fonts#local-fonts)
      has insufficient information about where to store the font files and how
      to reference them with the `localFont` function. The lack of detail
      causes confusion like this issue:
      https://github.com/vercel/next.js/issues/76573.
      
      ### How?
      I created a [demo](https://nextjs-localfont-demo.vercel.app/) to
      investigate the behavior of the `localFont` function (source:
      https://github.com/ethn1ee/nextjs-localfont-demo). I confirmed that the
      font files can be located anywhere inside the project, including at
      root, the `src` directory, the `app` directory, and the `public`
      directory, and that they must all be referenced using relative paths.
      
      Fixes #76573
      
      ---------
      Co-authored-by: 's avatarEthan Lee <48551278+ethn1ee@users.noreply.github.com>
      Co-authored-by: 's avatarJoseph <sephxd1234@gmail.com>
      Co-authored-by: 's avatarJoseph <joseph.chamochumbi@vercel.com>
      5e4a54ea
    • Joseph's avatar
      fix: run lerna on a branch (#91092) · 762bff65
      Joseph authored
      Trying to fix: `lerna ERR! ENOGIT Detached git HEAD, please checkout a
      branch to choose versions.` on `set-preview-version.js`
      
      [Slack
      thread](https://vercel.slack.com/archives/C02CDC2ALJH/p1773051154649349)
      762bff65
    • Niklas Mischkulnig's avatar
      Turbopack: don't panic due to eventual consistency in module merging (#91088) · 1ead596c
      Niklas Mischkulnig authored
      Turn into bail to handle eventual consistency more gracefully
      1ead596c
    • Tobias Koppers's avatar
      Fix pr-status script missing failed jobs on page 2+ of API results (#91087) · 3ba53df7
      Tobias Koppers authored
      ## Summary
      
      `getFailedJobs()` in `scripts/pr-status.js` used jq's `select(.conclusion == "failure")` filter during GitHub API pagination. When a page had 100 jobs but none were failures, jq returned empty output, and the `if (!output.trim()) break` check terminated the pagination loop early — never fetching page 2+ where actual failures existed.
      
      For example, on PR #90755 (129 total jobs), all 100 jobs on page 1 were success/skipped, while the 2 failures (`test unit windows (22) / build` and `thank you, next`) were on page 2 (jobs 101-129). The script reported "Found 0 failed jobs" when there were actually 2.
      
      ## Fix
      
      `getFailedJobs()` now delegates to `getAllJobs()` (which fetches all jobs without jq filtering, so pagination works correctly) and filters for failures in JavaScript afterward. This is simpler and avoids the class of bug where jq pre-filtering interacts badly with pagination.
      
      ## Test Plan
      
      - Ran `node scripts/pr-status.js 90755` before fix: reported 0 failed jobs
      - Ran `node scripts/pr-status.js 90755` after fix: correctly reported 2 failed jobs (`test unit windows (22) / build` and `thank you, next`)
      3ba53df7
    • Tobias Koppers's avatar
      Add script to patch project with preview tarball URLs (#91057) · 5e965bbb
      Tobias Koppers authored
      ### What?
      
      Adds a new script `scripts/patch-preview-tarball.mjs` that patches a
      target project's `package.json` to use Next.js preview tarballs from
      `vercel-packages.vercel.app`.
      
      ### Why?
      
      When testing unreleased Next.js changes against external projects (e.g.,
      reproducing bugs, verifying fixes), there's no convenient way to point a
      project at a specific Next.js commit's build artifacts. This script
      automates the process of wiring up preview tarball URLs into a project's
      dependency overrides.
      
      ### How?
      
      The script:
      
      1. **Resolves a commit SHA** via one of three methods:
         - `--commit <sha>` — use an explicit commit
      - `--branch <name>` — look up the branch tip via the GitHub API (`gh`)
         - *(default)* — use the local `git rev-parse HEAD`
      
      2. **Builds tarball URLs** for `next`, `@next/mdx`, `@next/env`, and
      `@next/bundle-analyzer` using the
      `vercel-packages.vercel.app/next/commits/<sha>/<pkg>` pattern.
      
      3. **Verifies** that the preview tarball exists (HEAD request to the
      `next` tarball URL).
      
      4. **Patches `package.json`** in the target project (or its workspace
      root) by setting both `overrides` (npm/pnpm) and `resolutions` (yarn)
      for the packages.
      
      **Usage:**
      
      ```bash
      node scripts/patch-preview-tarball.mjs --project <path> [--commit <sha> | --branch <name>]
      ```
      5e965bbb
    • Niklas Mischkulnig's avatar
      Turbopack: correctly use ChunkGroup::Shared (#90978) · fda324e2
      Niklas Mischkulnig authored
      I don't think we have any tests that the server utility chunking actually works.
      But I can't actually properly remember why we added it in the first place: https://github.com/vercel/next.js/pull/70461
      fda324e2
    • Tobias Koppers's avatar
      Improve webpack loader error messages and handling (#89698) · 60f903c7
      Tobias Koppers authored
      ## What?
      
      This PR improves error reporting for webpack loaders by:
      
      1. **Preserving loader paths in error messages**: Modified the webpack
      message formatter to rewrite "Module build failed" headers to preserve
      the loader path information while removing the verbose prefix. This
      makes errors more readable in both CLI output and error overlays.
      
      2. **Better error wrapping for non-Error throws**: When loaders throw
      non-Error values (strings, objects, etc.), the error is now wrapped with
      loader path information in the stack trace, making it easier to identify
      which loader caused the error.
      
      3. **Catching deferred loader errors**: Added handling for errors that
      occur after loader completion (e.g., unhandled Promise rejections,
      setTimeout throws) by:
         - Adding an `unhandledRejection` handler in the IPC layer
      - Delaying resolution in webpack-loaders transform to allow error
      handlers to fire before sending the 'end' message
      
      4. **Conditional `(from ...)` annotation**: The `(from
      /path/to/loader.js)` annotation is only added when the loader path is
      **not already visible** in the error's stack trace. This avoids
      redundant noise for errors that already include the loader in their
      stack, while still providing the annotation for errors without loader
      context (string throws, errors without stacks, etc.).
      
      5. **Hiding internal Next.js loader paths**: Internal Next.js loader
      paths (under `next/dist/`) are filtered from error messages since
      they're noise for users. Only user-authored loader paths are shown.
      
      6. **Comprehensive test coverage**: Added e2e tests covering various
      error scenarios (Error throws, string throws, Promise rejections,
      setTimeout errors, no-stack errors, filesystem errors) with verification
      of both CLI output and error overlay display.
      
      ## Why?
      
      Webpack loader errors were previously difficult to debug because:
      - The verbose "Module build failed" prefix obscured the actual error
      message
      - Non-Error throws lost their context and loader information
      - Deferred errors (Promise rejections, async throws) were not properly
      surfaced
      - Error overlays didn't clearly show which loader caused the problem
      - The `(from ...)` annotation was always added, even when the loader
      path was already in the stack trace (addressed per review feedback)
      
      ## How?
      
      - **format-webpack-messages.ts**: Changed from filtering out loader
      headers to rewriting them, preserving the `(from ./loaders/...)`
      information. Internal Next.js loader paths are hidden.
      - **webpack-loaders.ts**: Added error wrapping for non-Error values,
      deferred resolution to catch async errors, and conditional `(from ...)`
      annotation that checks `err.stack` before appending. Resolves loader
      paths into an array, then checks if any path appears in the stack before
      deciding to annotate.
      - **ipc/index.ts**: Added `unhandledRejection` handler to surface
      Promise-related errors.
      - **Test loaders**: `error-loader.js` and `fs-error-loader.js` delegate
      to a `create-error.js` helper that creates errors and invokes the loader
      callback inside `setTimeout`. This ensures the loader file path is
      absent from the stack trace, exercising the conditional `(from ...)`
      annotation path. Other loaders (string-error, promise-error,
      timeout-error, no-stack-error) test different error scenarios directly.
      - **Test suite**: Comprehensive e2e tests verify CLI output and error
      overlay for each error type. Turbopack-specific tests cover promise
      rejections, timeout errors, no-stack errors, and filesystem errors.
      
      ---------
      Co-authored-by: 's avatarClaude <noreply@anthropic.com>
      60f903c7
    • Tobias Koppers's avatar
      Turbopack: show specific SWC error messages as error titles (#91022) · 1287f9a0
      Tobias Koppers authored
      ### What?
      
      Changes Turbopack's error overlay to show specific SWC diagnostic
      messages as the error title instead of generic messages like "Parsing
      ecmascript source code failed" or "Ecmascript file had an error".
      
      ### Why?
      
      Previously, all SWC parse/analysis errors in Turbopack showed a generic
      title (e.g. "Parsing ecmascript source code failed") in the redbox
      header, with the actual specific error message buried in the description
      below the code frame. This made it harder for developers to quickly
      understand what went wrong.
      
      **Before:**
      ```
      Parsing ecmascript source code failed
      > 1 | export default () => <div/
          |                           ^
      Expected '>', got '<eof>'
      ```
      
      **After:**
      ```
      Expected '>', got '<eof>'
      > 1 | export default () => <div/
          |                           ^
      Parsing ecmascript source code failed
      ```
      
      ### How?
      
      **Core change** in
      `turbopack/crates/turbopack-swc-utils/src/emitter.rs`:
      
      When the `IssueEmitter` has a `self.title` set (the generic title like
      "Parsing ecmascript source code failed"), the SWC diagnostic message is
      now used as the issue title, and the generic title is demoted to the
      description. When `self.title` is not set, the existing behavior is
      preserved (first line of message becomes title, rest becomes
      description).
      
      **Test updates** across ~15 test files:
      
      Updated all `isTurbopack` branches in test expectations to reflect the
      swapped title/description. Only Turbopack-specific branches were
      modified; webpack and rspack expectations are unchanged.
      
      **New test suite** (`test/development/app-dir/ecmascript-error-title/`):
      
      Dedicated tests verifying that both syntax errors (e.g. `Expected '>',
      got '<eof>'`) and analysis errors (e.g. `the name 'Table' is defined
      multiple times`) show the specific SWC message as the redbox title.
      
      **Turbopack snapshot updates:**
      
      4 snapshot files renamed to reflect new titles (e.g. `Parsing ecmascript
      source code failed-*.txt` → `Expression expected-*.txt`).
      
      ---------
      Co-authored-by: 's avatarClaude <noreply@anthropic.com>
      1287f9a0
  3. 07 Mar, 2026 4 commits
  4. 06 Mar, 2026 11 commits
    • nextjs-bot's avatar
      v16.2.0-canary.84 · 65fe53d4
      nextjs-bot authored
      65fe53d4
    • Jonas Herrmannsdörfer's avatar
      fix: trigger MPA navigation for server action redirects with build ID mismatch (#89946) · c7df8e99
      Jonas Herrmannsdörfer authored
      ## Summary
      
      - Fixes cross-zone server action redirect failure where `redirect()`
      inside a server action produces a blank page when the target path is
      served by a different Next.js zone (separate Vercel project, same
      domain)
      - Adds build ID validation to `server-action-reducer.ts`, matching the
      existing pattern in `fetch-server-response.ts`
      - Adds e2e test in the deployment-skew test suite to verify server
      action redirects with build ID mismatch trigger MPA navigation
      
      ## Background
      
      When a server action calls `redirect()`, the server pre-fetches the
      redirect target and includes the RSC data in the response. In a
      multi-zone setup (same domain, different Next.js projects), this
      pre-fetched RSC data comes from a different build with a different build
      ID.
      
      The `fetch-server-response.ts` file already checks for build ID
      mismatches during regular navigations (line 245-251) and triggers MPA
      navigation when detected. However, `server-action-reducer.ts` was
      missing this check, causing the client to try to apply the foreign RSC
      payload — resulting in a blank page.
      
      ## Fix
      
      Added a build ID check in `fetchServerAction()` after parsing the RSC
      response. When a mismatch is detected, the flight data is discarded. The
      existing reducer logic at line 364-370 already handles this case:
      
      ```typescript
      if (flightData === undefined && redirectLocation !== undefined) {
        return completeHardNavigation(state, redirectLocation, navigateType)
      }
      ```
      
      This triggers an MPA navigation (full page load), which is the correct
      behavior for cross-zone redirects.
      
      ## Repro
      
      - https://repro-main-app.vercel.app/test-redirect
      - Red button (server action redirect) → blank page (before fix) / full
      page load (after fix)
        - Green link (normal `<a>`) → works fine
      
      Closes https://linear.app/vercel/issue/NEXT-4856
      
      ---------
      Co-authored-by: 's avatarZack Tanner <1939140+ztanner@users.noreply.github.com>
      c7df8e99
    • nextjs-bot's avatar
    • Tim Neutkens's avatar
      Update adapters documentation (#90986) · b3a587e9
      Tim Neutkens authored
      ## What?
      
      Updates the adapters docs with missing fields and more details
      
      ---------
      Co-authored-by: 's avatarJoseph <joseph.chamochumbi@vercel.com>
      b3a587e9
    • Jude Gao's avatar
      Bump Node heap limit for lint-no-typescript to avoid OOM in CI (#90996) · a6f9167c
      Jude Gao authored
      The `lint` job in CI has been hitting `FATAL ERROR: Ineffective
      mark-compacts near heap limit Allocation failed - JavaScript heap out of
      memory` during `lint-eslint`.
      
      `lint-no-typescript` runs `prettier-check`, `lint-eslint .`, and
      `lint-language` in parallel via `run-p`. The `lint-eslint` script uses
      `eslint.cli.config.mjs` which enables type-checked rules with
      `parserOptions.project: true` — the config comment itself notes this
      "needs a lot of memory". Node's default heap limit caps around ~2-4GB
      regardless of available system memory, which isn't enough when the
      type-aware parser loads the full monorepo project graph.
      
      This sets `NODE_OPTIONS="--max-old-space-size=8192"` on the
      `lint-no-typescript` script via `cross-env`. The env var inherits into
      all three `run-p` children, giving eslint the headroom it needs without
      touching CI workflow files.
      a6f9167c
    • Benjamin Woodruff's avatar
      Turbopack: Make `ReadVcFuture::strongly_consistent` private (#90843) · 6e894cfc
      Benjamin Woodruff authored
      This method is needed with `turbo-tasks` to implement `OperationVc`, but exposing it to other crates turns it into a footgun, because it allows you to attempt to read a `Vc` or `ResolvedVc` with strong consistency, which doesn't have a well-defined meaning.
      6e894cfc
    • Vercel Release Bot's avatar
      Update Rspack development test manifest (#90969) · 8e7d186f
      Vercel Release Bot authored
      This auto-generated PR updates the development integration test manifest used when testing Rspack.
      8e7d186f
    • nextjs-bot's avatar
      v16.2.0-canary.83 · 12c8715b
      nextjs-bot authored
      12c8715b
    • Andrew Clark's avatar
      fix: Don't fall through to catch-all when static child subtree doesn't match (#90957) · f27b4928
      Andrew Clark authored
      When matching a URL against the known route trie, if a URL part matches
      a static child but the remaining parts don't resolve within that child's
      subtree, the algorithm incorrectly falls back to a dynamic catch-all
      sibling at the same level. This causes the catch-all to consume the
      already-matched static part plus the remaining parts, producing a
      synthetic entry for the wrong route.
      
      For example, given routes `/dashboard/settings/profile` and
      `/dashboard/[...catchall]`, navigating to `/dashboard/settings/profile`
      could incorrectly match the catch-all with params `["settings",
      "profile"]` instead of the intended static route.
      
      The fix treats the static child match as authoritative: if a real
      (non-placeholder) static child exists but its subtree can't resolve the
      remaining URL parts, bail out to server resolution rather than trying
      the dynamic sibling. This is safe because it just means an extra network
      request for routes whose subtree hasn't been fully discovered.
      f27b4928
    • zoomdong's avatar
      2c2dd5fe
    • Jude Gao's avatar
      [Evals] Standardize Evals in Next.js (#90883) · 0921733a
      Jude Gao authored
      Fixtures now live next to the code they test, like e2e. `pnpm eval
      <name>` packs the local `next` build, generates baseline + agents-md
      experiment configs on the fly, and runs both in a sandbox. The agents-md
      variant drops an `AGENTS.md` that points the agent at the bundled docs
      in `node_modules/next/dist/docs/` — comparing the two variants tells you
      whether shipping a doc actually changes agent behavior.
      
      `run-evals.js` mirrors `run-tests.js`: pack once, pass the tarball path
      to the child via `NEXT_EVAL_TARBALL` env, forward flags. We only pack
      `next`, not the whole workspace — the sandbox is remote Linux, so a
      local `@next/swc` darwin binary wouldn't run there anyway; the sandbox
      downloads the right one at runtime. The experiment config uses `sandbox:
      'auto'`, which picks Vercel sandboxes when credentials are present and
      falls back to local Docker otherwise, so external contributors can run
      the same evals with just Docker + `ANTHROPIC_API_KEY`.
      
      `experiments/` is generated fresh each run and gitignored so we don't
      maintain N committed config files that differ by one line. Fixture code
      is excluded from eslint since it's deliberately imperfect code for
      agents to fix, and `EVAL.ts` uses vitest rather than jest. Fixture
      `package.json` files use `"next": "^16"` rather than a pinned canary so
      agents reading `package.json` to infer capabilities aren't misled by a
      stale version string; the tarball install overlays it regardless.
      
      next-evals-oss stays as the full benchmark runner for nextjs.org/evals;
      it'll pull fixtures from here instead of keeping its own copy.
      0921733a