- 20 Mar, 2026 22 commits
-
-
nextjs-bot authored
-
Matt Mastracci authored
# What Refactor build_and_deploy.yml to make it more maintainable, add documentation to all of the quirky flags we use and remove any flags that are not doing anything useful. # Non-goals - wasm builds were left out of the matrix, but could probably be added in at a later date - cross-compilation flags should probably not live in .cargo/config.toml but rather in a .cargo/cross-config.toml we conditionally include, but this would add some complexity. # Why After enabling LTO, our MUSL target builds got significantly slower. This wins back a good chunk of the performance that we lost by using cross-compilation to MUSL on docker images that are not slow as heck, while also trying to clean up this workflow that has accumulated some cruft over the years. The timings are fairly unstable because of uncertain build machine variability, but I've tried to capture uncached runs where possible. I believe we can state that LTO has a _slight_ increase in compile time, but MUSL builds are faster than the pre-LTO state of things. # Changes - Refactor build_and_deploy.yml: replace per-target matrix entries with mmm-matrix declarative config, consolidate docker build script inline, pin actions to commit SHAs - Simplify .cargo/config.toml using cfg(true) (RFC 3695) to eliminate rustflag duplication across target sections - Remove GNU linker flags (rust-lld is now default on x86_64-linux-gnu) - Use rust-lld directly for musl targets, remove unused armv7 section - Add cargo xtask print-rustflags to replace .github/rustflags.yml - Release profile: thin LTO + codegen-units=64 for faster builds - Add --log-order stream to TURBO_ARGS for live build output - Remove mold linker integration from CI
-
Vercel Release Bot authored
This auto-generated PR updates the production integration test manifest used when testing Rspack.
-
Hendrik Liebau authored
CI is slow sometimes ([x-ref](https://github.com/vercel/next.js/actions/runs/23353631446/job/67939293839)), so we're removing the low custom test timeout to allow more time to build the test fixture. We're also moving the test from `test/e2e` to `test/production` since it's only testing the build output, and doesn't need to be run in dev and deploy modes.
-
Vercel Release Bot authored
This auto-generated PR updates the development integration test manifest used when testing Rspack.
-
Niklas Mischkulnig authored
-
Tobias Koppers authored
### What? Adds `--persistent-caching` and `--cache-dir` CLI flags to `turbopack dev` and `turbopack build` in the standalone `turbopack-cli` crate. ### Why? The standalone `turbopack-cli` binary (used independently of `next`) had no way to opt into the filesystem-backed persistent cache that the `next-napi-bindings` integration already supports. Without this, repeated builds always start cold — every incremental run re-computes the full task graph from scratch. ### How? **`build.rs` (new):** A Cargo build script that uses `vergen-gitcl` to emit `VERGEN_GIT_DESCRIBE` and `VERGEN_GIT_DIRTY` as compile-time env vars. These are used to key the cache by git version, matching the same approach as `next-napi-bindings`. The build script embeds the dirty state at compile time rather than runtime to avoid a git subprocess on every startup. The dirty-state caching tradeoff (explained in the build script comment): there's a narrow edge case where the tree becomes newly dirty without triggering a Cargo rebuild, but in practice this is safe — if nothing in the crate changed, the binary is semantically equivalent to a clean build, so using the HEAD hash as the cache key is correct. **`arguments.rs`:** Two new flags on `CommonArguments` (shared by both `dev` and `build` subcommands): - `--persistent-caching` — opt-in flag to enable the filesystem cache - `--cache-dir <PATH>` — override the cache directory (defaults to `.turbopack/cache` in the project root) **`dev/mod.rs` and `build/mod.rs`:** - The `Backend` type alias changes from `TurboTasksBackend<NoopBackingStorage>` to `TurboTasksBackend<Either<TurboBackingStorage, NoopBackingStorage>>` to unify the type without dynamic dispatch. - When `--persistent-caching` is set: initializes `TurboBackingStorage` via `turbo_backing_storage()`, selects `StorageMode::ReadWriteOnShutdown` for CI/short sessions and `StorageMode::ReadWrite` for interactive dev, and prints a warning if the cache was invalidated on startup. - When not set: falls back to `noop_backing_storage()` — identical behavior to before. - Respects the `TURBO_ENGINE_READ_ONLY` env var to force read-only mode. --------- Co-authored-by:
Tobias Koppers <sokra@users.noreply.github.com> Co-authored-by:
Claude <noreply@anthropic.com>
-
Tobias Koppers authored
### What? Adds a `modules` field to two tracing spans that cover module graph construction: - `"module graph for endpoint"` span (per-page graph, in `app.rs`) — records the total number of modules across all `SingleModuleGraph`s built for that endpoint. - `"whole app module graph"` span (new info-level span wrapping `whole_app_module_graph_operation` in `project.rs`) — records the combined module count of the base graph and the additional-entries graph. Also adds a `module_count()` method to `SingleModuleGraph` (as a `#[turbo_tasks::function]` returning `Vc<u64>`) that exposes `number_of_modules`. ### Why? Module graph size directly affects build and HMR performance. Without a count in the trace, it is impossible to correlate span duration with graph size or spot regressions where the graph grows unexpectedly. Surfacing the count as a structured span field makes it queryable without requiring log parsing. ### How? - `SingleModuleGraph::module_count()` is a cheap `#[turbo_tasks::function]` that wraps the already-computed `number_of_modules: usize` field as a `Vc<u64>`. - Both call sites follow the deferred-field pattern already used in `ProjectContainer::initialize`: the span is created with `modules = Empty` before the `async move` block, `span.record("modules", count)` is called once the graphs are ready, and `span_clone` is passed to `.instrument()` so the field is recorded on the correct span. - Module counts are summed across all graphs that contribute to the endpoint/app. --------- Co-authored-by:Tobias Koppers <sokra@users.noreply.github.com> Co-authored-by:
Claude <noreply@anthropic.com> Co-authored-by:
Vercel <vercel[bot]@users.noreply.github.com>
-
Tobias Koppers authored
### What? Removes the `debug_assert_not_in_top_level_task` call from `try_read_task_cell` in `turbopack/crates/turbo-tasks/src/manager.rs`. ### Why? The assertion was wrong. `debug_assert_not_in_top_level_task` panics with the message: > "Eventually consistent read cannot be performed from a top-level task." The restriction only applies to **eventually consistent** reads (e.g. task output reads), which can return stale data if called from a top-level task (`.run_once(...)`). Cell reads, however, are **strongly consistent** — they always return up-to-date data. There is no semantic reason to forbid reading a cell from a top-level task, and the assert was producing false positives in valid call sites. ### How? Delete the three lines that guard and invoke `debug_assert_not_in_top_level_task` inside `try_read_task_cell`. The function itself and its usage in `try_read_task_output` / `try_read_local_output` (which are genuinely eventually-consistent) are unchanged. --------- Co-authored-by:
Tobias Koppers <sokra@users.noreply.github.com> Co-authored-by:
Claude <noreply@anthropic.com>
-
Niklas Mischkulnig authored
Otherwise you get a `Dependency tracking is disabled` / infinite loop when trying to use both turbopack.rules.loader and turbopackLoader at the same time
-
JJ Kasper authored
## Summary This fixes adapter `onBuildComplete` outputs for dynamic metadata routes. ## Bug `handleBuildComplete` skipped metadata routes too aggressively via `isStaticMetadataFile(...)`, so dynamic metadata routes (for example `robots.txt` / `sitemap.xml` using `connection()`) were omitted from `outputs.appRoutes`. ## Fix Only skip metadata routes when they are actually prerendered/static (present in prerender manifests). Dynamic metadata routes are now included in adapter `outputs.appRoutes` as expected. ## Tests Added e2e coverage in `test/e2e/app-dir/adapter-dynamic-metadata`: - verifies dynamic `robots.txt`, `sitemap.xml`, and `favicon.ico` functionality - verifies adapter output classification for non-deploy runs - skips output-shape verification in deploy mode - skips the suite in dev mode
-
nextjs-bot authored
-
Niklas Mischkulnig authored
A regression from #88487 1. Make metadata import lazy with `() => require()`, just like for the layout segments 2. Properly await the return value to better handle TLA modules This align with Webpack which does this: <img width="1535" height="509" alt="Bildschirmfoto 2026-03-20 um 11 58 00" src="https://github.com/user-attachments/assets/f2864c86-ccce-4884-8417-c8ae06c05f78" /> Closes PACK-6927 Closes #91700 Closes https://github.com/vercel/next.js/issues/91676
-
Joseph authored
Fixes based on feedback post release Fixes: https://github.com/vercel/next.js/pull/91715
-
Tobias Koppers authored
### What? Move the `"compact database"` tracing span from `turbo-persistence` (`db.rs`) to the backend layer (`turbo-tasks-backend/src/backend/mod.rs`), make it a root span, group it with the sibling `"persist"` span under a shared `"background snapshot"` root, and emit one span per compaction session rather than one per iteration. ### Why? The `compact()` function is called from the background persistence job, which runs inside a `"persisting background job"` span (inherited via `.in_current_span()` at task spawn time). Previously the `"compact database"` span was a child of that ambient span, making it appear nested under `"persisting background job"` in traces — inconsistent with its sibling spans `"snapshot"` and `"persist"`, which are already top-level root spans. Moving the span to the backend call site and giving it an explicit parent allows us to: 1. Detach it from the `"persisting background job"` ambient span. 2. Group it with the `"persist"` span under a shared `"background snapshot"` root span so all snapshot + compaction work appears together in trace viewers. 3. Keep `turbo-persistence` free of span-policy decisions (root vs. child), which belong at the call site where the ambient span context is known. ### How? - Introduced a non-entered `background_span` (`tracing::info_span!(parent: None, "background snapshot")`) as a shared root for both the snapshot/persist work and the compaction loop. - Passed `background_span.id()` as the `parent_span` argument to `snapshot_and_persist`, so the `"snapshot"` and `"persist"` spans become children of it. - Inside the idle compaction loop, a child `"compact database"` span is entered and dropped synchronously around each `compact()` call (not across the `tokio::select!` await point). - Moved the span creation outside the `MAX_IDLE_COMPACTION_PASSES` loop so there is one `"compact database"` span per compaction session rather than one per iteration. - Removed the `tracing::info_span!("compact database")` span from `turbo-persistence/src/db.rs` entirely. - Downgraded the `"sync new files"` span from `info` to `trace` level (noise reduction). The non-entered `tracing::Span` is `Send`, so it can be safely held across the `select!` await without triggering the `future cannot be sent between threads safely` compile error that an `EnteredSpan` would cause. --------- Co-authored-by:Tobias Koppers <sokra@users.noreply.github.com> Co-authored-by:
Claude <noreply@anthropic.com>
-
Tobias Koppers authored
### What? Remove the `MADV_UNMERGEABLE` (Unmergeable) mmap advice from `turbo-persistence`'s `advise_mmap_for_persistence` helper in `mmap_helper.rs`. ### Why? The WSL (Windows Subsystem for Linux) kernel does not support `MADV_UNMERGEABLE` and returns an error when it is applied, causing turbo-persistence to fail on WSL. See: https://x.com/von_cronen/status/2034944304712392891 Additionally, `MADV_UNMERGEABLE` is already the **default** state for memory pages — KSM (Kernel Same-page Merging) is opt-in via `MADV_MERGEABLE`. Explicitly setting `MADV_UNMERGEABLE` on pages that were never marked mergeable is a no-op on standard kernels, so the call provides no benefit while breaking WSL users. The `MADV_DONTFORK` advice is retained, as it has a clear correctness benefit (prevents mmap regions from being inherited by child processes on `fork()`). ### How? Removed the `mmap.advise(memmap2::Advice::Unmergeable)` call and its associated doc comment from `turbopack/crates/turbo-persistence/src/mmap_helper.rs`. Co-authored-by:
Tobias Koppers <sokra@users.noreply.github.com> Co-authored-by:
Claude <noreply@anthropic.com>
-
Hendrik Liebau authored
The `staticPathKey` condition added in #91231 inadvertently applies to server action requests on dynamic SSG routes when `cacheComponents` is enabled. Server action fetch requests from the client do not send the `RSC` header (`rsc: 1`). They only send `Accept: text/x-component` and the `Next-Action` header. This means `isRSCRequest` and `isDynamicRSCRequest` are both `false` for action requests. The new `staticPathKey` condition (`isSSG && pageIsDynamic && prerenderInfo?.fallbackRouteParams`) evaluates to `true` for dynamic PPR routes, setting `staticPathKey` even though `ssgCacheKey` is `null` for actions. With `staticPathKey` set, the request enters the fallback rendering block, which serves the cached fallback HTML shell with the action result appended to it, instead of responding with just the RSC action result. The fix excludes server action requests from the `staticPathKey` computation by adding `!isPossibleServerAction` to the condition, restoring the pre-#91231 behavior where `staticPathKey` was always `null` for server actions in production. fixes #91662 closes #91677 closes #91669
-
Tobias Koppers authored
## Summary - Add `'turbopack-transition': 'next-server-utility'` to all server-side imports in the `app-page.ts` template so they are properly placed in the server utility layer, rather than relying on `SharedMerged` chunk groups to handle them - Remove the now-unnecessary `next-server-utility` transition from `fillMetadataSegment` import in `app_page_loader_tree.rs` - Add `SharedMultiple` chunk group variant to support multiple shared entries without a merge tag - This avoid passing the `parent` into `SharedMerged`, which did break the layout segment optimization. - Refactor `app_module_graphs` to combine `client_shared_entries` + `has_layout_segments` into a single `Option` parameter, simplifying the API and removing the dead code path for non-page endpoints ## Test plan - [ ] Verify dev and production builds work with app pages that have layout segments - [ ] Verify route handlers still build correctly (no client runtime entries passed) - [ ] Run existing app-dir e2e tests
-
Abhishek Mardiya authored
## What? Fixes a broken link in the Preserving UI State guide: https://nextjs.org/docs/app/guides/preserving-ui-state#examples The "Activity Patterns demo" link currently points to a non-working URL. ## Why? The demo link returns a 404 / invalid page, which makes the example section confusing for readers. ## Changes - Updated the Activity Patterns demo link to the correct URL. ## Notes No functional changes, docs only. @icyJoseph @delbaoliveira
-
Hendrik Liebau authored
The test was calling `createNext` inside each `it.each` test body, which meant deployment setup time counted against the 60-second per-test timeout introduced in #89929. In deploy mode, `createNext` deploys to Vercel which can exceed 60 seconds. When the test timed out, the `next` local variable was never assigned (the `await createNext(...)` hadn't resolved), so the `afterEach` hook would throw a `TypeError` on `next.destroy()`. This left the module-level `nextInstance` variable pointing at the stale, half-initialized deploy instance. When the next test case started, `createNext` saw the leftover `nextInstance` and threw `"createNext called without destroying previous instance"`. The test now uses `nextTestSetup`, which runs `createNext` in `beforeAll` where it has the longer 120-second `setupTimeout`. Both API route variants (`/api/single` and `/api/multiple`) are real fixture files served from a single instance, so deployment only happens once.
-
Hendrik Liebau authored
[Flakiness metric](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%28%22Build%20Activity%20Indicator%20Enabled%20-%20%28app%29%20Shows%20build%20indicator%20when%20page%20is%20built%20from%20modifying%22%20OR%20%22Build%20Activity%20Indicator%20Enabled%20-%20%28pages%29%20Shows%20build%20indicator%20when%20page%20is%20built%20from%20modifying%22%20OR%20%22Dev%20Rendering%20Indicator%20Shows%20build%20indicator%20when%20page%20is%20built%20from%20modifying%22%29%20%40test.status%3Afail&agg_m=count&agg_m_source=base&agg_t=count&fromUser=false&index=citest&start=1773322068865&end=1773926868865&paused=false) In #85083 we introduced a delay of 400 ms before showing the building/rendering indicator, to avoid flashing it for fast operations. For now, we skip the building indicator tests because our simple test apps usually compile much faster than that, and we haven't found a good way to reliably test the indicator without flakiness. We do keep the rendering indicator test, but increase the timeout in the pages to ensure the indicator is shown for long enough to be detected by the test.
-
Luke Sandberg authored
## Summary Optimizes the turbo-persistence compaction and iteration paths with several targeted improvements: ### Iterator optimizations - **Flatten index block iteration** — The iterator previously used a `Vec<CurrentIndexBlock>` stack, but SST files have exactly one index level. Inline the index block fields (`index_entries`, `index_block_count`, `index_pos`) directly into `StaticSortedFileIter`, eliminating the stack allocation and `Option` overhead. - **Non-optional `CurrentKeyBlock`** — Parse the first key block during `try_into_iter()` construction so `current_key_block` is always populated, removing the `Option<CurrentKeyBlock>` wrapper and its `take()`/`Some()` ceremony in the hot loop. - **Replace `ReadBytesExt` with direct byte indexing** — In `handle_key_match`, `parse_key_block`, and `next_internal`, replace `val.read_u16::<BE>()` etc. with `u16::from_be_bytes(val[0..2].try_into().unwrap())`. This eliminates th mutable slice pointer advancement. - **Extract `read_offset_entry` helper** — Read type + offset from the key block offset table in a single `u32` load + shift, replacing two separate `ReadBytesExt` calls. ### Refcounting optimization - **Introduce `RcBytes`** — Thread-local byte slice type using `Rc` instead of `Arc`, eliminating atomic refcount overhead during single-threaded SST iteration. The iteration path (`StaticSortedFileIter`) now produces `RcBytes` slices backed by an `Rc<Mmap>`, so per-entry clone/drop operations are plain integer increments rather than atomic operations. ### Merge iterator simplification - **Optimize `MergeIter::next`** — Replaced the straightforwards `pop/push` pattern with `PeekMut`-based replace-top pattern, which means we only need to adjust the heap once per iteration instead of twice. ## Benchmark results ### Compaction (`key_8/value_4/entries_16.00Mi/commits_128`) | Benchmark | Canary | Optimized | Change | |-----------|--------|-----------|--------| | partial compaction | 1.949 s | 1.515 s | **-22%** | | full compaction | 2.051 s | 1.542 s | **-25%** | ### Read path (`static_sorted_file_lookup/entries_1000.00Ki`) No read regression — the branch is neutral to slightly faster: | Benchmark | Canary | Optimized | Change | |-----------|--------|-----------|--------| | hit/uncached | 6.73 µs | 6.59 µs | **-2%** | | hit/cached | 140.8 ns | 130.7 ns | **-7%** | | miss/uncached | 5.10 µs | 5.02 µs | **-2%** | | miss/cached | 230.1 ns | 233.1 ns | ~+1% (noise) | ## Test plan - [x] `cargo test -p turbo-persistence` — 60/60 tests passing - [x] Compaction benchmarks run and compared against canary baseline - [x] Read path (lookup) benchmarks verified no regression
-
- 19 Mar, 2026 18 commits
-
-
nextjs-bot authored
-
JJ Kasper authored
When invoking `handler` exports directly without `base-server` we need to ensure span names are still updated with the route correctly so not just method name is in span name.
-
Luke Sandberg authored
### What? Fixed Turbopack incorrectly trying to resolve inline JavaScript code as module references when `new Worker()` is called with `{ eval: true }` option. Now we skip creating a reference when `eval:true`, and report warnings if we cannot tell what the value is ### Why? Libraries like jsPDF create Worker threads by passing inline JavaScript code as the first argument along with `{ eval: true }` as the second argument. Turbopack was incorrectly treating this inline code as a file path and attempting to resolve it as a module reference, causing build failures. ### How? Added logic to detect when the `eval: true` option is passed to the Worker constructor. When this option is present, Turbopack now skips creating a worker reference since the first argument contains executable code rather than a file path. Added comprehensive test coverage using jsPDF to verify the fix works correctly. Fixes #91642 -
Josh Story authored
Tests that unstable_instant configs placed at different positions across a parallel route fork correctly attribute errors to the blocking segment, with the cause pointing to the config that requires instant behavior. Includes both invalid cases that produce errors and valid cases that pass cleanly. Does not yet detect incompatible configurations like false on one slot alongside an instant config on a sibling — that will be handled in a followup.
-
Hendrik Liebau authored
[Flakiness metric](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%22Client%20navigation%20with%20URL%20hash%20when%20hash%20changes%20with%20state%20when%20passing%20state%20via%20hash%20change%20should%20increment%20the%20history%20state%20counter%22%20%40test.type%3A%22turbopack%22%20%40test.status%3A%22fail%22&agg_m=count&agg_m_source=base&agg_t=count&fromUser=false&index=citest&start=1773314950142&end=1773919750142&paused=false) (for one of them) Another case where the Playwright upgrade exposed missing `retry`s.
-
JJ Kasper authored
Continues https://github.com/vercel/next.js/pull/91603 applying the encoding normalization further and narrows in a better regression test separate of root params and specific to vary params flag.
-
Tim Neutkens authored
This reverts commit 058d950b.
-
Josh Story authored
Add per-slot error attribution for instant validation using slot markers and config depth preference (#91610) When a validation boundary spans multiple parallel slots, errors were previously attributed to whichever unstable_instant config was found first during tree iteration — which varied between turbopack and webpack. This made the "Caused by: Instant Validation" source non-deterministic and sometimes pointed to the wrong slot's config. This adds a SlotMarker client component that wraps each slot's content at fork points (where parallel routes > 1). The marker's dynamically-named inner function appears in the SSR component stack, allowing resolveInstantStack to identify which slot an error belongs to and look up that slot's config. When a slot has no config, it falls back to slotStacks[0] (the root config). The root config is now selected by config depth preference rather than first-found. configDepth tracks how many URL-consuming segments deep a config was found, with deeper configs preferred as more specific. At equal depth, the children slot is preferred over named slots. This ensures deterministic attribution regardless of bundler iteration order. Key changes: - SlotMarker component in boundary-impl.tsx takes a name prop and lazily creates named inner functions cached by name - slotStacks array replaces the singleton createInstantStack on InstantValidationState (index 0 = root config, 1+ = per-slot) - configDepth on TreeResult only counts URL-consuming segments — synthetic segments like (__SLOT__), __PAGE__, and route groups don't contribute - resolveInstantStack parses component stacks for slot markers and maps to the correct config - wrapSlotsWithMarkers called at every fork in both buildSharedTreeSeedData and buildNewTreeSeedData
-
Hendrik Liebau authored
- [Flakiness metric for `should handle redirects to routes that provide an invalid RSC response`](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%22app-dir%20action%20handling%20fetch%20actions%20should%20handle%20redirects%20to%20routes%20that%20provide%20an%20invalid%20RSC%20response%22%20%40test.type%3A%22nextjs%22%20%40test.status%3A%22fail%22&agg_m=count&agg_m_source=base&agg_t=count¤tTab=overview&eventStack=&fromUser=false&graphType=flamegraph&index=citest&start=1773313490002&end=1773918290002&paused=false) - [Flakiness metric for `should work with interception routes`](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%22app-dir%20action%20handling%20should%20work%20with%20interception%20routes%22%20%40test.type%3A%22nextjs%22%20%40test.status%3A%22fail%22&agg_m=count&agg_m_source=base&agg_t=count&fromUser=false&index=citest&start=1773313571516&end=1773918371516&paused=false)
-
Vercel Release Bot authored
This auto-generated PR updates the production integration test manifest used when testing Rspack.
-
Jimmy Lai authored
## Summary Run existing app-dir tests with `__NEXT_USE_NODE_STREAMS=true` in CI to validate the node stream rendering path alongside the default web stream path. - New CI job in `build_and_test.yml` that runs a curated set of app-dir tests with the flag enabled - `test/use-node-streams-tests-manifest.json`: manifest of tests to run in node-stream mode ## Test plan - [x] CI job triggers and runs tests successfully - [x] Does not affect existing CI jobs --------- Co-authored-by:Tim Neutkens <tim@timneutkens.nl>
-
Tim Neutkens authored
## What Rename the HMR WebSocket path from `/_next/webpack-hmr` to `/_next/hmr`. ## Why The `webpack-hmr` name is a leftover from when webpack was the only bundler. Now that Turbopack is the default bundler for both `next dev` and `next build`, the path name is misleading. The generic `/_next/hmr` better reflects that this endpoint is bundler-agnostic. ## Changes - **Client source** (`page-bootstrap.ts`, `web-socket.ts`): updated the WebSocket connection path - **Server** (`router-server.ts`): updated the HMR request detection path - **Turbopack** (`turbopack-dev-server/src/lib.rs`): updated the fallback WebSocket path check - **Tests**: updated all test files referencing the old path - **Docs** (`version-12.mdx`): added a note that the path was renamed to `/_next/hmr` in Next.js 16, while keeping the original v12 examples intact
-
Tim Neutkens authored
## What? Split out these changes from #89859. Only adds more plumbing for future Node.js streams feature.
-
Tim Neutkens authored
## What? Extracts the bundling infra to have the Node.js streams experimental flag out of #89859 This only adds the bundle and the v8-jit skill. It does not use the bundle yet, and it's not switching code base on the env var. There will be follow-up PRs for those.
-
Jiwon Choi authored
## Summary - Add `.agents`, `.claude`, and `.cursor` to the `docs` group in `CHANGE_ITEM_GROUPS` in `scripts/run-for-change.mjs` - Changes to these directories (agent skill definitions, editor configs) don't affect Next.js build/runtime/tests, so CI should skip for them — same as docs-only changes - Both `build_and_deploy.yml` and `build_and_test.yml` already use `run-for-change.mjs --not --type docs` to detect non-docs changes; this extends that behavior to agent/editor config files
-
Hendrik Liebau authored
[Test duration metric](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%22deterministic%20build%20-%20changing%20deployment%20id%20build%20output%20API%20-%20standard%20builder%20should%20produce%20identical%20build%20outputs%20even%20when%20changing%20deployment%20id%22%20%40test.type%3A%22turbopack%22%20%40test.status%3Apass&agg_m=count&agg_m_source=base&agg_t=count&fromUser=false&index=citest&start=1773311049123&end=1773915849123&paused=false) The test frequently times out in CI. When it succeeds, it runs close to the 60 second timeout limit, so we increase it to 120 seconds to reduce flakiness.
-
Hendrik Liebau authored
[Flakiness metric](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%22server-components-hmr-cache%20should%20support%20reading%20from%20an%20infinite%20streaming%20fetch%22%20%40test.status%3Afail%20%40duration%3A%3E%3D1ns&agg_m=count&agg_m_source=base&agg_t=count&fromUser=false&index=citest&start=1773310422894&end=1773915222894&paused=false) This test times out frequently on slow CI machines. To fix this, we're removing the low custom 10 second test timeout (using the default 60 second timeout instead).
-
Tobias Koppers authored
### What? Extends the CSS parse warning severity improvements in `turbopack/crates/turbopack-css/src/process.rs`. Canary (#90025, #91513) already: - Added a `severity` field to `ParsingIssue` and a `fn severity()` override - Demoted `UnsupportedPseudoClass` / `UnsupportedPseudoElement` selector errors from `Error` to `Warning` - Still **silently dropped** all other unrecognized parser warning kinds (`_ => { // Ignore }`) This PR completes the work: 1. **Surfaces all previously-ignored parser warnings as `IssueSeverity::Warning`** — the `_ => { // Ignore }` arm now emits a `ParsingIssue` at `Warning` severity instead of discarding it. 2. **Refactors the warning loop** — the nested severity match inside the existing `match err.kind` arm is replaced with a single top-level `let severity = match err.kind { … }` followed by an unconditional emit. This is cleaner and makes the severity logic easier to follow. Hard parse/transform errors (`Err(e)` from `parse_css_stylesheet`, minify errors, CSS module pure-selector errors) are unchanged — they remain `IssueSeverity::Error`. ### Why? Silently dropping parser warnings hides useful diagnostic information from developers. Surfacing them as `Warning` gives visibility without marking the build as broken. The restructure also avoids a redundant `UnsupportedPseudoClass`/`UnsupportedPseudoElement` check inside a nested match — the top-level arm order (specific pseudo variants before the catch-all `SelectorError(..)`) handles precedence correctly. ### How? - Removed the now-unused `error::SelectorError` short import (fully-qualified paths are used in the match). - Replaced the `match err.kind { <arms that emit> … _ => { // Ignore } }` pattern with: 1. `let severity = match err.kind { UnsupportedPseudo* => Warning, hard errors => Error, _ => Warning };` 2. Unconditional `IssueSource` construction and `ParsingIssue { severity, … }.emit()`. Co-authored-by:Tobias Koppers <sokra@users.noreply.github.com> Co-authored-by:
Claude <noreply@anthropic.com>
-