- 13 Mar, 2026 26 commits
-
-
nextjs-bot authored
-
Will Binns-Smith authored
After a successful, Turbopack production build, this writes `.next/diagnostics/route-bundle-stats.json` containing First Load JS stats for every route. ## Why? We used to have route bundle size statistics print after every build. It was not very high-signal and could be misleading, often using heuristics to give a best-effort estimate of what sizes may be at runtime. **These kinds of metrics for route bundle sizes can be misleading, as pages can be slow to visual/interactive completeness even if they have small first load bytes.** However, a minimal gauge of how much JavaScript a route ships during initial page load can be a useful signal so long as users have additional context and awareness of their app structure. Let's provide just this number for now for those that could benefit. Additionally, this does so in the form of writing a json document to the build directory, rather than writing a table to stdout, where users have needed to write extra tools to parse. ## Format An array of route entries sorted descending by `firstLoadUncompressedJsBytes`: ```json [ { "route": "/blog/[slug]", "firstLoadUncompressedJsBytes": 124928, "firstLoadChunkPaths": [ ".next/static/chunks/framework.js", ".next/static/chunks/main.js", ".next/static/chunks/pages/blog/[slug].js" ] } ] ``` `firstLoadUncompressedJsBytes`: sum of uncompressed sizes of all JS chunks loaded on first navigation to the route (shared chunks included), for both Pages Router and App Router `firstLoadChunkPaths`: paths to those chunks relative to the project root ## Test Plan Added an integration test. Built with a create-next-app and verified the json document is written and the numbers align with what Chrome reports during initial load of a page. -
Vercel Release Bot authored
This auto-generated PR updates the development integration test manifest used when testing Rspack.
-
Vercel Release Bot authored
This auto-generated PR updates the production integration test manifest used when testing Rspack.
-
Hendrik Liebau authored
Adds a dedicated test suite that asserts on the errors thrown when `cookies`, `headers`, `connection`, `draftMode`, and `next/root-params` are called inside `generateStaticParams`. Currently, these all fail because `generateStaticParams` runs without a work unit store. Each route is built individually using `--debug-build-paths` so we can capture and assert on the error for each API independently.
-
Niklas Mischkulnig authored
1. This is misldeading in the bundle analyzer view 2. If you have a Nextjs app consisting of only API routes, then there is no need to ever write out any polyfill chunk.
-
Tobias Koppers authored
### What? Switch Turbopack's hash encoding for chunk and asset output filenames from hexadecimal (base16) to base40, using the alphabet \`0-9 a-z _ - ~ .\`. Version hashes (used for HMR update comparison, not filenames) use base64 instead. ### Why? Base40 encodes the same number of bits in fewer characters than hex, producing shorter output filenames. All 40 characters are RFC 3986 unreserved (URL-safe) and safe on case-insensitive filesystems (macOS HFS+/APFS, Windows NTFS). Hash truncation lengths are reduced proportionally to maintain equivalent collision resistance: | Context | Before (hex) | After (base40) | Entropy | |---|---|---|---| | Content hash in chunk filenames | 16 chars | 13 chars | ~69 bits | | Content hash in asset filenames | 8 chars | 13 chars | ~69 bits | | Ident disambiguator hash | 8 chars | 7 chars | ~37 bits | | Long-path prefix hash | 5 chars | 4 chars | ~21 bits | ### How? **New encoding module** (\`turbo-tasks-hash/src/base40.rs\`): - Defines the base40 alphabet and length constants (\`BASE40_LEN_64 = 13\`, \`BASE40_LEN_128 = 25\`) - Implements a generic \`encode_base40_fixed<N>\` helper to avoid duplication - Public API: \`encode_base40(u64) -> String\` and \`encode_base40_128(u128) -> String\` **New base64 encoding** (\`turbo-tasks-hash/src/base64.rs\`): - \`encode_base64(u64) -> String\` — 11-char base64 (no padding) for version hashes - Version hashes don't appear in URLs or filenames, so base64 is safe and shorter **New \`HashAlgorithm\` variants** (\`turbo-tasks-hash/src/lib.rs\`): - \`Xxh3Hash64Base40\` and \`Xxh3Hash128Base40\` added alongside existing hex variants - Existing hex variants kept for internal manifests and identifiers **\`ContentHashing\` moved to \`turbopack-core\`**: - Moved from \`turbopack-browser\` to \`turbopack-core/src/chunk/mod.rs\` so both \`BrowserChunkingContext\` and \`NodeJsChunkingContext\` can use it **Separate chunk vs asset content hashing**: - \`BrowserChunkingContext\`: \`content_hashing\` renamed to \`chunk_content_hashing\` (optional), new \`asset_content_hashing: ContentHashing\` field (non-optional, defaults to 13 chars) - \`NodeJsChunkingContext\`: new \`asset_content_hashing: ContentHashing\` field (non-optional, defaults to 13 chars) - Builder methods: \`use_content_hashing()\` renamed to \`chunk_content_hashing()\`, new \`asset_content_hashing()\` **Version hashes switched to base64**: - \`turbopack-nodejs/src/ecmascript/node/version.rs\` - \`turbopack-dev-server/src/html.rs\` - \`turbopack-browser/src/ecmascript/version.rs\`, \`merged/version.rs\`, \`list/version.rs\` **Other callers updated** (15 files across turbopack and next-core): - All chunk/asset content hashing switched from \`Xxh3Hash128Hex\` → \`Xxh3Hash128Base40\` - \`ContentHashing::Direct { length }\` reduced from 16 → 13 - Asset path truncations use full 13-char base40 hash (matching chunk filenames) **Exception — \`wasm_edge_var_name\`** (\`turbopack-wasm/src/lib.rs\`): - Kept as \`Xxh3Hash128Hex\` because the hash is used as part of a JavaScript variable name (\`wasm_{hash}\`), and base40 characters \`-\`, \`~\`, \`.\` are not valid JS identifier characters. **Scope — NOT changed:** - Webpack configuration (unchanged) - Internal manifests (\`routes_hashes_manifest\`, \`project_asset_hashes_manifest\`) - Internal identifiers (font naming, external module hashing, data URI sources, debug IDs) - SRI hashes (SHA-based Base64, different purpose) --------- Co-authored-by:Vercel <vercel[bot]@users.noreply.github.com> Co-authored-by:
Claude <noreply@anthropic.com>
-
Delba de Oliveira authored
Writing skills for guides and API reference for more consistent formatting. - `write-guide` - this skill helps create guides with progressive disclosure and a consistent format (intro, summary, step-by-step instructions, next steps). Works best when you give agents a demo. - `write-api-reference` - this skill looks at the API type (component, function, file, etc) and helps draft references following a consistent format. Works best when you give agents context. e.g. source code, PR descriptions, RFCs. Also explores repo context (e.g. e2e tests) Note: - While skills help you write a first draft, they’re 80%. Humans still need to check for accuracy, test APIs, and take it to 110%. - If no technical writing guidance is provided, skills work best when you give it references of past work. Closes: - https://linear.app/vercel/issue/DOC-6245/create-guide-skill - https://linear.app/vercel/issue/DOC-6246/create-api-reference-skill --------- Co-authored-by:
vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
-
Sebastian "Sebbie" Silbermann authored
-
Luke Sandberg authored
### What? Refactors the `ModuleReference` trait to make `chunking_type()` and `binding_usage()` methods return direct values instead of `Vc<T>` wrapped values, removing the need for async task functions. Also removes the `get_referenced_asset` task from `EsmAssetReference`, inlining its logic into the callers. ### Why? This change simplifies the API by eliminating unnecessary async overhead for methods that typically return simple, computed values. The previous implementation required `#[turbo_tasks::function]` annotations and `Vc<T>` wrappers even when the methods didn't need to perform async operations or benefit from caching. ### Impact | Metric | Base | Change | Delta | |--------|------|--------|-------| | Hits | 35,678,143 | 35,845,124 | **+166,981** | | Misses | 9,418,378 | 7,910,986 | **-1,507,392** | | Total | 45,096,521 | 43,756,110 | **-1,340,411** | | Task types | 1,306 | 1,277 | **-29** | 29 task types were removed, eliminating **2.6M total task invocations** (1.1M hits + 1.5M misses): - **`chunking_type`** — 21 task types removed across all `ModuleReference` implementors (~952k invocations) - **`binding_usage`** — 6 task types removed (~527k invocations) - **`BindingUsage::all`** — helper task removed (~36k invocations) - **`EsmAssetReference::get_referenced_asset`** — removed and inlined (~1.08M invocations: 628k hits + 451k misses) The removed `get_referenced_asset` hits reappear as +628k hits on `EsmAssetReference::resolve_reference` and `ReferencedAsset::from_resolve_result` (with zero increase in misses), confirming the work is now served from cache through the existing callers. No tasks had increased misses — the removal is clean with no cache invalidation spillover. I also ran some builds to measure latency ``` # This branch $ hyperfine -p 'rm -rf .next' -w 2 -r 10 'pnpm next build --turbopack --experimental-build-mode=compile' Benchmark 1: pnpm next build --turbopack --experimental-build-mode=compile Time (mean ± σ): 52.752 s ± 0.658 s [User: 376.575 s, System: 106.375 s] Range (min … max): 51.913 s … 54.161 s 10 runs # on canary $ hyperfine -p 'rm -rf .next' -w 2 -r 10 'pnpm next build --turbopack --experimental-build-mode=compile' Benchmark 1: pnpm next build --turbopack --experimental-build-mode=compile Time (mean ± σ): 54.675 s ± 1.394 s [User: 389.273 s, System: 114.642 s] Range (min … max): 53.434 s … 58.189 s 10 runs ``` so a solid win of almost 2 seconds MaxRSS also went from 16,474,324,992 bytes to 16,359,309,312 bytes (from one measurement) so a savings of ~100M of max heap size. ### How? - Changed `chunking_type()` method signature from `Vc<ChunkingTypeOption>` to `Option<ChunkingType>` - Changed `binding_usage()` method signature from `Vc<BindingUsage>` to `BindingUsage` - Removed `ChunkingTypeOption` type alias as it's no longer needed - Updated all implementations across the codebase to return direct values instead of wrapped ones - Removed `#[turbo_tasks::function]` annotations from these methods - Updated call sites to use `into_trait_ref().await?` pattern when accessing these methods from `Vc<dyn ModuleReference>` - Removed `EsmAssetReference::get_referenced_asset`, inlining its logic into callers - Added validation for `turbopack-chunking-type` annotation values in import analysis - Fixed cache effectiveness analysis script
-
Tobias Koppers authored
## What? Apply the `cell = "keyed"` pattern to `used_exports` (`FxHashMap`) and `export_circuit_breakers` (`FxHashSet`) in `BindingUsageInfo`, matching the existing pattern already used for `unused_references`. ## Why? Previously, `used_exports` and `export_circuit_breakers` were stored as plain inline collections within `BindingUsageInfo`. Any change to any module's export usage would invalidate **all** callers of `used_exports()`, even those querying unrelated modules. This causes unnecessary recomputation during incremental rebuilds. With keyed cells, lookups like `self.used_exports.get(&module)` and `self.export_circuit_breakers.contains_key(&module)` only invalidate callers that queried the specific module whose export usage changed, providing per-module invalidation granularity. ## How? 1. **New keyed transparent value types** — `UsedExportsMap` and `ExportCircuitBreakers` wrappers with `#[turbo_tasks::value(transparent, cell = "keyed")]`. 2. **Fields changed to `ResolvedVc`** — `used_exports` and `export_circuit_breakers` fields are now `ResolvedVc<UsedExportsMap>` and `ResolvedVc<ExportCircuitBreakers>` instead of inline `FxHashMap`/`FxHashSet`. 3. **`used_exports()` becomes a `#[turbo_tasks::function]`** — Moved into a `#[turbo_tasks::value_impl]` block so it's a tracked task function. Callers (`BrowserChunkingContext`, `NodeJsChunkingContext`) no longer need `.await?` — they call it directly and get a `Vc<ModuleExportUsage>`. 4. **Per-key lookups** — `contains_key(&module).await?` and `get(&module).await?` leverage the keyed cell pattern for fine-grained invalidation. ### Files changed - `turbopack/crates/turbopack-core/src/module_graph/binding_usage_info.rs` — Core changes: new keyed types, field type changes, `used_exports()` as tracked function - `turbopack/crates/turbopack-browser/src/chunking_context.rs` — Simplified call site (no `.await?`) - `turbopack/crates/turbopack-nodejs/src/chunking_context.rs` — Simplified call site (no `.await?`) --------- Co-authored-by:
Tobias Koppers <sokra@users.noreply.github.com> Co-authored-by:
Claude <noreply@anthropic.com>
-
JJ Kasper authored
### What? - Add canonical edge entrypoint metadata to edge function definitions in the middleware manifest. - Surface that canonical entrypoint through `build-complete` as `edgeRuntime` metadata in adapter outputs. - Update middleware and adapter tests to assert the new metadata instead of relying on bundler-specific emitted file names. ### Why? Adapter consumers need a stable way to load and invoke edge outputs without depending on `next-server`'s sandbox handling or guessing which emitted file is the executable entrypoint. The existing checks were also brittle across webpack and Turbopack because the emitted file lists can differ. ### How? - Add an optional `entrypoint` field to `EdgeFunctionDefinition` and populate it in both the webpack middleware manifest generator and the Turbopack manifest emitters for app, pages, and middleware edge functions. - In `packages/next/src/build/adapter/build-complete.ts`, use that canonical entrypoint for `filePath` and expose `edgeRuntime.modulePath`, `edgeRuntime.entryKey`, and `edgeRuntime.handlerExport` for edge outputs. - Adjust the middleware manifest tests to validate cross-bundler invariants and add adapter-config coverage for the new `edgeRuntime` fields.
-
Zack Tanner authored
Flag has been re-enabled and is attached to the test team.
-
nextjs-bot authored
-
Benjamin Woodruff authored
This is basically one-shot from Opus 4.6, with a minor tweak to the doc comment by hand. Discussed this with @lukesandberg, and we realized that there's only one implementation of this trait, so it doesn't make a ton of sense as a trait.
-
JJ Kasper authored
### What? This PR wires custom `cacheHandler` / `cacheHandlers` through the remaining edge entrypoints so edge app pages, edge app routes, edge pages SSR, middleware, and edge API routes can all see the configured handlers. It also adds an e2e regression suite covering: - pages-router ISR revalidation with a custom incremental cache handler - app-router cache handlers with cache components enabled - edge app page + edge app route wiring when cache components are disabled ### Why? We already support custom cache handlers in non-edge paths, but several edge code paths were not forwarding that configuration into the generated entrypoints/runtime wrappers. That meant custom cache handlers could be skipped in edge rendering and edge route execution, and we did not have regression coverage around those cases. ### How? - pass `cacheHandler` / `cacheHandlers` through the JS build entry plumbing for edge server entries - inject cache handler imports/registration into the webpack edge templates and loaders - mirror the same wiring in the Turbopack/Rust entry generation for edge app pages, app routes, pages SSR, and middleware - update the edge route wrapper to initialize and register cache handlers before invoking the route module - extend `next-taskless` template expansion with raw injection support so the generated edge templates can add imports and registration code - add `test/e2e/cache-handlers-upstream-wiring` fixtures to cover pages/app, edge/non-edge, and revalidation behavior
-
Tobias Koppers authored
### What? During compaction in `turbo-persistence`, when entries are dropped (superseded by newer values or pruned by tombstones), blob files referenced by those entries are now marked for deletion. ### Why? Previously, compaction would merge SST files and correctly drop stale entries, but blob files referenced by those dropped entries were leaked on disk (marked with a TODO at the time). Over time this would cause unbounded disk usage growth for databases that overwrite or delete blob-sized values. ### How? When the compaction merge loop skips an entry (because `skip_remaining_for_this_key` is `true`), it now checks if the dropped entry is a `LookupValue::Blob` and, if so, pushes its sequence number to `blob_seq_numbers_to_delete`. The existing `commit()` infrastructure already handles the rest — writing `.del` files and removing the actual `.blob` files after the CURRENT pointer is updated. The change is minimal (4 lines of logic in `db.rs`): - Made `blob_seq_numbers_to_delete` mutable - Added an `else` branch to collect blob sequence numbers from dropped entries This covers both cases: - **SingleValue**: After the first (newest) entry for a key is written, all older entries are skipped. Blob references in those older entries are marked for deletion. - **MultiValue**: After a tombstone is encountered, all older entries for that key are skipped. Blob references in those older entries are marked for deletion. ### Tests Added 4 new tests: - `compaction_deletes_superseded_blob` — blob overwritten by smaller value → blob deleted after compaction - `compaction_deletes_blob_on_tombstone` — blob deleted via tombstone → blob deleted after compaction - `compaction_deletes_blob_multi_value_tombstone` — MultiValue: tombstone prunes blob → blob deleted - `compaction_preserves_active_blob` — blob still referenced → blob preserved after compaction All existing compaction tests (23) and full turbo-persistence test suite (60) continue to pass. Co-authored-by:
Tobias Koppers <sokra@users.noreply.github.com> Co-authored-by:
Claude <noreply@anthropic.com>
-
JJ Kasper authored
### What? This PR extends `@next/routing` so `resolveRoutes()` returns the concrete route resolution data callers need after rewrites and dynamic matches: - rename `matchedPathname` to `resolvedPathname` - add `resolvedQuery` - add `invocationTarget` for the concrete pathname/query that should be invoked - export the new query/invocation target types from the package entrypoint It also removes the leftover `query` alias so the result shape consistently uses `resolvedQuery`. ### Why? `matchedPathname` only described part of the result, and it was ambiguous for dynamic routes because the resolved route template and the concrete invocation target are not always the same thing. For example, a dynamic route can resolve to `/blog/[slug]` while the actual invocation target is `/blog/post-1`, and rewrites can merge query params that callers need to preserve. Exposing these values directly makes the package easier to consume from adapters without each caller reconstructing them manually. ### How? - thread resolved query construction through the route resolution paths - build `invocationTarget` alongside `resolvedPathname` wherever rewrites, static matches, and dynamic matches resolve successfully - preserve merged rewrite query params in `resolvedQuery` - update the public types, README example, and existing tests to use `resolvedPathname` - add coverage for resolved query + invocation target behavior on rewrite and dynamic route matches Verified with: - `pnpm --filter @next/routing test -- --runInBand` - `pnpm --filter @next/routing build`
-
Sebastian "Sebbie" Silbermann authored
-
Andrew Clark authored
Part 1 of 2. This commit adds the server-side infrastructure for size-based segment bundling but does not change any observable behavior. The client-side changes that actually consume bundled responses are in the next commit. At build time, a measurement pass renders each segment's prefetch response, measures its gzip size, and decides which segments should be bundled together vs fetched separately. The decisions are persisted to a manifest and embedded into the route tree prefetch response so the client can act on them. The decisions are computed once at build and remain fixed for the lifetime of the deployment. They are not recomputed during ISR/revalidation — if they could change, the client would need to re-fetch the route tree after every revalidation, defeating the purpose of caching it independently. Refer to the next commit for a full description of the design and motivation. ## Config experimental.prefetchInlining accepts either a boolean or an object with threshold overrides (maxSize, maxBundleSize). When true, the default thresholds are used (2KB per-segment, 10KB total budget). The auto behavior will eventually become the default. The config will remain available for overriding thresholds.
-
Hendrik Liebau authored
When the instant navigation testing cookie is set, the debug static shell path previously called `getFallbackRouteParams()` which treats all dynamic segments as fallback params regardless of `generateStaticParams`. This caused two issues: - Root params (via `next/root-params`) errored with a `NEXT_STATIC_GEN_BAILOUT` 500 response because the root layout's param access returned a hanging promise, which was treated as uncached data accessed outside of `<Suspense>`. - Params defined in `generateStaticParams` were incorrectly excluded from the instant shell, shown behind Suspense fallbacks instead of resolving. The fix uses `prerenderInfo?.fallbackRouteParams` from the prerender manifest instead, which correctly distinguishes between statically known params (defined in `generateStaticParams`) and unknown params. For prerendered URLs, the outer guard (`!isPrerendered`) prevents the fallback path from being entered, so no fallback params are set and all params resolve normally. To make this work in dev mode, the dev server now populates `fallbackRouteParams` in the prerender manifest's dynamic route entries, which were previously left as `undefined`. Additionally, the `fallbackParams` request metadata is now overridden when rendering a debug static shell. Without this override, the staged rendering would use the smallest set of fallback params across all prerendered routes (set by `base-server.ts` for dev validation), which may omit fallback params for the current URL when a different value for the same param is defined in `generateStaticParams`. The override ensures the route-specific fallback params are used instead.
-
Niklas Mischkulnig authored
-
Hendrik Liebau authored
When the Node.js inspector is active (e.g. via `next dev --inspect`), dimming wraps console arguments in a format string which defeats inspector affordances such as collapsible objects and clickable/linkified stack traces. This adds an early return in `convertToDimmedArgs` that skips dimming entirely when `inspector.url()` is defined. Terminal output without `--inspect` is unchanged. Ideally we would only skip dimming when a debugger frontend is actually attached, but Node.js does not expose a synchronous API for that — detecting it would require async polling of the `/json/list` HTTP endpoint. Test plan: - Unit tests in `console-dim.external.test.ts` - Manual: dimming almost never triggers now since we switched to in-band validation (no separate render pass). To reproduce manually, use a client component that calls `console.error(new Error(...))` during SSR, e.g.: 1. `__NEXT_CACHE_COMPONENTS=true pnpm next dev test/e2e/app-dir/server-source-maps/fixtures/default --inspect` 2. Open `http://localhost:3000/` in Chrome 3. Click the Node.js DevTools button 4. Load `http://localhost:3000/ssr-error-log` 5. Verify the first error in DevTools has source-mapped, expandable stack frames Before: <img width="1496" height="848" alt="before" src="https://github.com/user-attachments/assets/8b4358e1-06ec-4078-b6cc-269986e295e7" /> After: <img width="1496" height="842" alt="after" src="https://github.com/user-attachments/assets/42f33c6f-f025-410f-b44c-2ccd88fe0cfe" />
-
Webdesign29 authored
## Summary Replace `btoa(String.fromCodePoint(...chunk))` with `Buffer.from().toString('base64')` for encoding binary Flight data chunks in `writeFlightDataInstruction`. The spread operator `...chunk` converts the entire Uint8Array into individual arguments on the call stack. For a 64KB binary chunk, this creates 65,536 arguments — causing: - Significant call stack pressure (V8's argument limit is ~65K) - Temporary JS string allocation from `String.fromCodePoint` - The entire chunk must be converted to a JS string before base64 encoding `Buffer.from().toString('base64')` performs base64 encoding natively in C++ without any intermediate string allocation or argument spreading. **Edge runtime compatibility**: Falls back to the original `btoa` path where `Buffer` is unavailable. ## Test plan - [x] TypeScript compilation passes - [x] Prettier and ESLint pass (pre-commit hooks) - [x] Produces identical base64 output - [x] Edge runtime falls back to original path (no `Buffer` available) - [x] Node.js runtime uses `Buffer.from` for native encoding🤖 Generated with [Claude Code](https://claude.com/claude-code)
-
- 12 Mar, 2026 14 commits
-
-
Benjamin Woodruff authored
Copied over from https://turbopack-rust-docs.vercel.sh/turbo-engine/singleton.html with minimal changes. 
-
nextjs-bot authored
-
Luke Sandberg authored
## Summary Remove the unused LMDB database backend and the `ReadTransaction` abstraction layer from `turbo-tasks-backend`. This is a pure cleanup that deletes ~1,500 lines of code and eliminates all `unsafe` blocks related to transaction lifetime management. **Motivation:** - This was much more useful in the early days of the persistence layer where comparing against a 'known good' db was useful, but this has rotted and turbo-persistence has gained lots of tests and usage so that this is not needed. - Carrying the code added a lot of complexity to APIs e.g. - The `ReadTransaction` abstraction existed solely to support LMDB's transaction-based read model - The only remaining backend (`TurboKeyValueDatabase` via `turbo-persistence`) already used `()` as its `ReadTransaction` type, making the entire abstraction dead weight - The transaction plumbing required `unsafe` transmute-based lifetime extension in `ExecuteContextImpl`, adding complexity and risk for no benefit - The WriteBatch::Serial branches complicated already subtle code paths -
Andrew Clark authored
Previously, MPA page loads (reload, anchor navigation) while the instant navigation lock was held would skip hydration entirely and hard-reload when the lock released. This meant the page was non-interactive during the locked period and tests couldn't assert on the hydrated React tree. Now the page actually hydrates from the static shell. The server injects a script that fetches the static RSC payload, and the client uses createFromFetch with allowPartialStream so React can hydrate without erroring on the incomplete Suspense boundaries. When the lock is released, a soft refresh fetches the dynamic data (falling back to hard reload if the router hasn't initialized yet). Also refactors the cookie protocol to encode the lock state as a JSON array (`[0]` = pending, `[1, null]` = captured MPA, `[1, {}]` = captured SPA) for better integration with the devtools UI. This is somewhat entangled with the hydration changes so they're grouped together, but can be reviewed as atomic commits. -
Benjamin Woodruff authored
Migrates the content from https://turbopack-rust-docs.vercel.sh/turbo-engine/traits.html over to rustdocs, and tries to update/fix some minor mistakes our outdated docs.   
-
Will Binns-Smith authored
This: - Fetches `data/_app/analyze.data` alongside the current route's data - Merges `_app` modules into the current route's `AnalyzeData` before visualization using a `mergeAnalyzeData()`, which merges the two datasets, reindexing the additional ones and recreating the binary data format expected by the treemap. ## Test plan - [x] Add a large dependency (e.g. `moment`) in `pages/_app.tsx` - [x] Run `next experimental-analyze` - [x] Open the bundle analyzer and select a pages page - [x] Verify moment appears in the treemap - [x] Verify App Router projects (no `_app`) work without errors
-
Janka Uryga authored
Adds extra context to errors that we think may have prevented validation: <img width="816" height="765" alt="Screenshot 2026-03-12 at 22 07 40" src="https://github.com/user-attachments/assets/35ce60d0-4840-496e-b91e-62ada4096f64" /> This is particularly useful for errors where the component comes from node_modules, so it gets ignore-listed. previously, all we got is the message with no stack, no we at least get a location. One notable case of this is `next/dynamic` with `ssr: false`. <img width="802" height="556" alt="Screenshot 2026-03-12 at 22 08 30" src="https://github.com/user-attachments/assets/b1240732-3346-4056-89b2-9a864a3166f2" />
-
JJ Kasper authored
### What? This PR exposes adapter-facing router helpers on `requestMeta` for Node.js entrypoints and updates route modules to merge those request-scoped values with the existing router server context fallback. It also documents the new adapter contract in the `adapterPath` docs. ### Why? When adapters invoke the Node.js handler directly, some router helpers are needed by route handlers but currently only exist behind internal globals. Passing them through `requestMeta` makes those helpers available through the public handler options and still preserves the existing fallback context for the current `relativeProjectDir`. ### How? - add typed `requestMeta` fields for `hostname`, `revalidate`, and `render404` - add a `RouteModule` helper that reads the existing router server context and overlays request-scoped values from `requestMeta` - switch the route-module callsites that read router server context to use the merged result - document how adapters can pass these helpers when calling `handler(req, res, { requestMeta })` -
nextjs-bot authored
-
dependabot[bot] authored
Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.7 to 7.5.11. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/isaacs/node-tar/commit/bf776f673164215074b62749e0fe80e5834588f4"><code>bf776f6</code></a> 7.5.11</li> <li><a href="https://github.com/isaacs/node-tar/commit/f48b5fa3b7985ddab96dc0f2125a4ffc9911b6ad"><code>f48b5fa</code></a> prevent escaping symlinks with drive-relative paths</li> <li><a href="https://github.com/isaacs/node-tar/commit/97cff15d3539a37a4095eb3d287147d9d77c2dc3"><code>97cff15</code></a> docs: more security info</li> <li><a href="https://github.com/isaacs/node-tar/commit/2b72abc1d47c3570e1ad95c9ab557fc4c2e6e4b1"><code>2b72abc</code></a> 7.5.10</li> <li><a href="https://github.com/isaacs/node-tar/commit/7bc755dd85e623c0279e08eb3784909e6d7e4b9f"><code>7bc755d</code></a> parse root off paths before sanitizing .. parts</li> <li><a href="https://github.com/isaacs/node-tar/commit/c8cb84629dee649feedde03f2f4ea48f2e44e778"><code>c8cb846</code></a> update deps</li> <li><a href="https://github.com/isaacs/node-tar/commit/1f0c2c9006b10199cf2686f8ef43e79a1773e1aa"><code>1f0c2c9</code></a> 7.5.9</li> <li><a href="https://github.com/isaacs/node-tar/commit/fbb08518bf290733b68ca4d4135f75becf73fd75"><code>fbb0851</code></a> build minified version as default export</li> <li><a href="https://github.com/isaacs/node-tar/commit/6b8eba0ef367ac937e703238daa6df94ae6f823f"><code>6b8eba0</code></a> 7.5.8</li> <li><a href="https://github.com/isaacs/node-tar/commit/2cb1120bcefe28d7ecc719b41441ade59c52e384"><code>2cb1120</code></a> fix(unpack): improve UnpackSync symlink error "into" path accuracy</li> <li>Additional commits viewable in <a href="https://github.com/isaacs/node-tar/compare/v7.5.7...v7.5.11">compare view</a></li> </ul> </details> <details> <summary>Maintainer changes</summary> <p>This version was pushed to npm by <a href="https://www.npmjs.com/~isaacs">isaacs</a>, a new releaser for tar since your current version.</p> </details> <details> <summary>Install script changes</summary> <p>This version adds <code>prepare</code> script that runs during installation. Review the package contents before updating.</p> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/vercel/next.js/network/alerts). </details> --------- Signed-off-by:
dependabot[bot] <support@github.com> Co-authored-by:
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by:
Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by:
styfle <229881+styfle@users.noreply.github.com>
-
Benjamin Woodruff authored
Copying content from https://turbopack-rust-docs.vercel.sh/turbo-engine/task_inputs.html Removed some AI slop and some outdated stuff (`Value` is gone, we implemented `TaskInput` on `Arc`). Added a note about serialization of reference counted types. Rendered: 
-
Sebastian "Sebbie" Silbermann authored
-
Zack Tanner authored
Reverts vercel/next.js#91163 Flag is re-landed for test teams
-
JJ Kasper authored
## Summary - export `NEXT_ENABLE_ADAPTER=1` in the `test-new-tests-deploy` workflow job - export `NEXT_ENABLE_ADAPTER=1` in the `test-new-tests-deploy-cache-components` workflow job ## Testing - `git diff --check`
-