Update dependency react-router to v7.13.2#25318
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #25318 +/- ##
==========================================
- Coverage 73.20% 73.20% -0.01%
==========================================
Files 1531 1531
Lines 121805 121805
Branches 14699 14699
==========================================
- Hits 89166 89162 -4
- Misses 31624 31626 +2
- Partials 1015 1017 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
36aabc0 to
0383050
Compare
e938390 to
3c3bd7e
Compare
3c3bd7e to
5879b13
Compare
|
|
Closing to reduce CI pressure. Renovate will recreate when there is capacity (branchConcurrentLimit=20). |
Renovate Ignore NotificationBecause you closed this PR without merging, Renovate will ignore this update ( If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR. |



This PR contains the following updates:
7.9.4→7.13.2Release Notes
remix-run/react-router (react-router)
v7.13.2Compare Source
Patch Changes
Fix clientLoader.hydrate when an ancestor route is also hydrating a clientLoader (#14835)
Fix type error when passing Framework Mode route components using
Route.ComponentPropstocreateRoutesStub(#14892)Fix percent encoding in relative path navigation (#14786)
Add
future.unstable_passThroughRequestsflag (#14775)By default, React Router normalizes the
request.urlpassed to yourloader,action, andmiddlewarefunctions by removing React Router's internal implementation details (.datasuffixes,index+_routesquery params).Enabling this flag removes that normalization and passes the raw HTTP
requestinstance to your handlers. This provides a few benefits:new Request()calls on the critical path.datasuffix (useful for observability purposes)If you were previously relying on the normalization of
request.url, you can switch to use the new siblingunstable_urlparameter which contains aURLinstance representing the normalized location:Internal refactor to consolidate framework-agnostic/React-specific route type layers - no public API changes (#14765)
Sync protocol validation to rsc flows (#14882)
Add a new
unstable_url: URLparameter to route handler methods (loader,action,middleware, etc.) representing the normalized URL the application is navigating to or fetching, with React Router implementation details removed (.datasuffix,index/_routesquery params) (#14775)This is being added alongside the new
future.unstable_passthroughRequestsfuture flag so that users still have a way to access the normalized URL when that flag is enabled and non-normalizedrequest's are being passed to your handlers. When adopting this flag, you will only need to start leveraging this new parameter if you are relying on the normalization ofrequest.urlin your application code.If you don't have the flag enabled, then
unstable_urlwill matchrequest.url.v7.13.1Compare Source
Patch Changes
fix null reference exception in bad codepath leading to invalid route tree comparisons (#14780)
fix: clear timeout when turbo-stream encoding completes (#14810)
Improve error message when Origin header is invalid (#14743)
Fix matchPath optional params matching without a "/" separator. (#14689)
add RSC unstable_getRequest (#14758)
Fix
HydrateFallbackrendering during initial lazy route discovery with matching splat route (#14740)[UNSTABLE] Add support for
<Link unstable_mask>in Data Mode which allows users to navigate to a URL in the router but "mask" the URL displayed in the browser. This is useful for contextual routing usages such as displaying an image in a model on top of a gallery, but displaying a browser URL directly to the image that can be shared and loaded without the contextual gallery in the background. (#14716)Notes:
useLocation().unstable_maskso you can detect whether you are currently masked or not.history.stateduring SSR.backgroundLocationmanagement.RSC: Update failed origin checks to return a 400 status and appropriate UI instead of a generic 500 (#14755)
Preserve query parameters and hash on manifest version mismatch reload (#14813)
v7.13.0Compare Source
Minor Changes
crossOriginprop toLinkscomponent (#14687)Patch Changes
allowedActionOriginsglob check so**matches all domains (#14722)v7.12.0Compare Source
Minor Changes
react-router.config.tsconfigallowedActionOriginsfield. (#14708)Patch Changes
Fix
generatePathwhen used with suffixed params (i.e., "/books/:id.json") (#14269)Export
UNSAFE_createMemoryHistoryandUNSAFE_createHashHistoryalongsideUNSAFE_createBrowserHistoryfor consistency. These are not intended to be used for new apps but intended to help apps usiongunstable_HistoryRoutermigrate from v6->v7 so they can adopt the newer APIs. (#14663)Escape HTML in scroll restoration keys (#14705)
Validate redirect locations (#14706)
[UNSTABLE] Pass
<Scripts nonce>value through to the underlyingimportmapscripttag when usingfuture.unstable_subResourceIntegrity(#14675)[UNSTABLE] Add a new
future.unstable_trailingSlashAwareDataRequestsflag to provide consistent behavior ofrequest.pathnameinsidemiddleware,loader, andactionfunctions on document and data requests when a trailing slash is present in the browser URL. (#14644)Currently, your HTTP and
requestpathnames would be as follows for/a/b/cand/a/b/c//a/b/crequestpathname`/a/b/c/a/b/c✅/a/b/c.data/a/b/c✅/a/b/c/requestpathname`/a/b/c//a/b/c/✅/a/b/c.data/a/b/cWith this flag enabled, these pathnames will be made consistent though a new
_.dataformat for client-side.datarequests:/a/b/crequestpathname`/a/b/c/a/b/c✅/a/b/c.data/a/b/c✅/a/b/c/requestpathname`/a/b/c//a/b/c/✅/a/b/c/_.data⬅️/a/b/c/✅This a bug fix but we are putting it behind an opt-in flag because it has the potential to be a "breaking bug fix" if you are relying on the URL format for any other application or caching logic.
Enabling this flag also changes the format of client side
.datarequests from/_root.datato/_.datawhen navigating to/to align with the new format. This does not impact therequestpathname which is still/in all cases.Preserve
clientLoader.hydrate=truewhen using<HydratedRouter unstable_instrumentations>(#14674)v7.11.0Compare Source
Minor Changes
<HydratedRouter onError>/<RouterProvider onError>(#14546)Patch Changes
add support for throwing redirect Response's at RSC render time (#14596)
Support for throwing
data()and Response from server component render phase. Response body is not serialized as async work is not allowed as error encoding phase. If you wish to transmit data to the boundary, throwdata()instead. (#14632)Fix
unstable_useTransitionsprop on<Router>component to permit omission for backewards compatibility (#14646)routeRSCServerRequestreplacefetchServerwithserverResponse(#14597)[UNSTABLE] Add a new
unstable_defaultShouldRevalidateflag to various APIs to allow opt-ing out of standard revalidation behaviors. (#14542)If active routes include a
shouldRevalidatefunction, then your value will be passed asdefaultShouldRevalidatein those function so that the route always has the final revalidation determination.<Form method="post" unstable_defaultShouldRevalidate={false}>submit(data, { method: "post", unstable_defaultShouldRevalidate: false })<fetcher.Form method="post" unstable_defaultShouldRevalidate={false}>fetcher.submit(data, { method: "post", unstable_defaultShouldRevalidate: false })This is also available on non-submission APIs that may trigger revalidations due to changing search params:
<Link to="/" unstable_defaultShouldRevalidate={false}>navigate("/?foo=bar", { unstable_defaultShouldRevalidate: false })setSearchParams(params, { unstable_defaultShouldRevalidate: false })Allow redirects to be returned from client side middleware (#14598)
Handle
dataStrategyimplementations that return insufficient result sets by adding errors for routes without any available result (#14627)v7.10.1Compare Source
Patch Changes
useOptimisticstub we provide for React 18 users to use a stable setter function to avoid potentialuseEffectloops - specifically when using<Link viewTransition>(#14628)v7.10.0Compare Source
Minor Changes
Stabilize
fetcher.reset()(#14545)fetcher.unstable_reset()Stabilize the
dataStrategymatch.shouldRevalidateArgs/match.shouldCallHandler()APIs. (#14592)The
match.shouldLoadAPI is now marked deprecated in favor of these more powerful alternativesIf you're using this API in a custom
dataStrategytoday, you can swap to the new API at your convenience:match.shouldRevalidateArgsis the argument that will be passed to the routeshouldRevaliatefunctionCombined with the parameter accepted by
match.shouldCallHandler, you can define a custom revalidation behavior for yourdataStrategy:Patch Changes
Fix a Framework Mode bug where the
defaultShouldRevalidateparameter toshouldRevalidatewould not be correct afteractionreturned a 4xx/5xx response (truewhen it should have beenfalse) (#14592)shouldRevalidatefunction relied on that parameter, you may have seen unintended revalidationsFix
fetcher.submitfailing with plain objects containing atagNameproperty (#14534)[UNSTABLE] Add
unstable_patternto the parameters for client sideunstable_onError, refactor how it's called byRouterProviderto avoid potential strict mode issues (#14573)Add new
unstable_useTransitionsflag to routers to give users control over the usage ofReact.startTransitionandReact.useOptimistic. (#14524)<HydratedRouter unstable_transition>/<RouterProvider unstable_transition>React.startTransitionReact.startTransitiontrueif you run into this scenario to get the enhanceduseOptimisticbehavior (requires React 19)trueReact.startTransition(as they are without the flag)Link/Formnavigations will be wrapped inReact.startTransitionReact.useOptimistic(i.e.,useNavigation(),useFetchers(), etc.)falseReact.startTransitionorReact.useOptimisticon any navigations or state changes<BrowserRouter unstable_useTransitions>React.startTransitiontrueReact.startTransition(as they are without the flag)Link/Formnavigations will be wrapped inReact.startTransitionfalseReact.startTransitionon any navigations or state changesFix the promise returned from
useNavigatein Framework/Data Mode so that it properly tracks the duration ofpopstatenavigations (i.e.,navigate(-1)) (#14524)Fix internal type error in useRoute types that surfaces when skipLibCheck is disabled (#14577)
Preserve
statusTexton theErrorResponseinstance when throwingdata()from a route handler (#14555)Optimize href() to avoid backtracking regex on splat (#14329)
v7.9.6Compare Source
Patch Changes
[UNSTABLE] Add
location/paramsas arguments to client-sideunstable_onErrorto permit enhanced error reporting. (#14509)unstable_onError. The seconderrorInfoparameter is now an object withlocationandparams:Properly handle ancestor thrown middleware errors before
next()on fetcher submissions (#14517)Fix issue with splat routes interfering with multiple calls to patchRoutesOnNavigation (#14487)
Normalize double-slashes in
resolvePath(#14529)v7.9.5Compare Source
Patch Changes
Move RSCHydratedRouter and utils to
/domexport. (#14457)useRoute: return type-safe
handle(#14462)For example:
Ensure action handlers run for routes with middleware even if no loader is present (#14443)
Add
unstable_instrumentationsAPI to allow users to add observablity to their apps by instrumenting route loaders, actions, middlewares, lazy, as well as server-side request handlers and client side navigations/fetches (#14412)entry.server.tsx:export const unstable_instrumentations = [...]entry.client.tsx:<HydratedRouter unstable_instrumentations={[...]} />createBrowserRouter(routes, { unstable_instrumentations: [...] })This also adds a new
unstable_patternparameter to loaders/actions/middleware which contains the un-interpolated route pattern (i.e.,/blog/:slug) which is useful for aggregating performance metrics by routeConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - Only on Sunday and Saturday ( * * * * 0,6 ), Between 12:00 AM and 12:59 PM, only on Monday ( * 0-12 * * 1 ) in timezone Etc/UTC.
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.