Update tanstack-router monorepo #118
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MobiusReactor/TicTacToeV2!118
Loading…
Reference in a new issue
No description provided.
Delete branch "renovate/tanstack-router-monorepo"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
1.170.17→1.170.461.167.0→1.167.31.171.14→1.171.391.168.19→1.169.0Release Notes
TanStack/router (@tanstack/react-router)
v1.170.46Compare Source
Patch Changes
#8670
32a3360- Reference agent skills in other packages by theirintent loadidentifier (@tanstack/<package>#<skill>) instead of relative file links that break once packages are installed.#8671
689a7c5- Publish the@tanstack/react-routeragent skills (react-router,compositions/router-query,lifecycle/migrate-from-react-router), which were missing from the package'sfileslist.Updated dependencies [
32a3360]:v1.170.45Compare Source
Patch Changes
18154b1]:v1.170.44Compare Source
Patch Changes
d6ba115]:v1.170.43Compare Source
Patch Changes
94d6d8e]:v1.170.42Compare Source
Patch Changes
#8594
2413cc0- reduce component nesting per route match#8602
efc2042- Links of a route that the pending navigation leaves skip deriving the destination location, and clicks and preloads follow the href a Link displays.buildLocationnow buildsmaskandrouteMaskslocations from the same_fromLocationas the destination.#8602
efc2042- Fixed Link destinations that resolve to a route mask are now reused across navigations instead of being rebuilt every time. A mounted Link now follows changes to itshrefandreloadDocumentprops, and React Links no longer each subscribe to a hydration flag.#8579
d35aab4- Cancel pending link preload timers when starting navigation to avoid redundant preloading while the destination is loading.Updated dependencies [
dfe3dea,dfe3dea,dfe3dea,efc2042,efc2042,dfe3dea,663282b]:v1.170.41Compare Source
Patch Changes
#8529
60b8ad1- Compose only enabled route boundaries instead of rendering inactive wrapper components.#8568
614bc27- Update TanStack Store to 0.11.2 to prevent unrelated atom reads inside subscription observers from triggering extra notifications.#8530
ff66a03- Consolidate the root match context provider while preserving match context in the root shell.#8522
863c8a7- Reuse Link href classification and active/inactive results across location updates while preserving live history href formatting.Updated dependencies [
d521abd]:v1.170.40Compare Source
Patch Changes
#8436
f5ffd38- Skip unused Link preload cleanup when preloading is disabled and ignore queued viewport notifications after their effect has been cleaned up.Updated dependencies [
488d046,0c1b5e3,3cdd1af]:v1.170.39Compare Source
Patch Changes
73bfc15- Avoid hydration-triggered rerenders for links that do not compare URL hashes while preserving hash-sensitive active state and ClientOnly behavior.v1.170.38Compare Source
Patch Changes
cecae54,0103578,ce10dcd,84936cc,bbd2336]:v1.170.37Compare Source
Patch Changes
#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.#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.
#8420
8e164d2-useLinkPropsno longer calls through an internal wrapper. The host elementLinkrenders on is an@internaloverload parameter that is stripped from the published declarations, so the publicuseLinkProps(options, forwardedRef?)signature is unchanged.Updated dependencies [
bc80866,e561fa1,cbbfbe3,a1c8d1a,cbbfbe3,a0b2ad9,1ca361b]:v1.170.36Compare Source
Patch Changes
#8390
b747fb8- Keep the Link location cache out of server bundles:buildLocationonly creates, reads and writes it whenisServeris false. Render React Links on the server without the extra prop copies and the forwarded-ref hook. Link SSR rendering is 20-40% faster in the Link benchmarks and the React Start SSR request loop about 7% faster.React
activePropsandinactivePropsnow follow one precedence rule on every link, including links whose destination is blocked for using a disallowed scheme: state props override element props,refand event handlers, whilehref,disabledandtargetstay controlled by the router. Previously a blocked link ignored arefor handler from its inactive props.React
LinkanduseLinkPropssplit router options from element props with one key set on the client and the server. Element props pass through as given: external links forward them verbatim, falsy values included, anduseLinkPropsnow returnschildrenfor router-controlled links as it already did for external ones.#8324
6387d58- Reuse hydration snapshot getters to avoid unnecessary store-instance effect updates when Links and other hydration-aware components rerender.#8318
9b2adaf- Allow active and inactive Link props to override base element props in React and Solid while preserving class/style merging. Keep React'shref,target, anddisabledvalues controlled by routing options. Preserve Vue object and nested-array class bindings, including reactive updates and server rendering, without mutating cached bindings during VNode normalization.#8327
634da91- MakepathParamsAllowedCharactersinitialization-only. Configure it when creating the router; changing allowed characters requires a new router instance. Remove decoder-update bookkeeping and decoder-change checks from route-owned path caches.#8370
e9396c9- Stop exporting the internalisPlainObjectandisPlainArrayhelpers.#8324
6387d58- Avoid a redundant prop copy when rendering native Links while preserving custom-component props and the public hook result.#8252
7e349c3- Reduce the bundle cost of shared Link pathname interpolation while preserving its rendering performance. Reuse one interpolation pass for pathname and optional metadata, keep the bounded cache on the router, and simplify React Link active-state and prop merging.#8370
e9396c9- Reuse built locations for Links whose destination does not depend on the current location.buildLocationkeeps the result per options object when the build never read the current location, and the ReactLinkpasses one stable options object per instance, so navigations resolve unchanged Links with a lookup instead of a full build. The per-route pathname interpolation cache this replaces is removed. Linkparams,searchandactiveOptionsare compared by value on render, so inline object literals with unchanged contents keep reusing the Link's location. Pass a new object to change a destination; like any other React prop, an object mutated in place is not re-read.Updated dependencies [
d76a332,b747fb8,6cfb1e8,700a714,700a714,8fff7fa,f021f6d,ae68535,7e349c3,873c830,7e349c3,634da91,e9396c9,634da91,f151ab0,bc57fa3,9872d2a,d76a332,634da91,634da91,7e349c3,9448caa,e9396c9,700a714,634da91,634da91]:v1.170.35Compare Source
Patch Changes
8c43c71- Upgrade TanStack Store to 0.11 and migrate router subscriptions to useSelector, preserving selector comparisons and Vue subscription cleanup.v1.170.34Compare Source
Patch Changes
#8279
aee42c6- Avoid allocating event-handler arrays and wrapper functions for links without user-supplied event handlers.#8308
9c1871c- Validate navigation and redirect destinations, keep ambiguous relative URLs on the current origin, and constrain prerender requests and output paths. Prevent redirect headers from appearing in serialized server function response bodies.Preserve native form HTTP redirects, route error handling and masks for document redirects, and per-navigation destinations for shared loader redirects. Avoid redundant origin parsing and reduce link styling and server-rendering work. Configured origins must already be normalized.
Keep blocked-link inactive props consistent during React hydration, honor explicit redirect Location headers before checking route options, and refresh Vue link state when destinations become internal. Reuse the protocol-relative URL check while parsing redirect schemes once.
Reduce React link bundle size by sharing pathname comparisons, state-prop selection, and element creation.
Share normalized pathname comparisons in Solid and Vue links to reduce bundle size.
#8311
9aec5a7- React Links resolve state props without temporary class-name arrays or unnecessary style copies.Updated dependencies [
f9836f1,9c1871c,9871c06,0654c0a]:v1.170.33Compare Source
Patch Changes
#8165
2f20c00- Exclude structural descendants below error and not-found boundaries from route lifecycle callbacks. Preserve lifecycle membership through invalidation, hydration, background reloads, and superseded navigation publication.#8209
28a5e45- Preserve falsy thrown values in React and Vue error boundaries. Type React and Vue boundary error components andonCatchcallbacks asunknown. Solid boundary errors remain typed asError; SSR now wraps non-Errorloader errors to match Solid’s native boundary behavior, preserving the original value incause. Router state and loaderonErrorvalues are unchanged.When upgrading React or Vue, narrow boundary errors (for example, with
error instanceof Error) before readingmessageorstack.ErrorComponentProps<TError>remains available for values narrowed to a specific error type. RouteonErrortypes are unchanged.#8161
f0b5eda- Retain successful not-found matches as terminal shared boundaries during client navigation, preserving route context while the destination loads.#8251
0497cae- Use URL.canParse for absolute URL checks in links, navigation, redirects, and build configuration. Preserve a URL constructor fallback for older browsers.#8169
0caf6b9- Fix route-scopeduseMatch,useSearch, anduseParamsAPIs to forward theshouldThrowoption and preserve optional return types whenshouldThrow: false.#8257
cf166d1- Fix repeatedinnerHTMLwrites for unchanged styles and data scripts during React re-renders. This prevents unnecessary CSS parsing and Trusted Types errors during client navigation.Updated dependencies [
edf0e16,2f20c00,28a5e45,08eff50,216c0c4,2f91503,f0b5eda,50eafca,0497cae,ee28348,9035abc,c18e690]:v1.170.32Compare Source
Patch Changes
#8130
cb281d7- preserve context during reloadsUpdated dependencies [
fa65287,cb281d7]:v1.170.31Compare Source
Patch Changes
3e016ac]:v1.170.30Compare Source
Patch Changes
#8084
5d3785d- preserve pending UI across retained routes#8068
f75cada- direct export of CatchBoundary class component, remove function wrapperUpdated dependencies [
5d3785d,63d2cc9]:v1.170.29Compare Source
Patch Changes
#8073
0fdf9ff- inline isCtrlKey inside Link component for byte shavingUpdated dependencies [
4c89b15,cf6ab17,bdaf73a]:v1.170.28Compare Source
Patch Changes
#8055
0c25a7b- Avoid wrapping root components that may render the HTML document in a Suspense boundary during SSR and hydration.#8054
31882c7- Reuse resolved lazy route components when revisiting code-split routes, preventing unnecessary pending UI.Updated dependencies [
31882c7]:v1.170.27Compare Source
Patch Changes
b0817f5- useMatchRoute w/ React Compilerv1.170.26Compare Source
Patch Changes
#8045
f500760- Warn when an Outlet is rendered inside a pending, error, or not-found component.#8043
1aafca9- remove the undocumented LinkisTransitioningstate anddata-transitioningattribute#8044
aa10b65- ApplypreloadDelayto viewport link preloading and cancel pending preloads when links leave the viewport.Updated dependencies [
7e93431]:v1.170.25Compare Source
Patch Changes
51138a8]:v1.170.24Compare Source
Patch Changes
44a8c3e,5253e70]:v1.170.23Compare Source
Patch Changes
95dec51- bail out ofLinkre-renders when the resolved href and active state are unchangedv1.170.22Compare Source
Patch Changes
#7992
ea3a665- retain mounted UI during revalidationUpdated dependencies [
ea3a665]:v1.170.21Compare Source
Patch Changes
#7961
697ebb6- Prevent a blank frame before zero-delay initial pending UI by using acomponent-scoped React transition for match publication. Pending timing,
boundary selection, and rendered matches continue to come from the router
core.
#7970
2435885- createFileRoute does not rely on FileRoute class#7971
86bf510- clean intersection observer options in link component#7967
6aefb33- Preserve path params in their raw string form while matching routes so structured values returned byparams.parseproduce stable match IDs and do not reuse stale loader data.RouterCore.getMatchedRoutes()now returns[matchedRoutes, rawParams, foundRoute]instead of an object.Updated dependencies [
84db4a8,9cac62a,6aefb33]:v1.170.20Compare Source
Patch Changes
b2908c6]:v1.170.19Compare Source
Patch Changes
#7805
45c4ad8- Rewrite match loading around a lane-based scheduler that tracks each navigation, preload, and background reload as an ordered unit of work. This fixes pending/redirect/retry state leaking between overlapping navigations, restores correct SSR status codes for redirects, errors, and not-found responses, and closes hydration gaps where the client re-ran work the server had already completed.headers()now only runs on the server, matching the documented behavior — it is no longer invoked during client-side asset projection.gcTimeandpreloadGcTimenow match the existing runtime default of 5 minutes (300_000).Removed / changed exported internals
RouterStateno longer includesloadedAt,isTransitioning,statusCode, orredirect. Usematch.updatedAtin place ofloadedAt; subscribe torouter.state.status/router.state.isLoadingin place ofisTransitioning; server response status and redirect handling are now internal to the server loader and are no longer exposed onrouter.state.RouteMatch.fetchCounthas been removed, with no replacement — it was purely informational.RouteMatch.statusno longer includes'redirected'(it remains'pending' | 'success' | 'error' | 'notFound') — redirected matches are dropped from the match list instead of being rendered.RouteMatch.globalNotFoundhas been renamed and privatized to the internal_notFoundfield. Usematch.status === 'notFound'instead.Matchcomponents now acceptrouteIdinstead ofmatchId.RouterStoresadapter contract now uses route-keyed presentation stores:matchesIdis replaced byids,matchStoresbybyRoute, andgetRouteMatchStore()bygetMatchStore(). The separateloadedAt,isLoading,isTransitioning,statusCode, andredirectstores have been removed, along with the pending/cache stores and their setters.StoreConfig.inithas also been removed. Read application-facing state fromrouter.state; preload and cache coordination are now internal.RouterCoremembersgetMatch(),updateMatch(),cancelMatch(), andcancelMatches()— read matches fromrouter.state.matches(e.g.router.state.matches.find((m) => m.id === id)); there is no replacement for mutating or cancelling an individual in-flight match from outside the router.RouterCore.hasNotFoundMatch()— userouter.state.matches.some((m) => m.status === 'notFound').RouterCore.looseRoutesById— useroutesById.RouterCore.isPrerendering(),RouterCore.isViewTransitionTypesSupported, andRouterCore.viewTransitionPromise, with no replacement.RouterCore.getParsedLocationHref()andRouterCore.clearExpiredCache(), with no replacement — expired cache entries are now reconciled automatically as part of match commit.RouterCore.latestLoadPromiseandRouterCore.beforeLoad(), with no replacement.RouterCore.commitLocationPromiseandRouterCore.pendingBuiltLocationhave been replaced by the internal_commitPromiseand_pendingLocationfields.GetMatchFnandUpdateMatchFntypes, along with the methods they typed.getMatchedRoutes()export from@tanstack/router-core— use therouter.getMatchedRoutes()instance method instead.RouterCore.loadRouteChunk()no longer accepts an array of component types as its second argument. One-argument usage is unchanged; the optional second argument is now'errorComponent','notFoundComponent', orfalsefor internal boundary loading.Redirect.redirectHandled, which was internal redirect bookkeeping.MatchRoutesOpts.preloadandMatchRoutesOpts.desthave been removed.StartTransitionFnis now(fn, expected) => Promise<boolean>(previously(fn) => void). This only affects custom framework adapters that implementstartTransition.Updated dependencies [
45c4ad8]:v1.170.18Compare Source
Patch Changes
e2dd204]:TanStack/router (@tanstack/react-router-devtools)
v1.167.3Compare Source
Patch Changes
bbf9b75]:v1.167.2Compare Source
Patch Changes
d76a332,b747fb8,6cfb1e8,700a714,700a714,6387d58,7e349c3,9b2adaf,873c830,7e349c3,634da91,e9396c9,634da91,f151ab0,bc57fa3,6387d58,9872d2a,d76a332,634da91,634da91,7e349c3,9448caa,e9396c9,700a714,634da91,634da91]:v1.167.1Compare Source
Patch Changes
45c4ad8]:TanStack/router (@tanstack/router-core)
v1.171.39Compare Source
Patch Changes
32a3360- Reference agent skills in other packages by theirintent loadidentifier (@tanstack/<package>#<skill>) instead of relative file links that break once packages are installed.v1.171.38Compare Source
Patch Changes
18154b1- Render generated script preloads (modulepreload, orpreload as="script"for IIFE output) withfetchPriority="low"and forward it into static Early Hints, so they no longer compete with render-blocking stylesheets, fonts and images.v1.171.37Compare Source
Patch Changes
d6ba115- Reuse the parsed request location during SSR instead of repeating input rewrites. Match server routes against the app router's parsed pathname while preserving encoded pathnames for server handlers and middleware.v1.171.36Compare Source
Patch Changes
94d6d8e- Reduce per-request work in Start:getNormalizedURLreads aURLinput without cloning it, andrunWithStartContextreturns the callback's own result instead of wrapping it in a promise, so a synchronous throw from the callback now propagates synchronously.v1.171.35Compare Source
Patch Changes
#8605
dfe3dea- Drop a duplicated current-location flag and a redundantcreateHrefwrapper.#8602
efc2042- Links of a route that the pending navigation leaves skip deriving the destination location, and clicks and preloads follow the href a Link displays.buildLocationnow buildsmaskandrouteMaskslocations from the same_fromLocationas the destination.#8602
efc2042- Fixed Link destinations that resolve to a route mask are now reused across navigations instead of being rebuilt every time. A mounted Link now follows changes to itshrefandreloadDocumentprops, and React Links no longer each subscribe to a hydration flag.#8605
dfe3dea- Usesliceinstead ofsubstringwhere the bounds are always ordered and non-negative.#7654
663282b- Encode slashes in dehydrated SSR match IDs with#instead of a null byte, so the inlined hydration payload no longer contains U+0000 (which is invalid in HTML and rejected by markup validators)Updated dependencies [
dfe3dea,dfe3dea,dfe3dea,efc2042,dfe3dea]:v1.171.34Compare Source
Patch Changes
d521abd- Align server function request and response handling.v1.171.33Compare Source
Patch Changes
#8297
488d046- Updateserovalandseroval-pluginsfrom 1.6.2 to 1.6.7. This picks up the typed array length guard, themaxBase64LengthandcompactArrayBufferViewsoptions, and theisStreamexport.#8460
0c1b5e3- Abort reserved loader generations with no remaining owners when invalidation removes them from discovery, ensuring their public abort signals are retired.#8519
3cdd1af- Hand native scroll restoration back to the browser on pagehide, including entries entering BFCache, and reclaim manual restoration when a cached document resumes.v1.171.32Compare Source
Patch Changes
#8363
cecae54- Detect plain objects by constructor instead ofObject.prototype.toStringdispatches inisPlainObject, which gates everydeepEqualandreplaceEqualDeeprecursion step. Object literals,JSON.parseoutput and null-prototype objects are still plain; objects from another realm no longer are. Records with an ownconstructorkey (for example the search params of?constructor=foo) fall back to a prototype check, so they keep structural sharing while class instances stay opaque.#8364
0103578- Compare and copy plain objects inreplaceEqualDeepby their string keys only, skipping the symbol-key lookup that dominated key enumeration. Objects with non-enumerable own properties, or symbol keys on the incoming value, now pass through untouched instead of being structurally shared.#8411
ce10dcd- Reduce structural-sharing allocations by reusing array key storage and returning incoming objects when their children need no replacements. Preserve signed zero consistently, remove stale symbol properties, and keep sparse arrays with extra keys and built-ins with an ownconstructoropaque.Null-prototype mode now applies only when constructing a copy; existing incoming objects can be reused with their original prototype.
#8362
84936cc- Allocate thereplaceEqualDeepresult only at the first difference, so structural sharing of search, params, state and loader data no longer allocates when the new value is deeply equal to the previous one.#8389
bbd2336- SplitreplaceEqualDeepinto an equality scan and a copy phase: arrays and objects are scanned by dedicated loops up to the first difference, matching keys prove ownership without ahasOwnPropertylookup, and once a difference is found the result is built without any further equality bookkeeping. Deeply equal search, params, state and loader data are recognised faster and changed values are copied with less work per entry.v1.171.31Compare Source
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.v1.171.30Compare Source
Patch Changes
#8321
d76a332- Cache route branches and interpolated paths on their route objects, removing the fixed template limit for registered routes and reusing cached paths across server requests. Rebuild tree-dependent caches together, preserve decoder and trailing-slash isolation, and keep unregistered templates bounded.#8390
b747fb8- Keep the Link location cache out of server bundles:buildLocationonly creates, reads and writes it whenisServeris false. Render React Links on the server without the extra prop copies and the forwarded-ref hook. Link SSR rendering is 20-40% faster in the Link benchmarks and the React Start SSR request loop about 7% faster.React
activePropsandinactivePropsnow follow one precedence rule on every link, including links whose destination is blocked for using a disallowed scheme: state props override element props,refand event handlers, whilehref,disabledandtargetstay controlled by the router. Previously a blocked link ignored arefor handler from its inactive props.React
LinkanduseLinkPropssplit router options from element props with one key set on the client and the server. Element props pass through as given: external links forward them verbatim, falsy values included, anduseLinkPropsnow returnschildrenfor router-controlled links as it already did for external ones.#8382
6cfb1e8-buildLocationno longer structurally shares the builtsearchandstatewith the current location. The observablelocation.searchandlocation.statestill preserve equal nested references across navigations, becauseparseLocationstabilizes them once a location is committed. A search whose contents equal the current search but list its keys in a different order now serializes in the requested order, so navigating to it creates a new history entry instead of being treated as the same location. Astateobject passed tonavigateorbuildLocationis never mutated.#8325
700a714- Reuse the already-owned raw-param snapshot during lightweight source matching instead of copying it again.#8325
700a714- Reduce transient JIT compilation memory during navigation by separating search middleware collection from recursive execution.#8252
7e349c3- Collect shared pathname-cache keys during interpolation instead of parsing templates twice, and share dynamic-segment handling to reduce bundle size.#8319
873c830- Simplify path interpolation into ordered segment-type blocks with shared prefix/value/suffix assembly. Preserve one-pass parsing and optional metadata collection, and reuse the public result object instead of allocating and clearing a missing-parameter callback.#8252
7e349c3- Reuse pathname interpolation across Links with bounded router-scoped caches. Keep parameter callbacks and navigation state independent of the cache.#8327
634da91- MakepathParamsAllowedCharactersinitialization-only. Configure it when creating the router; changing allowed characters requires a new router instance. Remove decoder-update bookkeeping and decoder-change checks from route-owned path caches.#8370
e9396c9- Stop exporting the internalisPlainObjectandisPlainArrayhelpers.#8327
634da91- Initialize routes directly during route-tree processing, removing the callback indirection while preserving parent-first initialization and route indexes.#8328
f151ab0- Reduce duplication in navigation parameter handling while preserving parameter inheritance, null-prototype dictionaries, and updater isolation.#8410
bc57fa3- Treat0andfalseas provided_splatvalues when interpolating paths. Onlyundefined,null, and''now omit a splat segment, matching how other path params are stringified.#8354
9872d2a- Use lightweight request history for SSR and make server navigation a no-op. Use redirect() to issue HTTP redirects. Server hrefs use the same normalization as browser history to handle protocol-relative URLs and control characters.#8321
d76a332- Consolidate internal path interpolation intointerpolatePath, returning a pathname directly and collecting metadata only when requested. Update router and devtools callers without changing route parsing or interpolation caching.#8327
634da91- Reduce route-tree initialization work by avoiding temporary path-joining arrays and duplicate ID normalization.#8327
634da91- Reuse parsed route segments when generating paths for navigation, Links, and Devtools. Preserve interpolation metadata and refresh segments when the route tree is rebuilt, without reparsing templates for new parameter values.#8252
7e349c3- Reduce the bundle cost of shared Link pathname interpolation while preserving its rendering performance. Reuse one interpolation pass for pathname and optional metadata, keep the bounded cache on the router, and simplify React Link active-state and prop merging.#8385
9448caa- Collect search middlewares with a counted loop so the optimized code stays valid across navigations. This removes a JIT recompilation that raised peak memory in the interrupted-navigations client memory benchmark.#8370
e9396c9- Reuse built locations for Links whose destination does not depend on the current location.buildLocationkeeps the result per options object when the build never read the current location, and the ReactLinkpasses one stable options object per instance, so navigations resolve unchanged Links with a lookup instead of a full build. The per-route pathname interpolation cache this replaces is removed. Linkparams,searchandactiveOptionsare compared by value on render, so inline object literals with unchanged contents keep reusing the Link's location. Pass a new object to change a destination; like any other React prop, an object mutated in place is not re-read.#8325
700a714- Cache normalized route pathnames so repeated Link destinations do not decode the same interpolation result again.#8327
634da91- Share compact parsed route segments between matching and interpolation, preserve original parameter names, and avoid reparsing templates while building paths. Simplify route-tree traversal, reuse existing path helpers, and keep Devtools-only navigation validation out of the production formatter. Preserve dynamic match identity for standalone legacy fallback routes.#8327
634da91- Pass route initialization indexes directly instead of wrapping each index in an options object.Updated dependencies [
8fff7fa,f021f6d,ae68535,9872d2a]:v1.171.29Compare Source
Patch Changes
#8313
f9836f1- Avoid constructing a query serializer when search is empty or all values are undefined.#8308
9c1871c- Validate navigation and redirect destinations, keep ambiguous relative URLs on the current origin, and constrain prerender requests and output paths. Prevent redirect headers from appearing in serialized server function response bodies.Preserve native form HTTP redirects, route error handling and masks for document redirects, and per-navigation destinations for shared loader redirects. Avoid redundant origin parsing and reduce link styling and server-rendering work. Configured origins must already be normalized.
Keep blocked-link inactive props consistent during React hydration, honor explicit redirect Location headers before checking route options, and refresh Vue link state when destinations become internal. Reuse the protocol-relative URL check while parsing redirect schemes once.
Reduce React link bundle size by sharing pathname comparisons, state-prop selection, and element creation.
Share normalized pathname comparisons in Solid and Vue links to reduce bundle size.
#8288
9871c06- Reduce cache maintenance work during navigation by indexing incoming match IDs once per commit.#8287
0654c0a- Use full-document navigation when an output rewrite produces a cross-origin destination, including the public URL of a route mask.Respect registered history blockers during document navigation, passing history locations and the requested push or replace action.
Updated dependencies [
9c1871c,0654c0a]:v1.171.28Compare Source
Patch Changes
#8222
edf0e16- Make each load transaction's completion follow its current successor so a burst of back-to-back loads wakes each superseded waiter once instead of once per successor. Previously every supersededload()re-polled the current transaction on each later completion, which was quadratic in microtask work.#8165
2f20c00- Exclude structural descendants below error and not-found boundaries from route lifecycle callbacks. Preserve lifecycle membership through invalidation, hydration, background reloads, and superseded navigation publication.#8209
28a5e45- Preserve falsy thrown values in React and Vue error boundaries. Type React and Vue boundary error components andonCatchcallbacks asunknown. Solid boundary errors remain typed asError; SSR now wraps non-Errorloader errors to match Solid’s native boundary behavior, preserving the original value incause. Router state and loaderonErrorvalues are unchanged.When upgrading React or Vue, narrow boundary errors (for example, with
error instanceof Error) before readingmessageorstack.ErrorComponentProps<TError>remains available for values narrowed to a specific error type. RouteonErrortypes are unchanged.#8207
08eff50- Fix consumer typechecking withskipLibCheck: falseby omitting the internal beforeLoad context field from published dehydrated match declarations.Retain the exported
isAbsoluteUrldeclaration used by framework bindings so the package entry point does not reference a stripped symbol.#8259
216c0c4- Reduce Promise allocations during client navigation and static server SSR policy resolution. Skip cancellable waits for synchronous beforeLoad results while preserving navigation cancellation.#8240
2f91503- Avoid quadratic resource handoff scans when navigating with many cached route matches.#8161
f0b5eda- Retain successful not-found matches as terminal shared boundaries during client navigation, preserving route context while the destination loads.#8142
50eafca- Avoid unnecessary JSON.parse calls for search parameter values that cannot begin valid JSON, while preserving custom parser behavior.#8251
0497cae- Use URL.canParse for absolute URL checks in links, navigation, redirects, and build configuration. Preserve a URL constructor fallback for older browsers.#8230
ee28348- Replace the internal LRU cache behind path resolution, route matching and the SSR manifest lookup with a smaller SIEVE cache whose hits no longer relink a list, and fix an eviction edge case in the old implementation.#8244
c18e690- Reduce promise allocations during client navigation when loader data and route components are already available.Updated dependencies [
9035abc]:v1.171.27Compare Source
Patch Changes
#8132
fa65287- Build client preload locations on demand and remove the prebuilt-location argument used by framework links.#8130
cb281d7- preserve context during reloadsv1.171.26Compare Source
Patch Changes
3e016ac- optimize buildLocation path resolution #8108skip building search validation when disabled #8112
skip location state sharing when impossible #8110
fix cache hits for mask resolution when entry is null #8111
v1.171.25Compare Source
Patch Changes
#8084
5d3785d- preserve pending UI across retained routes#8092
63d2cc9- Render route errors when redirect target construction fails and let successor transactions own navigation and HMR presentation.v1.171.24Compare Source
Patch Changes
#8071
4c89b15- inline getOpenAndCloseBraces in parseSegment for byte shaving#8069
cf6ab17- inline isFunction utility fn for byte shaving#8070
bdaf73a- inline buildWithMatches inside buildLocation for byte shavingv1.171.23Compare Source
Patch Changes
31882c7- Reuse resolved lazy route components when revisiting code-split routes, preventing unnecessary pending UI.v1.171.22Compare Source
Patch Changes
7e93431- load-client can cache settles abandonned loader work without preload authorityv1.171.21Compare Source
Patch Changes
51138a8- handle excessive parent relative linksv1.171.20Compare Source
Patch Changes
#8006
44a8c3e- skip impossible JSON parse attempts#8010
5253e70- perf: speed up structural sharing (replaceEqualDeep) by computing enumerable own keys withObject.keys+ a length compare instead ofgetOwnPropertyNamesfollowed by apropertyIsEnumerablecall per key. This runs on every selector result on every state update whendefaultStructuralSharingis enabled, and is ~1.3-1.5x faster on typical router state objects with identical behavior.v1.171.19Compare Source
Patch Changes
ea3a665- retain mounted UI during revalidationv1.171.18Compare Source
Patch Changes
#7984
84db4a8- Improve route-tree construction and matching performance by fusing static anddynamic node creation, sorting only dynamic sibling lists that need it, and
deriving matcher depth from trie nodes.
#7985
9cac62a- perf: compact private bundle boundaries- #7975#7967
6aefb33- Preserve path params in their raw string form while matching routes so structured values returned byparams.parseproduce stable match IDs and do not reuse stale loader data.RouterCore.getMatchedRoutes()now returns[matchedRoutes, rawParams, foundRoute]instead of an object.Updated dependencies [
9cac62a]:v1.171.17Compare Source
Patch Changes
b2908c6- Update Seroval dependencies to version 1.6.2.v1.171.16Compare Source
Patch Changes
#7805
45c4ad8- Rewrite match loading around a lane-based scheduler that tracks each navigation, preload, and background reload as an ordered unit of work. This fixes pending/redirect/retry state leaking between overlapping navigations, restores correct SSR status codes for redirects, errors, and not-found responses, and closes hydration gaps where the client re-ran work the server had already completed.headers()now only runs on the server, matching the documented behavior — it is no longer invoked during client-side asset projection.gcTimeandpreloadGcTimenow match the existing runtime default of 5 minutes (300_000).Removed / changed exported internals
RouterStateno longer includesloadedAt,isTransitioning,statusCode, orredirect. Usematch.updatedAtin place ofloadedAt; subscribe torouter.state.status/router.state.isLoadingin place ofisTransitioning; server response status and redirect handling are now internal to the server loader and are no longer exposed onrouter.state.RouteMatch.fetchCounthas been removed, with no replacement — it was purely informational.RouteMatch.statusno longer includes'redirected'(it remains'pending' | 'success' | 'error' | 'notFound') — redirected matches are dropped from the match list instead of being rendered.RouteMatch.globalNotFoundhas been renamed and privatized to the internal_notFoundfield. Usematch.status === 'notFound'instead.Matchcomponents now acceptrouteIdinstead ofmatchId.RouterStoresadapter contract now uses route-keyed presentation stores:matchesIdis replaced byids,matchStoresbybyRoute, andgetRouteMatchStore()bygetMatchStore(). The separateloadedAt,isLoading,isTransitioning,statusCode, andredirectstores have been removed, along with the pending/cache stores and their setters.StoreConfig.inithas also been removed. Read application-facing state fromrouter.state; preload and cache coordination are now internal.RouterCoremembersgetMatch(),updateMatch(),cancelMatch(), andcancelMatches()— read matches fromrouter.state.matches(e.g.router.state.matches.find((m) => m.id === id)); there is no replacement for mutating or cancelling an individual in-flight match from outside the router.RouterCore.hasNotFoundMatch()— userouter.state.matches.some((m) => m.status === 'notFound').RouterCore.looseRoutesById— useroutesById.RouterCore.isPrerendering(),RouterCore.isViewTransitionTypesSupported, andRouterCore.viewTransitionPromise, with no replacement.RouterCore.getParsedLocationHref()andRouterCore.clearExpiredCache(), with no replacement — expired cache entries are now reconciled automatically as part of match commit.RouterCore.latestLoadPromiseandRouterCore.beforeLoad(), with no replacement.RouterCore.commitLocationPromiseandRouterCore.pendingBuiltLocationhave been replaced by the internal_commitPromiseand_pendingLocationfields.GetMatchFnandUpdateMatchFntypes, along with the methods they typed.getMatchedRoutes()export from@tanstack/router-core— use therouter.getMatchedRoutes()instance method instead.RouterCore.loadRouteChunk()no longer accepts an array of component types as its second argument. One-argument usage is unchanged; the optional second argument is now'errorComponent','notFoundComponent', orfalsefor internal boundary loading.Redirect.redirectHandled, which was internal redirect bookkeeping.MatchRoutesOpts.preloadandMatchRoutesOpts.desthave been removed.StartTransitionFnis now(fn, expected) => Promise<boolean>(previously(fn) => void). This only affects custom framework adapters that implementstartTransition.v1.171.15Compare Source
Patch Changes
#7807
e2dd204- fix(router-core): handle window and element scroll restoration independentlyWindow and element scroll targets are now handled independently. Restoring one target no longer suppresses resets for other uncached configured targets, and a restored element is no longer reset when the window has no cached position.
Hash navigation no longer resets elements configured through
scrollToTopSelectorsand retains precedence over stale window positions through destination invalidations.Scroll positions are sampled when leaving a route, preserving live changes made after the most recent scroll event. This also prevents client hydration from undoing nested positions restored by the SSR script.
Fixes #7687.
TanStack/router (@tanstack/router-plugin)
v1.169.0Compare Source
Minor Changes
#8855
446ce1b- Require Node^20.19.0 || >=22.12.0(was>=20.19), so the CommonJS builds can load ESM-only dependencies throughrequire(esm). Node 21 and Node 22.0–22.11 do not enable it by default, so they are no longer supported.#8851
d250819- Require Vite 6 or later: thevitepeer range is now>=6.0.0. Vite 5 is no longer supported.Patch Changes
1ba19a0- fix: webpack and Rspack production builds no longer put the code splitter's "will not be code-split" warning, with the route file's absolute path, into the client bundle when the build process'sNODE_ENVisn'tproduction. The bundler's mode decides, and a config withoutmodecounts as production, as it does for webpack and Rspack. The warning still prints in the build output.#8852
94f36c4- The esbuild plugin now throws whenautoCodeSplittingis enabled, andTanStackRouterCodeSplitterEsbuildthrows, instead of silently bundling every route without splitting. Route generation with esbuild is unchanged.#8856
533ca27- Remove the undocumentedplugin.hmr.styleoption and theHmrOptionstype. Each bundler entry now picks its own HMR runtime: the webpack and Rspack entries already forced'webpack', and on Vite,'webpack'broke route HMR.#8853
13b6256- Remove internal code-splitter APIs: thecodeSplittingOptions.compilerPluginsoption, and the root-entry exportsunpluginRouterCodeSplitterFactory,getObjectPropertyKeyName,CodeSplitCompilerPlugin,ReferenceRouteCompilerPlugin,ReferenceRouteCompilerPluginContextandVirtualRouteSplitNodeCompilerPluginContext.#8860
b5e2ac9- Source maps of split routes now point at the route file. On webpack and Rspack (including Rsbuild), a split component or shared code mapped to the wrong line, because unplugin's loader dropped the router plugin's map;unpluginnow requires^3.5.0, which keeps it. The maps of split and shared modules also name the route file itself instead of its?tsr-split/?tsr-sharedmodule id, so debuggers bind breakpoints set in the route file.#8870
f420d4a- Vite route HMR now writesimport.meta.hot.accept(out instead of calling it through ahotalias. Vite only treats a module as a hot boundary when the call is spelled out, so an edit of a route file no framework plugin accepts (a.tsroute file, or an app without@vitejs/plugin-react) reloaded the page instead of updating the route in place. With React HMR, a route file that declares its own top-levelhotbinding no longer fails to compile withDuplicate declaration "hot".Updated dependencies [
446ce1b,ad5b3b7,ff157f0]:v1.168.48Compare Source
Patch Changes
#8670
32a3360- Reference agent skills in other packages by theirintent loadidentifier (@tanstack/<package>#<skill>) instead of relative file links that break once packages are installed.#8737
647cb73- Remove theenableRouteGenerationoption. Route generation now always runs, soautoCodeSplittingalways has the route metadata it needs.Updated dependencies [
32a3360,689a7c5]:v1.168.47Compare Source
Patch Changes
18154b1]:v1.168.46Compare Source
Patch Changes
923d98b]:v1.168.45Compare Source
Patch Changes
d6ba115]:v1.168.44Compare Source
Patch Changes
#8655
e66da18- Remove redundant string excludes from the reference code-splitter transform filter to avoid unnecessary glob compilation in unplugin bundler adapters.Updated dependencies [
57bd1a9,94d6d8e]:v1.168.43Compare Source
Patch Changes
dfe3dea,2413cc0,efc2042,efc2042,dfe3dea,d35aab4,663282b]:v1.168.42Compare Source
Patch Changes
60b8ad1,614bc27,d521abd,ff66a03,863c8a7]:v1.168.41Compare Source
Patch Changes
f5ffd38,488d046,0c1b5e3,3cdd1af]:v1.168.40Compare Source
Patch Changes
cecae54,0103578,ce10dcd,84936cc,bbd2336]:v1.168.39Compare Source
Patch Changes
bc80866,e561fa1,cbbfbe3,a1c8d1a,cbbfbe3,a0b2ad9,8e164d2,1ca361b]:v1.168.38Compare Source
Patch Changes
d76a332,b747fb8,6cfb1e8,700a714,700a714,6387d58,7e349c3,9b2adaf,873c830,7e349c3,634da91,e9396c9,634da91,f151ab0,bc57fa3,6387d58,9872d2a,d76a332,634da91,634da91,7e349c3,9448caa,e9396c9,700a714,634da91,634da91]:v1.168.37Compare Source
Patch Changes
#8300
49bcd4d- Refresh compatible build and runtime dependencies.Updated dependencies [
f9836f1,aee42c6,49bcd4d,9c1871c,9aec5a7,9871c06,0654c0a]:v1.168.36Compare Source
Patch Changes
edf0e16,2f20c00,28a5e45,08eff50,216c0c4,2f91503,f0b5eda,50eafca,0497cae,0caf6b9,ee28348,cf166d1,c18e690]:v1.168.35Compare Source
Patch Changes
fa65287,cb281d7]:v1.168.34Compare Source
Patch Changes
3e016ac]:v1.168.33Compare Source
Patch Changes
5d3785d,63d2cc9,f75cada]:v1.168.32Compare Source
Patch Changes
4c89b15,cf6ab17,0fdf9ff,bdaf73a]:v1.168.31Compare Source
Patch Changes
0c25a7b,31882c7]:v1.168.30Compare Source
Patch Changes
7e93431,f500760,1aafca9,aa10b65]:v1.168.29Compare Source
Patch Changes
51138a8]:v1.168.28Compare Source
Patch Changes
44a8c3e,5253e70]:v1.168.27Compare Source
Patch Changes
ea3a665]:v1.168.26Compare Source
Patch Changes
697ebb6,2435885,84db4a8,9cac62a,86bf510,6aefb33]:v1.168.25Compare Source
Patch Changes
b2908c6]:v1.168.24Compare Source
Patch Changes
45c4ad8]:v1.168.23Compare Source
Patch Changes
49f6863- Preserve React component state during HMR when route components are declared with lowercase function names. The development-only React transforms cover split route component groups and unsplit root route component options, including shell, pending, and error components, without changing production output.v1.168.22Compare Source
Patch Changes
78dd1a6]:v1.168.21Compare Source
Patch Changes
e56a677]:v1.168.20Compare Source
Patch Changes
e2dd204]:Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR has been generated by Mend Renovate CLI.
be6a3f466etoe9d205d62be9d205d62btob4ce1c4c68b4ce1c4c68toc8afd4978ec8afd4978eto7645db3a907645db3a90to42bb7bbb1f42bb7bbb1ftoee068592f8ee068592f8toc61249c230c61249c230to75f711ca7375f711ca73to814fddafa9814fddafa9tocecd349928cecd349928toc2992d0196c2992d0196to2069f6c7fe2069f6c7fetoe5faa53316e5faa53316toce55114b5ace55114b5atoc2c0edde39c2c0edde39tof54c5ff743f54c5ff743to8f44720b7c8f44720b7cto7f488d48a67f488d48a6to6dba36dede6dba36dedetof4b38d0a87f4b38d0a87to97834ccfc497834ccfc4to2e9e932e2e2e9e932e2eto8d68cc4168View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.