Patch Changes
-
#8417
bc80866- Speed updeepEqual: identical array elements no longer recurse, the exact comparison keeps a single key counter, and the redundanttypeofearly exit is gone. Equal numeric arrays compare ~70% faster and record comparisons 5–12% faster in the mixed-mode workloads that Link option stabilization and active-state checks produce, with a slightly smaller bundle. Behavior, including key enumeration and getter read order, is unchanged. -
#8418
e561fa1-deepEqualnow takes its flags as positional arguments —deepEqual(a, b, partial?, explicitUndefined?)— instead of an options object. The router's hot callers (Link option stabilization and active-state checks,matchRoute) no longer allocate an options object per comparison, and the comparator reads two booleans instead of a polymorphic object.explicitUndefinedreplacesignoreUndefined: false.deepEqualis an internal helper; it stays exported for compatibility of two-argument calls. -
#8204
cbbfbe3- Reduce per-request SSR overhead: abort settled route matches with one sharedAbortError-shaped reason instead of building a stack-capturingDOMExceptionper match, skipJSON.parsefor search values that cannot start JSON, wait on request signals with one listener per wait, and keep resolved server-function modules in production builds instead of re-importing them on every call. -
#8419
a1c8d1a-resolvePath(internal helper) now takes positional arguments —resolvePath(base, to, trailingSlash?, cache?)— sobuildLocationandmatchRouteno longer allocate an options object per path resolution. -
#8204
cbbfbe3- Stream large deferred SSR hydration payloads through a backpressure-aware router transport, fail known setup errors before response creation, and close cancelled or expired transforms safely.Start now cancels discarded middleware and HEAD response bodies, including plain streams and derived branches.
Server-function raw streams share one ordered response. Arbitrary or sequential consumption can require potentially unbounded buffering of unread data on the client. Cancelling one raw stream discards it locally, while aborting the whole call cancels the response and server work. Consume streams concurrently, cancel unused streams promptly, or use separate calls when independent backpressure is required. A raw stream that exceeds its unread-byte limit now fails alone; sibling streams and the JSON result keep flowing.
The JSON wire shape of a
RawStreamserver-function argument changed. Clients and servers must run matching versions for requests that pass aRawStream.The frame-protocol constants (
FRAME_TYPE_*,MAX_FRAME_PAYLOAD_SIZE,MAX_FRAMED_STREAMS) moved from the@tanstack/start-client-coreroot to the@tanstack/start-client-core/client-rpcsubpath.Router requests whose
Acceptheader allows neithertext/htmlnor*/*now receive406 Not Acceptableinstead of500.Framework adapters share the body
<Scripts>composition (getSsrBodyScriptParts,composeSsrBodyScripts) and the eager HTML response wrapper (renderSsrHtmlResponse) from@tanstack/router-core.Solid SSR now emits one document type and renders late lazy errors through route boundaries. A Solid
<Await>without afallbackno longer holds the streamed shell; it renders inside the nearest<Suspense>boundary like React and Vue, and now renders falsy resolved values.Static server functions decode cached
RawStreamvalues with the client deserializer plugins.SSR Query integrations now keep request cleanup and stream ownership aligned with the router lifecycle.
-
#8422
a0b2ad9- Parse the location once whenrouter.update()changes the basepath or rewrite, collectinvalidate()match ids in a single pass, and specialize internal basepath composition without arrays or loops. Preserve basepath case sensitivity when creating and updating the router.Rebuild server route trees when
caseSensitivechanges and reuse the server cache only when the route tree and case sensitivity both match. -
#8421
1ca361b- Parse masked locations without mutating shared state and simplify input rewrite handling.