1. 27 Apr, 2026 12 commits
    • next-js-bot[bot]'s avatar
      v16.3.0-canary.4 · ae61573e
      next-js-bot[bot] authored
      ae61573e
    • Luke Sandberg's avatar
      Reduce allocations in the next_debug_instant_stack transform (#93222) · 65542fa0
      Luke Sandberg authored
      This was allocating a regex on every transform, we can hoist that regex
      up to avoid the work
      
      I noticed this as a major source of temporary allocations in a dev
      benchmark
      
      also avoid a bunch of tiny string copies
      65542fa0
    • Hendrik Liebau's avatar
      Preserve `__NEXT_ERROR_CODE` across the `/_error` page handoff (#93183) · d2e6b6c0
      Hendrik Liebau authored
      When SSR fails in development — whether the failing page is in the App Router or the Pages Router — Next.js falls back to rendering the Pages Router `/_error` page and serializes the original error into `__NEXT_DATA__.err`. The client bootstrap in `packages/next/src/client/ index.tsx` later re-throws a fresh `new Error(initialErr.message)` so that the dev overlay picks it up. The error-code SWC plugin stamps that new `Error` with the generic code mapped to `%s` in `errors.json` because the message argument is an identifier, not a statically-known string, which is how the overlay ended up showing the wrong code for errors like `UseCacheTimeoutError`.
      
      The pipeline has two problems on the way to the overlay. First, `errorToJSON` in `packages/next/src/server/render.tsx` only copies the error's standard fields (`name`, `source`, `message`, `stack`, `digest`) into `__NEXT_DATA__.err`, so the real `__NEXT_ERROR_CODE` attached to the thrown error never reaches the client. Second, the subsequent rewrap in `getServerError` at `packages/next/src/server/dev/node-stack- frames.ts` creates yet another `new Error(...)` that the plugin stamps with the same generic code, clobbering anything the caller might have set on the rewrapped instance.
      
      This change plumbs the code through. `errorToJSON` now also emits `__NEXT_ERROR_CODE` using `extractNextErrorCode` so the value survives JSON serialization into `__NEXT_DATA__.err`; the type in `packages/next/src/shared/lib/utils.ts` is updated to match. Both rewrap sites — the client bootstrap and `getServerError` — copy the code from the source error onto the fresh `Error` via `Object.defineProperty` with `enumerable: false` and `configurable: true`, matching how the plugin itself stores the property, which overrides the generic code the plugin stamped on the rewrapped instance. The `use-cache-hanging` e2e test snapshot is updated from `E394` to `E236` now that the real code surfaces in the dev overlay.
      d2e6b6c0
    • next-js-bot[bot]'s avatar
      v16.3.0-canary.3 · 458b0db3
      next-js-bot[bot] authored
      458b0db3
    • Zack Tanner's avatar
      [ci]: trigger signed release commit via API (#93285) · 012fd7df
      Zack Tanner authored
      Stacked on https://github.com/vercel/next.js/pull/93245
      
      Commit signing is required for anything that lands on `canary`. Our
      previous workflow of using a PAT to push a commit no longer works, since
      that would have been an unsigned commit.
      
      In #93245 we switched to an app token for release workflow steps. This
      continues by:
      
      - Telling Lerna to bump packages but not commit
      - Creating a signed commit with the staged changes via GitHub's API
      - Then running the publish flow
      
      Test Plan:
      Dry run
      [here](https://github.com/vercel/next.js/actions/runs/25001287978/job/73211826479)
      Commit
      [here](https://github.com/vercel/next.js/commit/3a8456a62b56615e2f8c1d1e6e7b4e14ce89e078)
      012fd7df
    • Tobias Koppers's avatar
      [turbopack-trace-server] Performance improvements for span event handling (#93179) · 7b01c98a
      Tobias Koppers authored
      ## What?
      
      Performance improvements for the turbopack-trace-server, optimizing how
      span events are stored, sorted, and retrieved.
      
      ## Why?
      
      When processing large traces, the trace server was spending significant
      time on:
      1. Repeated sorting of events for each render in ExecutionOrder mode
      2. Recomputing corrected self time on repeated lookups
      3. Memory pressure from very large traces
      
      ## How?
      
      ### Lazy Sorting with LazySortedVec
      
      Introduces a new `LazySortedVec<T>` data structure that stores events
      unsorted and defers sorting until first read via `Deref`. Uses
      `UnsafeCell` + `Once` for thread-safe one-time sorting. This avoids
      repeated sorting overhead during trace ingestion.
      
      ### Pre-sorted Span Events by Start Time
      
      - `SpanEvent::Child` now stores its `start: Timestamp` alongside the
      index
      - `SpanEvent` implements `Ord` to sort by start time (with SelfTime
      before Child for equal timestamps)
      - The viewer's `ExecutionOrder` mode no longer needs to sort - events
      are already in order
      
      ### Cached Corrected Self Time
      
      - `SpanEvent::SelfTime` now wraps a `SpanEventSelfTime` struct
      containing an `OnceLock<Timestamp>` for `corrected_self_time`
      - The expensive tree lookup is performed once and cached for subsequent
      accesses
      - `SpanEventSelfTimeRef` provides access to the cached value via
      `corrected_self_time()`
      
      ### DROP_SPANS Environment Variable
      
      Adds `DROP_SPANS=<count>` env var to skip the first N spans when loading
      traces:
      - Useful for reducing memory usage with very large traces
      - Tracks dropped span IDs to also skip their subsequent events (End,
      SelfTime, etc.)
      - Stats output shows dropped span progress (e.g., "1000 spans, 500/1000
      dropped")
      
      <!-- NEXT_JS_LLM_PR -->
      
      ---------
      Co-authored-by: 's avatarClaude Opus 4.7 (1M context) <noreply@anthropic.com>
      7b01c98a
    • Zack Tanner's avatar
      [ci]: app-based release workflow (#93245) · e69de2ff
      Zack Tanner authored
      Moves all release workflows off of a GH PAT and uses an app with a
      short-lived token instead.
      
      Test Plan:
      Dry run
      [here](https://github.com/vercel/next.js/actions/runs/24934593874).
      
      However, this workflow is blocked until we figure out commit signing for
      the bot app. Some options:
      - The bot account generates a signing key and we use it in CI (not
      great, bypasses the app)
      - The org bypasses signature verification for the bot user (also not
      great, requires an exemption rule)
      - We need to rework the commit step so Lerna does not do the push, and
      instead trigger it via the app + GH API. This seems like the best
      option, will be added in a follow-up PR.
      
      Note: `create-release-branch` workflow is broken in its current form, as
      we will not be restoring administrator privileges to adjust environment
      settings. This will become a manual step in the future.
      e69de2ff
    • christopherkindl's avatar
      docs: remove broken error-handling overlay screenshot (#93279) · a6782fa6
      christopherkindl authored
      The Cloudinary URL for the overlay screenshot
      
      (`assets.vercel.com/image/upload/v1645118290/docs-assets/static/docs/error-handling/overlay.png`)
      404s. The line above it had a `{/* TODO UPDATE SCREENSHOT */}` comment,
      so this was already flagged as known-stale.
      
      Removes the broken image and its `"Here is an example of an overlay:"`
      intro line. The paragraph above still explains what the overlay is, so
      the page reads cleanly without the screenshot. If someone produces a
      fresh screenshot later, restoring the markdown with an updated URL is a
      one-line change.
      
      ### Affects
      
      -
      `nextjs.org/docs/pages/building-your-application/configuring/error-handling`
      (stable, on next stable cut)
      -
      `nextjs.org/docs/canary/pages/building-your-application/configuring/error-handling`
      (canary)
      
      ### Older versions
      
      The same broken URL is present in v13/v14/v15 of the docs (synced from
      the corresponding release tags). Backport is a separate call for
      maintainers.
      a6782fa6
    • Hendrik Liebau's avatar
      Recognize `super(...)` messages in Error subclass constructors (#93182) · f68f70b0
      Hendrik Liebau authored
      The error-code SWC plugin at `crates/next-error-code-swc-plugin` previously only transformed `new Error(msg)` call sites where the constructor identifier was in the hard-coded `is_error_class_name` list. Subclasses not in that list — for example `UseCacheTimeoutError`, which defines its message inside the constructor via `super('...')` and is instantiated with no arguments — went undetected, so their instances carried no `__NEXT_ERROR_CODE` at all.
      
      The plugin now also visits class declarations and expressions. When it sees `class X extends Y` where `Y` is one of the recognized Error classes, it finds the first top-level `super(arg)` call inside the constructor body, resolves the argument to a string via the existing `stringify_new_error_arg` logic (which handles string literals, template literals, string concatenations, and resolved identifier bindings), and inserts an `Object.defineProperty(this, '__NEXT_ERROR_CODE', ...)` statement immediately after the `super` call. Messages that aren't in `errors.json` yet are emitted to `cwd/.errors/<hash>.json` and consolidated by the existing `check-error-codes` build step, exactly as the call-site path already does. Classes whose `super` is nested inside an `if` or `try`, or whose only argument is a spread (`super(...args)`), are left alone.
      
      Classes that are already in `is_error_class_name` (for example `InvariantError`) now get a code assigned at both their call sites and inside their constructor body. The call-site `Object.defineProperty` runs after the constructor and therefore takes precedence at runtime, so observable behavior at those sites is unchanged. The constructor injection is defensive for any future instantiation that the call-site pass doesn't cover.
      
      `packages/next/errors.json` gains nine entries for super messages in existing Error subclasses that the plugin now captures for the first time.
      f68f70b0
    • Tobias Koppers's avatar
      Turbopack: import.meta.glob docs + edge case support (#92729) · 44722b80
      Tobias Koppers authored
      ## What?
      
      Adds documentation and TypeScript types for `import.meta.glob` in
      Turbopack, and implements additional edge cases for Vite compatibility.
      
      ### Documentation
      - New `## import.meta.glob` section in the [Turbopack reference
      page](/docs/app/api-reference/turbopack) covering: lazy/eager loading,
      named imports, query strings (including the object form), multiple
      patterns, negation, TypeScript types, and a full options table.
      - `import.meta.glob` row added to the Module Resolution feature table.
      - Migration note added to the [from-Vite
      guide](/docs/app/guides/migrating/from-vite) explaining that
      `import.meta.glob` works out of the box with Turbopack, with
      before/after for the deprecated `as` → `query` migration.
      
      ### TypeScript types
      - Added `ImportMetaGlobOptions` interface and overloaded `glob()`
      signatures to `ImportMeta` in `packages/next/types/global.d.ts`.
      - The overloads return `Record<string, unknown>` when `eager: true` is
      passed and `Record<string, () => Promise<unknown>>` otherwise.
      
      ### Implementation (edge cases)
      - **`import: '*'`** (namespace import): Treated the same as omitting the
      `import` option (returns the whole module namespace), matching Vite
      semantics. Previously would have generated broken `module["*"]` access.
      - **`query` as object literal**: `{ query: { bar: 'foo', raw: true } }`
      is now supported. Keys and values are URL-encoded and joined into a
      query string (`?bar=foo&raw=true`).
      - **Stricter option validation**: A non-object-literal second argument
      (e.g. `import.meta.glob('./*.js', 'eager')`) is now a compile-time error
      instead of a warning, since the options cannot be safely defaulted.
      
      ### Tests
      - Execution tests for new features: namespace `import: '*'`, query
      object, combining query with negation, explicit dotfile patterns.
      - New `import-meta-glob-errors` execution test with issue snapshots
      covering: too many arguments, non-string pattern, and non-object options
      argument.
      
      ## Why?
      
      1. The feature shipped in #92640 but had no user-facing documentation
      and no TypeScript types.
      2. Several Vite-compatible edge cases were not handled: namespace
      imports (`import: '*'`) and query objects. These gaps would cause subtle
      behavioral differences for users migrating from Vite.
      3. Option validation was too lenient — invalid second arguments fell
      through to defaults silently.
      
      ## How?
      
      ### Docs & types
      - `docs/01-app/03-api-reference/08-turbopack.mdx` — new section, table
      row, TypeScript subsection
      - `docs/01-app/02-guides/migrating/from-vite.mdx` — migration note
      - `packages/next/types/global.d.ts` — `ImportMetaGlobOptions` +
      `ImportMeta.glob()` overloads
      
      ### Implementation
      -
      `turbopack/crates/turbopack-ecmascript/src/references/import_meta_glob.rs`:
      - `parse_import_meta_glob()`: `import: '*'` normalized to `None`; query
      object parsing via `urlencoding::encode()`; non-object options argument
      now emits an error and returns `None`.
      - `turbopack/crates/turbopack-ecmascript/Cargo.toml`: added
      `urlencoding` workspace dep.
      
      Note: dotfile/dot-directory filtering is not needed in
      `import.meta.glob` itself — the underlying `Glob` pattern engine and
      `read_glob_internal` already handle dotfile semantics correctly
      (explicit `./.foo/*.js` matches, wildcards include them).
      
      ### Tests
      -
      `turbopack-tests/tests/execution/turbopack/resolving/import-meta-glob/`
      — new cases for `import: '*'`, query object, query + negation, explicit
      dotfile pattern, wildcard including dotfiles
      -
      `turbopack-tests/tests/execution/turbopack/resolving/import-meta-glob-errors/`
      — new test suite for fatal parse errors with issue snapshots
      
      ### Checklist
      - [x] `pnpm prettier-fix` / `cargo fmt` run
      - [x] Documentation follows the [docs contribution
      guide](https://nextjs.org/docs/community/contribution-guide)
      - [x] Execution tests pass (`cargo test -p turbopack-tests --test
      execution -- "import_meta_glob"`)
      - [x] `cargo clippy` clean
      - [x] `pnpm --filter=next types` passes
      
      <!-- NEXT_JS_LLM_PR -->
      
      ---------
      Co-authored-by: 's avatarTobias Koppers <sokra@users.noreply.github.com>
      Co-authored-by: 's avatarClaude <noreply@anthropic.com>
      44722b80
    • Tobias Koppers's avatar
      [rust-deps] Update bytes, crc32fast, memchr, pin-project-lite, quote, rand,… · e7bcba89
      Tobias Koppers authored
      [rust-deps] Update bytes, crc32fast, memchr, pin-project-lite, quote, rand, regex, ringmap, roaring (#93197)
      
      ### What?
      
      Updates Rust dependencies to their latest versions:
      
      | Crate | From | To |
      |-------|------|-----|
      | bytes | 1.1.0 | 1.11.1 |
      | crc32fast | 1.4.2 | 1.5.0 |
      | memchr | 2.7.4 | 2.8.0 |
      | pin-project-lite | 0.2.9 | 0.2.17 |
      | quote | 1.0.23 | 1.0.45 |
      | rand | 0.10.0 | 0.10.1 |
      | regex | 1.10.6 | 1.12.3 |
      | ringmap | 0.2.3 | 0.2.5 |
      | roaring | 0.10.10 | 0.11.4 |
      
      ### Why?
      
      Keep dependencies up to date with latest bug fixes, performance
      improvements, and security patches.
      
      ### How?
      
      Version bumps in `Cargo.toml` with corresponding `Cargo.lock` updates.
      
      <!-- NEXT_JS_LLM_PR -->
      e7bcba89
    • Sebastian "Sebbie" Silbermann's avatar
  2. 25 Apr, 2026 5 commits
    • Andrew Clark's avatar
      Suspend dynamic route params in dev instant shell (#93108) · 16e5f9e6
      Andrew Clark authored
      In dev with cacheComponents, the instant-nav prefetch for a dynamic
      route resolved the slug into the cached shell instead of returning the
      generic fallback, so `params` never suspended under a locked instant
      scope.
      
      Existing e2e coverage missed this because the fixture's dynamic-params
      page had `generateStaticParams` defined. That populates the dev
      prerender manifest and masks the bug — the broken path is the one where
      no `generateStaticParams` is defined. The regression test uses a new
      `ungenerated-params/[slug]` fixture that leaves it out.
      16e5f9e6
    • Sebastian "Sebbie" Silbermann's avatar
    • Sebastian "Sebbie" Silbermann's avatar
    • Sebastian "Sebbie" Silbermann's avatar
    • Andrew Clark's avatar
      instant(): Block out-of-band client fetches (#93099) · 854fdb03
      Andrew Clark authored
      The Instant Navigation Testing API simulates what a user would see on an
      arbitrarily slow connection — like an infinitely slow network — when the
      app is at rest and the prefetch cache is completely warm. It works by
      blocking any dynamic RSC data fetches until the end of the testing scope
      (i.e. the callback passed to instant()).
      
      It's designed to test the behavior of data fetched by Next.js, via a
      Server Component. So currently, it does not affect the behavior
      out-of-band client fetches — e.g. fetch('/api/...') in useEffect or an
      external data fetching library. Those requests proceed without being
      blocked by the `instant()` scope. But this is misleading for testing
      purposes, because it implies that client-side data fetches are not
      affected by slow network conditions.
      
      To address this, this PR overrides the global `fetch` API and blocks
      out-of-band client fetches until the lock is released. The change also
      impacts the behavior of the Instant DevTools panel (since both tools use
      the same underlying mechanism).
      
      The change only affects environments where the Instant Navigation
      Testing API is enabled. It has no impact on live production behavior. It
      does not account for other sources of I/O, like images, scripts, fonts,
      etc.
      
      <!-- NEXT_JS_LLM_PR -->
      854fdb03
  3. 24 Apr, 2026 19 commits
    • Luke Sandberg's avatar
      Revert "Adopt pnpm catalogs for devDependencies" (#93226) · a9cd6d7e
      Luke Sandberg authored
      Reverts vercel/next.js#93071
      
      This breaks our use of lerna, lerna uses npm-package-arg to parse
      package.json files and cannot resolve `catalog` references
      a9cd6d7e
    • Luke Sandberg's avatar
      [turbopack] drop TransientState (#92853) · 8bb30f2d
      Luke Sandberg authored
      It's dead
      8bb30f2d
    • Zack Tanner's avatar
    • Sebastian "Sebbie" Silbermann's avatar
    • Zack Tanner's avatar
      [ci]: move stats & CI status comment to workflow (#93220) · 1849a0d0
      Zack Tanner authored
      - Add a workflow_run reporter that posts PR test/stats comments using
      `GITHUB_TOKEN`.
      - Upload PR metadata artifacts from `build-and-test` and `Generate
      Stats` so the reporter can safely resolve the target PR
      - Move stats/test comment posting out of the external webhook/PAT path
      while preserving the existing comment format
      
      This means the test comment won't incrementally update as tests fail,
      it'll just post once at the end, but that's a reasonable tradeoff to not
      having to worry about a webhook.
      1849a0d0
    • Sebastian "Sebbie" Silbermann's avatar
    • Sebastian "Sebbie" Silbermann's avatar
      0fdd6902
    • Sebastian "Sebbie" Silbermann's avatar
      fc6de261
    • Niklas Mischkulnig's avatar
      Turbopack: move get_inner_asset into ecmascript module (#93191) · d170370a
      Niklas Mischkulnig authored
      `resolve_origin.get_inner_asset` showed up in Luke's statistics at a
      very high place.
      But in reality, there are only 1-3 modules per page that have any inner
      assets (the templates, and the edge wrapper modules).
      `resolve_origin.get_inner_asset` is in the hottest hot path (resolving
      references), so let's simply move this logic into the
      EcmascriptModuleAsset itself.
      
      Behavioral differences to before:
      - only works with static ESM `import`s, dynamic `import()`, `require`,
      `require.resolve`. But these are the only places that currently use it
      anyway.
      
      ```
      0d9738112f mischnic/remove-get-inner-asset
      pnpm next build --experimental-build-mode=compile  353.40s user 52.96s system 748% cpu 54.265 total
      pnpm next build --experimental-build-mode=compile  349.42s user 53.84s system 744% cpu 54.198 total
      pnpm next build --experimental-build-mode=compile  352.42s user 54.46s system 741% cpu 54.874 total
      
      3cb77c84 canary
      pnpm next build --experimental-build-mode=compile  367.91s user 58.06s system 726% cpu 58.672 total
      pnpm next build --experimental-build-mode=compile  362.97s user 57.68s system 746% cpu 56.379 total
      pnpm next build --experimental-build-mode=compile  364.59s user 57.01s system 724% cpu 58.167 total
      ```
      d170370a
    • Joseph's avatar
      example: remove with-supertokens (#93212) · fb06f5f3
      Joseph authored
      Retaking the example clean up cycle.
      fb06f5f3
    • Sebastian "Sebbie" Silbermann's avatar
    • Niklas Mischkulnig's avatar
      Turbopack: unify ModuleGraph constructors (#93203) · 3cb77c84
      Niklas Mischkulnig authored
      We have options and variable length lists. Why do we need a separate
      function for every combination?
      3cb77c84
    • Tobias Koppers's avatar
      [rust-deps] Update tracing (#93194) · 5d3232fb
      Tobias Koppers authored
      ### What?
      
      Updates the `tracing` crate and its related dependencies to their latest
      versions:
      
      - `tracing`: 0.1.37 → 0.1.44
      - `tracing-attributes`: 0.1.30 → 0.1.31  
      - `tracing-core`: 0.1.34 → 0.1.36
      
      ### Why?
      
      Keep Rust dependencies up to date with security patches and performance
      improvements.
      
      ### How?
      
      Updated the version specification in `Cargo.toml` and regenerated
      `Cargo.lock`.
      
      <!-- NEXT_JS_LLM_PR -->
      5d3232fb
    • Tobias Koppers's avatar
      [rust-deps] Update serde (#93196) · 1e4782ad
      Tobias Koppers authored
      ### What?
      
      Updates the serde family of crates to their latest versions:
      
      - `serde`: 1.0.217 → 1.0.228
      - `serde_json`: 1.0.138 → 1.0.149
      - `serde_path_to_error`: 0.1.16 → 0.1.20
      - `serde_qs`: 0.13.0 → 1.1.1
      - `serde_with`: 3.12.0 → 3.18.0
      
      ### Why?
      
      Keep dependencies up to date with bug fixes and performance
      improvements.
      
      ### How?
      
      Updated version constraints in `Cargo.toml` and ran `cargo update` to
      regenerate the lockfile.
      
      <!-- NEXT_JS_LLM_PR -->
      1e4782ad
    • Niklas Mischkulnig's avatar
      Turbopack: move import_usage computation into ImportMap (#92891) · cc057574
      Niklas Mischkulnig authored
      I'm moving all of the export-related logic into `EvalContext` (and thus
      `ImportMap`) so that `VarGraph` is only needed for computing the
      references, and not the exports.
      cc057574
    • Tobias Koppers's avatar
      feat(turbopack): add NEXT_TURBOPACK_TRACING_PATH to control trace output location (#93084) · b91cff03
      Tobias Koppers authored
      ### What?
      
      Adds a new environment variable `NEXT_TURBOPACK_TRACING_PATH` that lets
      users specify the full output path (including filename) for the
      Turbopack trace file.
      
      ### Why?
      
      Some users need to control where the `trace-turbopack` file is written —
      for example, to redirect it outside the project directory, to a shared
      volume, or to a custom filename. Previously the path was hardcoded to
      `<project>/.next-profiles/trace-turbopack` with no override mechanism.
      
      ### How?
      
      When `NEXT_TURBOPACK_TRACING` is set (tracing is enabled) and
      `NEXT_TURBOPACK_TRACING_PATH` is also set, the trace is written to the
      specified path instead of the default:
      
      - **Absolute paths** are used as-is.
      - **Relative paths** are resolved against the process CWD.
      - The **parent directory is auto-created** recursively (equivalent to
      `mkdir -p`), so pointing to a non-existent subdirectory works without
      manual setup.
      - Setting `NEXT_TURBOPACK_TRACING_PATH` alone (without
      `NEXT_TURBOPACK_TRACING`) has no effect — tracing is not enabled by it.
      - The "Trace output will be written to …" message reflects the resolved
      path.
      
      The change is confined to
      `crates/next-napi-bindings/src/next_api/project.rs`.
      
      **Example:**
      ```sh
      NEXT_TURBOPACK_TRACING=overview \
      NEXT_TURBOPACK_TRACING_PATH=/tmp/my-project-trace \
      next dev
      ```
      
      <!-- NEXT_JS_LLM_PR -->
      Co-authored-by: 's avatarTobias Koppers <sokra@users.noreply.github.com>
      Co-authored-by: 's avatarClaude <noreply@anthropic.com>
      b91cff03
    • Tobias Koppers's avatar
      [turbopack] Fix max_level_hint to return most verbose per-target level (#93128) · 08da80a7
      Tobias Koppers authored
      ### What?
      
      Fix `FilterLayer::max_level_hint` in `turbopack-trace-utils` to return
      the most verbose `LevelFilter` across per-target configs instead of the
      least verbose one.
      
      ### Why?
      
      `tracing`'s `Subscriber` uses `max_level_hint` to short-circuit event
      dispatch globally: any event whose level is more verbose than the hint
      is dropped before `enabled()` is consulted. The previous implementation
      returned `self.config.values().copied().min()`, i.e. the *least* verbose
      configured level. As soon as any target was filtered to a low verbosity
      (e.g. `WARN`), events at more verbose levels (`INFO`/`DEBUG`/`TRACE`)
      were discarded for *all* targets, even those whose own per-target config
      would have allowed them.
      
      ### How?
      
      Swap `min()` → `max()` in `FilterLayer::max_level_hint` so the hint
      reflects the most verbose level any configured target could enable.
      Per-target filtering in `enabled()` is unchanged and continues to
      enforce the correct level for each target.
      
      <!-- NEXT_JS_LLM_PR -->
      
      ---------
      Co-authored-by: 's avatarvercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
      08da80a7
    • Zack Tanner's avatar
    • Zack Tanner's avatar
      [ci]: switch to GitHub runners (#93164) · 82b320ad
      Zack Tanner authored
      ## Summary
      
      Switch CI from self-hosted runners to GitHub-hosted runners and fix the
      follow-up issues that showed up once the hosted jobs were exercised.
      
      ## Changes
      
      - Move Linux workflows onto `ubuntu-latest-16-core-oss`, Windows
      workflows onto `windows-latest-8-core-oss`, and the native mac release
      lane onto `macos-15-intel`.
      - Update the reusable build workflow to work in hosted environments by
      relying on `runner.os` instead of label string matching, and by removing
      the hardcoded `/home/runner` `fnm` path.
      - Make Turbo/sccache configuration explicit for hosted runners:
        - unify on `vtest314-next-adapter-e2e-tests`
      - pass `TURBO_TOKEN` via workflow env/secrets instead of assuming
      runner-level env
      - switch Turbo cache mode to `local:rw,remote:rw` so jobs still have
      local cache behavior when remote cache is unavailable
      - Update the `sccache` action defaults/docs to use the hosted-runner
      secret setup (`TURBO_TOKEN`) instead of the old self-hosted token
      wiring.
      - Make Datadog reporting fail open so missing `DATA_DOG_API_KEY` does
      not block CI.
      - Fix the CLI reserved-port test so it asserts Next’s own `-p 1`
      validation instead of failing earlier on hosted Linux due to
      privileged-port binding.
      - Replace the live `musl.cc` dependency in `native-builder.Dockerfile`
      with musl sysroots imported from GHCR-hosted `rust-musl-cross` images,
      keeping the existing `/opt/*-cross` layout used by the Linux native
      build scripts.
      - Fix the macOS native build workaround s so it applies to all
      *-apple-darwin targets based on the Cargo target OS rather than the host
      architecture, which avoids napi-build injecting the unsupported -Wl
      linker arg when @next/swc is linked with rust-lld on hosted mac runners.
      
      Test Plan:
      - This PR's CI
      - This
      [build_and_deploy](https://github.com/vercel/next.js/actions/runs/24865715983/job/72801225722)
      job running on every arch
      82b320ad
  4. 23 Apr, 2026 1 commit
    • Jimmy Lai's avatar
      Docs: add signed commit guidance (#93155) · 4167e1f1
      Jimmy Lai authored
      ## What?
      
      Adds contributor-facing guidance for the new signed-commit requirement.
      
      - adds a `Signed commits` section to `contributing.md`
      - adds a short signed-commit note to the PR template
      - clarifies that a `Signed-off-by` line is not enough
      
      ## Why?
      
      As signed commits become required, contributors need a clear explanation
      in the repo and at PR time so they know what will be enforced and how to
      recover from unsigned commits.
      
      ## How?
      
      Documents the requirement in the main contribution guide and repeats the
      key action items in the PR checklist.
      
      ## Testing
      
      - docs-only change
      - verified with local readback and diff review
      
      <!-- NEXT_JS_LLM_PR -->
      4167e1f1
  5. 22 Apr, 2026 3 commits
    • Zack Tanner's avatar
      [ci]: cleanup labeler (#93135) · 1f0ced56
      Zack Tanner authored
      Remove labels that we are no longer maintaining.
      1f0ced56
    • Andy Wooldridge's avatar
      fix(use-cache): remove awaiting revalidation (#92636) · a6223ac9
      Andy Wooldridge authored
      ### What?
      fixes #74882
      
      The `use cache` directive does not revalidate in the background while
      serving (not expired) stale data.
      
      For the static pages, the whole page is blocked during revalidation, and
      fresh data is fetched served. While I don't agree with this, as it is
      just a duplication of the expire behaviour, this is documented as
      intended in the comments in the code.
      
      For the dynamic pages, when the data is flagged for revalidation, the
      stale data is blocked while fresh data is fetched. Once the fresh data
      is fetched, the function returns the stale data. On refreshing, the
      fresh data is served. This is the worst of both worlds, as we are still
      waiting for fresh data, and then seeing the stale data.
      
      In both cases there is no background revalidation of data, leading to
      slow, unresponsive pages.
      
      I have an example app showing this behaviour here:
      https://github.com/awo00/nextjs-use-cache-revalidate
      
      ### Why?
      
      In the `use-cache-wrapper`, the `generateCacheEntry()` function is
      awaited during revalidation which is blocking the stale data being
      returned.
      
      ### How?
      
      Removing the await allows the stale data to be returned faster.
      
      ---------
      Co-authored-by: 's avatarHendrik Liebau <mail@hendrik-liebau.de>
      a6223ac9
    • Zack Tanner's avatar
      [tests]: fix cache-components.test.ts type error (#93113) · 2293d650
      Zack Tanner authored
      Fixes a type error on canary after merging two PRs that touched the same
      test.
      2293d650