* chore(deps): bump srvx to ^1.0.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(deps): bump @vitejs/plugin-rsc to ^0.5.37
0.5.37 depends on srvx ^1.0.5, which drops the last srvx 0.11 copy from
the lockfile. It is temporarily excluded from minimumReleaseAge until it
is 24h old.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore: drop minimumReleaseAge exclusion for @vitejs/plugin-rsc
0.5.37 is now older than the 24h minimum release age.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(ci): TEMP experiment - rsc e2e on srvx 0.10 (revert before merge)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Revert "test(ci): TEMP experiment - rsc e2e on srvx 0.10 (revert before merge)"
This reverts commit 2c7279a0b9.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Create the request middleware deduplication set only when request
middleware is configured, and pass Start's serialization adapters to the
router without copying them when the router adds none.
Server route handlers and route middleware now receive the router's
decoded pathname, the one used for route matching.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(start-plugin-core): preload transitive static imports and fix Rsbuild shared-chunk CSS
Route preloads read a chunk's `imports` as a complete list, which only
holds when the bundler hoists transitive imports. Walk the static import
graph instead, and derive Rsbuild chunk imports from the module graph
rather than chunk-group siblings so shared chunks stop attaching
unrelated route CSS to the SSR response.
Fixes#8415Fixes#8511
* refactor(start-plugin-core): share one static import walk for preloads and CSS
The manifest builder walked the static import graph twice, once breadth-first
for preloads and once recursively for stylesheets. A single memoized
depth-first walk now records discovered file names for preloads and chunks in
post-order for stylesheets, which also keeps every chunk in an import cycle
seeing the whole cycle instead of a partially cached result.
The Rsbuild adapter resolved static dependency chunks again for every CSS-only
chunk reached from each importer; the resolution is now memoized per chunk.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* docs(start-plugin-core): drop Rollup from the imports contract comments
Rollup is no longer a supported client bundler, so the `imports` contract is
described in terms of the direct-imports-only lists Rolldown and Rsbuild emit.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
---------
Co-authored-by: Manuel Schiller <6340397+schiller-manuel@users.noreply.github.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* refactor(start)!: remove the deprecated inputValidator
createServerFn().inputValidator() and createMiddleware().inputValidator()
were deprecated aliases of validator(). Remove both, the inputValidator
option the builders set, and the compiler's deprecation warnings, so
validator() is the only way to declare a validator. Server functions now
store their validator under the key middleware reads.
The compiler test of diagnostic locations across line terminators now
checks the code frame of the destructuring diagnostic instead of the
removed warning.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(agents): do not test that a removed API is gone
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The sitemap writer emitted image:* and news:* elements, but <urlset> only
declared the default sitemap namespace and xmlns:xhtml. xmlbuilder2
serialized those elements with xmlns="" and an undeclared prefix, so
sitemaps with images or news were not namespace-well-formed XML. Declare
xmlns:image and xmlns:news on <urlset>.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(start-plugin-core): keep prerender credentials out of public pages.json
pages.json and sitemap.xml are now built from schema-validated public page
fields, so prerender headers and extra data returned by prerender.onSuccess
are stripped from the published files. Invalid sitemap metadata returned by
prerender.onSuccess now fails the build with an error naming the page and
the offending field.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(changeset): describe previous onSuccess sitemap behavior accurately
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(router-generator): don't scaffold over a route file mid in-place save
An in-place save truncates the file and then writes it. If the generator
reads the route file in between, it sees empty content and scaffolds a
template. Its mtime guard before renaming the template into place does not
catch the completed save, because the truncation and the write usually share
one mtime tick on Linux, so the user's content was replaced by the template.
Route file writes now also confirm the file still has the content the
generator read before replacing it.
This was the main cause of flaky tanstack-react-start-e2e-hmr runs, where SSR
rendered `Hello "/route"!` after the test restored a route file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(router-generator): check for concurrent saves right before the rename
safeFileWrite compared the target's mtime and content before preparing the
temporary file's mode and owner, so a save completing during those steps was
still replaced. Run the check last, immediately before the rename.
The regression test now also completes the save during the temporary file
stat, and keeps the generator's tmpDir inside the test directory so the
rename never crosses filesystems (EXDEV on CI).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(router-generator): match generator paths on Windows in concurrent save test
The generator reads route files through forward-slash paths, also on Windows,
so compare resolved paths when injecting the concurrent save.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(router-generator): only read files whose content is compared
The final concurrent-change check before the rename read the whole target
file even for the route tree, whose content is never compared. Stat it
instead, as before, and read only route files.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Rolldown module ids use forward slashes on Windows, so looking up the
native entry path never matched and the test waited until it timed out.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* test: format compiler output before comparing file snapshots
The router-plugin and start-plugin-core compiler snapshots record the
layout choices of the code generator (object wrapping, blank lines,
parentheses around JSX) along with the emitted program, so swapping the
code generator rewrites most snapshot files even when the output is the
same.
Format the output with Prettier before comparing it: fixed options,
`objectWrap: 'collapse'`, and blank lines outside template literals
removed. Comments are kept. Output that does not parse is compared as is.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test: regenerate compiler snapshots with formatted output
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test: format inline compiler snapshots before comparing them
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(start): preserve dev SSR CSS order
fixes#7794
* add e2e tests for solid and vue, handle vue style urls
* test(start): cover bundled dev styles and SSR reload lifecycle
* fix(start): use completed bundled graph for dev SSR styles
* fix(start): preserve import reachability across bundled dev variants
* test(start): cover layered inline CSS without build observers
* test(start): wait for bundled HMR route registration
* test(start): await HMR readiness in both Vite modes
* test(start): trace initial bundled HMR update in CI
* test(start): trace native bundled HMR watcher in CI
* test(start): inspect initial native watch registrations
* fix(start): support the latest bundled dev toolchain
This reverts commit ff9f753c09.
#8643 introduced a React hydration mismatch for `ssr: false` and
`ssr: 'data-only'` routes without a pending component: the client load can
commit before React hydrates the route's Suspense boundary, which then
hydrates the route component against the server's pending UI. Revert while a
proper fix is worked on.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix: keep server-rendered pending UI of no-SSR routes through hydration
Fixes#8640. The server rendered a no-SSR match's pending UI in a
ClientOnly fallback, while the hydrating client renders the presented
pending match through MatchInner. After hydration the switch replaced
(React: hid and duplicated) the server node. Render the server pending UI
through the same MatchInner pending path and drop the ClientOnly wrapper.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test: cover terminal no-SSR boundaries through hydration
Add error, notFound and URL not-found cases for `ssr: 'data-only'` and
`ssr: false` boundaries (plus a terminal child below a data-only boundary)
in React, Solid and Vue. Each case asserts the server payload, that the
server skeleton is the only one and is held for `pendingMinMs`, and that no
hydration mismatch is reported. The hold check catches mismatches that React
and Solid error boundaries replace silently.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(router-core): avoid null bytes in dehydrated SSR match ids
dehydrateSsrMatchId replaced "/" with U+0000 so dehydrated ids would not
look like crawlable URLs (#6739). U+0000 is forbidden in the HTML input
stream though, so the inlined hydration payload tripped a
control-character-in-input-stream parse error and failed markup
validation. Encode with U+FFFD instead, which is valid in HTML and which
hydrateSsrMatchId already decodes back to "/".
* test(router-core): cover legacy null-byte decode in hydrateSsrMatchId
The codec keeps the U+0000 -> "/" decode branch so SSR payloads from a deploy before the U+FFFD switch still hydrate. That branch was the one path the suite didn't exercise, so add a test for it.
* fix(router-core): compare SSR match ids in encoded form
Encode slashes as U+FFFD with no further escaping, and have the client
encode its own match id instead of decoding the server's. Payload and
client always ship from the same build, so the legacy null-byte decode
and the reversible escape scheme are no longer needed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(router-core): keep dehydrated SSR match ids one-byte
A U+FFFD delimiter made V8 widen the encoded ids, and every HTML string
concatenated with them, to two-byte strings, slowing Solid SSR
serialization by ~5%. Use ASCII `|` instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(router-core): delimit dehydrated SSR match ids with '#'
`|` is a valid static route character, so `/a/b` and `/a|b` encoded to
the same id. A decoded pathname keeps `%23` encoded and params encode
`#`, so a matched id cannot get a '#' from the URL. Seroval emits it
unescaped and it keeps the HTML one-byte.
Tighten the regression test to reject any non-whitespace control
character and any char above U+00FF in the inlined hydration HTML.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Flo <me@florianpellet.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* test(router-plugin, start-plugin-core): cover compiler output regressions
Add engine-agnostic regression tests for compiler output found while
reviewing the compiler migration (#8504). They only use the public
compiler entry points and validate emitted code with Vite's Oxc
transform/parser (TypeScript erased, parsed as a JS module with semantic
checks), so they run unchanged against any compiler implementation.
router-plugin:
- every emitted code-splitter module stays valid for re-exported imports,
partially exported destructuring and anonymous default exports
- self-/mutually-referencing side effects stay in the reference module
- namespace imports used by `import X = ns.X` and decorator placement
before `export` are preserved
- React Refresh hoisting keeps closures in scope, hoists the root route
component, and declares hoisted components before use
start-plugin-core:
- self-referencing user code survives client and server compilation
- nested and switch-case createServerFn keep provider modules valid
- aliased createClientOnlyFn re-exports are transformed in SSR
- Hydrate split modules: parent/fallback-only bindings are removed, text
children render decoded entities, `'use client'` stays first
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test: require hoisting and declared bindings in compiler regression tests
- The React Refresh ordering test now requires the inline pendingComponent
to be hoisted instead of passing when it stays inline, since main hoists it
and React Refresh needs a top-level binding.
- The self-referencing side-effect tests also assert that each binding the
callbacks use is still declared. The module validator does not report
references to undeclared names. The Start variant now validates the module.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(router-plugin, start-plugin-core, router-generator, react-start-rsc): cover compiler edge cases
Engine-agnostic tests through public compiler entry points, passing on
main. They cover:
- code-splitter module state shared with exported functions, `var`
declared inside top-level statements, long method chains, duplicate
split keys, split options that read `Route`, route options declared
in a variable, re-exports, type-only syntax, private class members,
and namespace JSX tags
- the code-splitter plugin pipeline: analysis cache keys and eviction,
plugin-level `splitBehavior`, config `deleteNodes`, and the
non-split HMR plugin for Solid and Vue
- the route generator transform with parenthesized call parts, and
byte-exact edits after a BOM or astral characters
- the Start compiler: dev-mode server function ids, provider
directives, handler name versioning, provider export removal,
cross-module factory resolution, invalidation, and diagnostic
locations
- Hydrate children with block-bodied callbacks, self-closing
boundaries, captures, split attributes, and the virtual module cache
- import-protection exports, member-chain boundaries, source-mapped
locations, and executed denied-import rewrites
- RSC CSS transform import shapes and argument unwrapping
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(start-plugin-core): port Next.js server actions fixtures to createServerFn
Translate the scenarios of Next.js's server-actions transform fixtures
(crates/next-custom-transforms/tests/fixture/server-actions) to the
createServerFn client, SSR caller and provider outputs: captured module
bindings, shadowing, destructuring, handler forms, directives, export
forms, non-ASCII names and client/server-only code side by side.
The destructuring default and computed-key cases pass on main and fail
with the Yuku compiler (#8504), which keeps every sibling of a live
destructuring and with it a server-only import in the client output.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(router-plugin): port Next.js SSG and React Router route-chunk splitting scenarios
Translate edge cases from Next.js's SSG transform fixtures and React Router's
route-chunks / remove-exports tests into code-splitter coverage: imports used
in JSX positions, shadowed names, transitive pruning of every declaration
kind, destructurings and multi-declarator statements split across groups,
mutually recursive shared helpers, nested-scope dependency analysis, helpers
shared with the loader, top-level calls on imports and split chunk source
maps. All scenarios already behave correctly; these tests pin them.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(start-plugin-core, router-plugin): port Qwik optimizer extraction edge cases
Port capture and extraction scenarios from the Qwik optimizer test suite
(QwikDev/qwik, packages/optimizer/core/src/test.rs) to the Hydrate split
transform, server function extraction and route code splitting. All of
them pass with both the Babel and the Yuku compiler.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(router-plugin, start-plugin-core): cover real-world compiler shapes
Adds regression coverage derived from a differential audit of in-repo
examples/e2e apps and open-source TanStack Router/Start apps:
- split chunks import exported route-file bindings instead of copying them
- declarations and imports only referenced from TypeScript types survive
(classic JSX runtime React imports, side-effecting initializers)
- TypeScript type and value exports sharing a name compile
- file-level JSX pragmas stay in split chunks and Start compiler output
- ambient declarations are not imported from the shared module
- chained comparisons in plain JavaScript route files keep their operands
- real-world route file names go through the code-splitter plugin pipeline
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(router-plugin, start-plugin-core): port React Compiler fixture shapes
Wrap component bodies adapted from the React Compiler fixture corpus into
route files and Start modules:
- split route components and Hydrate chunks render like the original for
labeled breaks, shadowing catch params and function names, destructuring
defaults, getters/computed keys, hoisted functions, optional call chains,
tagged templates and classes with static blocks/private fields
- server function handlers that read a server-only import through unusual
syntax positions keep it off the client
- unused locals with side-effectful initializers (hook calls) in shared route
modules and Hydrate chunks still run; these fail on the Yuku migration,
which removes them
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test: cover exported route variables in split chunks and JSX pragma forms
- Split chunks import exported route-file variables (contexts, stores and
caches built from private bindings) from the route module instead of
redeclaring them.
- The Start compiler keeps JSX pragmas in the Hydrate chunk, line-comment and
license-header forms, classic `@jsx` with `@jsxFrag`, and after a
`'use client'` directive.
Both pass on main and on #8504 after its fixes.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(start-plugin-core): port SolidStart directive and Waku allowServer edge cases
Translate SolidStart's "use server" directive compiler tests and helpers
(type-only import specifiers, rejected server fn positions, captured
this/arguments/super/private members, id stability and opacity, Hydrate
closure captures) and Waku's allowServer transform tests (dependency
pruning, aliasing, default exports, untouched look-alikes, zero-argument
factories, trailing comments) into Start compiler coverage for React and
Solid.
The import-alias namespace test passes on main and fails on the Yuku
compiler (#8504), which deletes the aliased namespace.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(router-plugin): port React Refresh and solid-refresh scenarios to route HMR
Covers which route component shapes React Refresh registers after the HMR
transforms (checked with Vite's Oxc React Refresh transform), hook
signatures, @refresh reset, generated-name collisions, and the module shape
solid-refresh expects (registrable components, @refresh reload/skip,
top-level createContext).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(router-plugin, start-plugin-core, react-start-rsc): port @vitejs/plugin-rsc transform edge cases
Port scope, hoisting, export-shape, export * and directive scenarios from
@vitejs/plugin-rsc's transform tests (vitejs/vite-plugin-react, MIT) to the
Start compiler (server fn providers and callers, env-only functions, Hydrate
chunks), the route code splitter and the RSC CSS transforms.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test: port babel-dead-code-elimination and Turbopack tree-shaker scenarios
Port dead-code-elimination scenarios (pcattori/babel-dead-code-elimination)
and Turbopack tree-shaker analyzer fixtures (vercel/next.js) to the code
splitter and the Start compiler: import specifier pruning, initially unused
declarations and cycles, SCC removal, write-only bindings, nested patterns
with rests and defaults, empty parameter patterns, var declarations nested
in top-level statements, import attributes, typeof references, enum IIFEs,
shared mutable state and statement order in the provider.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(router-plugin): share compiler regression test helpers
The regression suites each re-implemented the same plumbing. Move it into
`tests/regression-helpers.ts`:
- `compileRouteModules` (reference, virtual chunks and shared module, with
optional route HMR, Solid target or file name) and `expectValidModules`,
previously copied into 12 files
- `buildAndRun`, the Vite build-and-run harness copied into 5 files
- `createCodeSplitterTransforms` and `transformWithRouteHmrPlugin`, which
drive the bundler plugins the way a bundler does
- `evaluateModule`, the JSX-to-text module evaluator copied into 3 files
No test is added, removed or renamed.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(start-plugin-core): share compiler regression test helpers
The regression suites each built their own `StartCompiler`, output compiler,
Start runtime stubs and `<Hydrate>` chunk loader. Move them into
`tests/regression-helpers.ts`:
- `createStartCompiler`, `compileFor`, `compileCode` and `compileAll` (client,
SSR caller and provider outputs, validated), previously built in 10 files
- `importModule`, `callProvider`, `importSources` and `settle`, with one
minimal Start runtime instead of four variants
- `compileHydrate`, `getChunkParams`, `getChunkIds`, `loadChunk`,
`evaluateModule` and `renderChunk`, previously copied into 6 files
No test is added, removed or renamed.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(react-start-rsc): share the RSC CSS transform compile helper
Both RSC CSS transform regression suites defined the same compile helper
and a copy of the module validator; move the helper into
`tests/regression-helpers.ts` and reuse start-plugin-core's validator.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(router-plugin): merge duplicated compiler regression tests
Remove tests whose input shape and assertions another suite already covers,
folding any unique assertion into the surviving test:
- code-splitter-real-world: the two "split chunks share exported route-file
bindings" compile checks duplicate code-splitter-exported-bindings (the
built-app check stays); "file-level JSX pragmas" duplicates the
@jsxImportSource cases of code-splitter-jsx-pragmas, which now also check
that Oxc selects the pragma's JSX runtime for every split chunk.
- ported-react-compiler-fixtures: "a catch parameter shadowing a module
binding" duplicates the plugin-rsc "next to a catch parameter of the same
name" case, which now names both sources.
- ported-nextjs-ssg: "moves one declarator of a multi-declarator statement
into the split chunk" duplicates the React Router "plain declarators" case,
which now also asserts where each declarator is declared.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(start-plugin-core): merge duplicated compiler regression tests
- The SolidStart "local types used by split children are not passed as
props" Hydrate test duplicates the Qwik "local types used by the children
are not captured as values" test; the Qwik test now also covers JSX type
arguments and asserts that no type is passed as a prop.
- start-compiler-edge-cases "does not duplicate a directive the module
already has" becomes a case of the plugin-rsc "provider module directives"
table, which also checks the prologue and module validity.
- The single test of aliased-env-only-fns.test.ts moves to the
"cross-module factory resolution" tests of start-compiler-edge-cases, where
its output is also validated.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(router-generator): merge the parenthesized route call transform tests
transform-parenthesized.test.ts duplicated the `transform` harness of
transform-preservation.test.ts; move its tests there.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(router-plugin): keep covering configs without the router plugin
Before the code-splitter transforms were shared, the real-world file-name
test resolved a Vite config that did not list the router plugin, which
covers the early return of the plugin-order check. Let the shared helper
take the config's plugins and keep that case.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(router-plugin): regroup compiler regression tests by behaviour
Dissolve the ported-* and code-splitter edge-case files into behaviour
files (dead code, imports/exports, module state, pragmas, route options,
scope), drop duplicate cases and vacuous assertions, and replace the five
real Vite builds with one.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(start-plugin-core): regroup compiler regression tests by behaviour
Dissolve the ported-* and start-compiler edge-case files into behaviour
files (server fn caller dead code, declaration sites, exports and
directives, handler scope, Hydrate captures, factories, user code kept),
drop duplicate cases and vacuous assertions, and compile through a single
harness. The RSC external-transform scope cases move into compiler.test.ts,
replacing react-start-rsc's ported-vite-plugin-rsc.test.tsx.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(router-generator): move transform edge cases into transform.test.ts
Merge the five parenthesized-call cases into one test next to the existing
outer-parens test and fold the remaining preservation cases into
transform.test.ts, reusing its makeNode helper.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(react-start-rsc): move RSC CSS transform edge cases into rscCssTransform.test.tsx
Keep the cases with unique coverage (the @tanstack/react-start-rsc import
source, transparent JSX wrappers, non-JSX arguments) next to the existing
tests and drop the separate helper, which imported start-plugin-core tests.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test: keep regression tests valid once known compiler bugs are fixed
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test: share the build and React Refresh helpers
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(start-plugin-core): link Hydrate chunks to their parent however a fix imports it
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* perf(solid-router): let mergeProps memoize the Link's own props
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* test(solid-router): pin how Link element props, state props and handlers reach the anchor
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* ci: retrigger benchmarks against refreshed main baselines
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* test(benchmarks): add departing and retained Link navigation cases
Add lane-* cases to the React Link performance harness, with per-navigation
sync, onLoad and total timings in the paired runner.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* perf(react-router): share one location subscription per route's Links
Links subscribe to a scope owned by their match context instead of each
subscribing to the location store. A scope skips a location publication
whose navigation leaves its route, so Links that are about to unmount do
no work. Clicks and preloads resolve from the location a Link displays,
and mask builds use the same source location as their destination.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* test(benchmarks): add Solid departing and retained Link navigation harness
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(solid-router): hold the location of Links in a departing match
Each Match owns one memo that keeps its Links' source location when the
publishing navigation leaves the route, so those Links do no work.
Clicks and preloads resolve from that source.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(react-router): trim the Link scope's bundle cost
Key each router's link scopes by route id instead of carrying them in a
`[routeId, linkScope]` match context tuple. `matchContext` provides the
route id again, so `Match`, `Outlet`, `useMatch` and `useParentMatches` /
`useChildMatches` match main, and the outside-every-match holder becomes
the `undefined` key of the same registry. A scope without links still
releases its location, so keeping one per route id holds none.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(benchmarks): add Vue departing and retained Link navigation harness
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(vue-router): hold the location of Links in a departing match
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(benchmarks): add a real-browser Link INP harness
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(solid-router): gate departing Links in their own location memo
Drop the per-Match memo and the third match-context slot. Each Link reads
its route id once at setup and, while the publishing navigation leaves
that route, keeps its previous location in the memo it already owns.
Links mounting in an already-departing route read the pending location.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(benchmarks): add Vue to the real-browser Link INP harness
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(solid-router): build Link navigations from the live location state
The Link location memo deduplicated by href, so a same-href navigation that only changed history state left clicks and preloads building from the previous location's state.
Compare by identity instead; downstream href and active memos still compare by value, so unchanged Links do not touch the DOM.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(react-router): drop the Link scope's reentrant publication re-check
A listener that publishes a new location while a route's Links derive is not a
supported use case, so the scope no longer re-reads the store after notifying.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(react-router, router-core): follow-up Link improvements (#8607)
* perf(router-core): cache location-independent masked destinations
A mask that reads the current location already marks the result as
source-dependent through the shared usedCurrent flag, and route masks
belong to the route tree and options whose updates replace the cache.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(react-router): hydrate hash-sensitive Links through the scope's server snapshot
The Link's location subscription already has a server-snapshot slot.
Reporting an active hash-sensitive Link as inactive there replaces the
per-Link useHydrated subscription with identical hydration output.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(react-router): follow href and reloadDocument changes of a mounted Link
The destination memo did not depend on href, so a Link whose href alone
changed kept displaying, preloading and navigating to the old target.
Clicks also navigated with the memo's copy of the options, so a changed
reloadDocument only applied once another destination prop changed.
Navigate with the current options and the displayed source location.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(react-router): hold a Link's intent preload timer on its own ref
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(history): avoid copying navigation arguments when checking blockers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(benchmarks): opt-in intent preloading for the Link lane cases
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore: changeset
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* perf(solid-router, vue-router): follow-up Link improvements (#8609)
* test(benchmarks): measure Solid and Vue Link lanes with intent preloading
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(solid-router): reuse a Link-owned destination so fixed Links hit the location cache
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(solid-router): pass navigation controls through the Link-owned options
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(solid-router): cover Link clicks after a state-only navigation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(solid-router): read Link options directly with a single splitProps
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(solid-router): keep the Link preload timer in a closure
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(solid-router): let the Link observer read the preload mode directly
The internal useIntersectionObserver no longer returns an unused accessor and
takes the preload mode instead of two predicates (its unit test is updated).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(solid-router): create the Link hydration signal only for SSR routers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(solid-router): let element insertion track Link children without a memo
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(solid-router): call a Link's ref once per element
The ref no longer comes from the props memo, so href/active changes do not
re-run the element's ref effect. Drops the mergeRefs import.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(solid-router): derive a Link's href and active state in one computation
The destination build, href, external/blocked classification and active state
share one memo whose unchanged result keeps its identity, so a navigation that
leaves a Link as it was notifies nothing downstream. Presentation props only
rerun the props memo. The server derives the same values once, without memos.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(benchmarks): use the t quantile for the lane comparison's round count
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(solid-router): split a Link's props once
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(vue-router): reuse a Link-owned destination so fixed Links hit the location cache
Navigation controls travel on the same object, so clicks no longer re-list them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(vue-router): pick a Link's element props with one shared key set
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(vue-router): derive a Link's href and active state in one computed
The preload effects read a location-independent mode, so a navigation no
longer queues them for every Link. A Link whose destination updater navigates
while it derives derives again for the newer location.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(vue-router): keep the Link preload timer in a closure
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(vue-router): drop the unused IntersectionObserver ref per Link
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(vue-router): return plain empty Link props without a router
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(vue-router): render server Links without reactive wrappers
The server returns shallow refs and reads Link props directly, without the
attrs snapshot, its update hook, the props computed or a template ref.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(vue-router): drop the deferred re-derivation for updaters that navigate
A search updater that navigates while a Link derives is not a supported use
case; remove the retry that existed only for it, and its test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore: add changeset for the Solid and Vue Link follow-up
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* chore(benchmarks): remove the real-browser Link INP harness
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(solid-router, vue-router): rebuild masks whose options are stores
Router core now reuses masked locations built from the same options object
when the mask does not read the current location. Solid and Vue Links keep
one destination object while their navigation options keep their identity,
and only a store/reactive option value forced a fresh object per location.
A plain mask object holding a store (e.g. `mask={{ to, params: store }}`)
therefore kept the mask built from the store's first value. The mask's own
values are destination options too, so check them for stores as well.
React has no in-place reactive values: a changed mask prop changes identity
and rebuilds. Add the equivalent React coverage for prop and inherited masks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(benchmarks): remove the ad-hoc Link lane harnesses
The link-churn scenario covers this work in CodSpeed. Removes the Solid and
Vue lane harnesses and restores link-performance to its main content.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* style: name tuple indexes in Link code
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(react-router): stop treating _fromLocation as a Link prop
`_fromLocation` is an internal router option, not a Link prop: the Link
always builds from its own scope's location. It stays among the stripped
router option keys so code that still passes it does not leak an attribute
to the element.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(solid-router): stop treating _fromLocation as a Link prop
`_fromLocation` is an internal router option, not a Link prop: the Link
always builds from the location its match presents.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(vue-router): stop treating _fromLocation as a Link prop
`_fromLocation` is an internal router option, not a Link prop: the Link
always builds from the location its match presents.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(react-router): drop _fromLocation from the Link's option keys
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Tests written for #8602 that already pass on main: rewrites of Link tests
that asserted on a detached anchor after its route unmounted, and Link
destination tests for Solid, Vue and React (in-place store/reactive inputs,
inherited params, masks, frozen options, state-only navigations).
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(history): keep a leading query or fragment out of parseHref's pathname
parseHref compared the '?' and '#' indexes with '> 0', so an href that
starts with a query or fragment (reachable via hash history '/#?x=1'
or memory entries) kept it in the pathname as well, and the router
location became '?x=1?x=1'.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(history): read hash-history locations with indexOf/slice
Replace split('#').slice(1)/join('#') with one indexOf and two slices
when reading the hash-history location. Characterization tests from
#8351 cover nested fragments, encoded '#', and an empty hash.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(router-core,history): use slice where substring bounds are ordered
Every converted call has non-negative, ordered bounds (fixed offsets,
indexOf results within the same segment, or guarded by a '<' check).
extractParams' affix-stripping calls and the wildcard-tail suffix in
parseSegments keep substring: their bounds can cross.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(router-core,history): drop a duplicated flag and a createHref wrapper
buildLocation's currentMatch now reads the location through current(),
which already marks the build as location-dependent. Browser history
passes its createHref directly; createHistory already wraps it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* test(react-router): cover cached link selector reruns
* test(react-router): type configurable trailing slash fixture
* test(react-router): use type import in selector benchmark
* test(react-router): benchmark inactive dynamic destinations
* perf(react-router): reuse link selector results
* perf(react-router): resolve external links once per selector
* perf(react-router): shrink link state classification
* perf(react-router): shrink external link expression
* perf(react-router): shrink link state classification [Self-Healing CI Rerun]
* test(react-router): address link selector review cleanup
---------
Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com>
* perf(router,start): update Seroval to 1.6.6
* perf(router,start): update Seroval to 1.6.7
* chore: update seroval to 1.6.7
seroval and seroval-plugins were pinned to ^1.6.2 while 1.6.7 is the
current release. The type surface is additive: two new options
(maxBase64Length, compactArrayBufferViews) and an isStream export.
Bundle (gzip): router-only scenarios unchanged; Start client bundles
grow 532-642 bytes from the upstream typed array and base64 handling.
react-start.minimal 98504 -> 99039 (+535).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>