chore(deps): Update dependency react-router to v8 #71
No reviewers
Labels
No labels
dependencies
major
security-pin
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
trails-cool/trails!71
Loading…
Reference in a new issue
No description provided.
Delete branch "renovate/react-router-8.x"
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:
^7.18.2→^8.0.0Release Notes
remix-run/react-router (react-router)
v8.3.0Compare Source
Patch Changes
href/generatePathper RFC 3986 path-segment rules instead ofencodeURIComponent(#15310)$ & + , ; = : @​— RFC 3986pchar) are no longer percent-encoded, so values like a semver build1.0.0+1interpolate unchanged instead of becoming1.0.0%2B1/ ? # %, whitespace, non-ASCII) are still escaped exactly as beforecrypto.randomUUID()forcreateMemorySessionStoragesession ids (#15302)createMemorySessionStorageis only intended for local development and testing - sessions are lost when the server restartsNavLinknot applying itspendingstate whentohas a trailing slash (#15300)clientLoadercan skip unnecessary server requests once their components have rendered while still fetching missing server-rendered elements (#15323)TypeError: Invalid state: Unable to enqueue) when a request is aborted while the RSC HTML stream has a pending flush (#15286)injectRSCPayloadreadable side, clear the pending flush, and cancel the underlying RSC payload streamUnstable Changes
⚠️ Unstable features are not recommended for production use
Migration
Apps using the default RSC Framework entry do not need to make any changes. Apps with a custom
entry.rsc.tsxshould import the generated client version and pass it tounstable_matchRSCServerRequest:Add CSP nonce support to RSC document rendering (#15320)
nonceoptions tounstable_routeRSCServerRequestandunstable_RSCStaticRouterTo adopt nonce-based CSP, update your
entry.ssr.tsx(runreact-router reveal entry.ssrfirst in RSC Framework Mode) to generate a fresh nonce for each request. Pass it torouteRSCServerRequest, spread therenderHTMLoptions into React's HTML renderer, passoptions.noncetoRSCStaticRouter, and use the same nonce in theContent-Security-Policyresponse header:v8.2.0Compare Source
Patch Changes
href()to properly stringify and URL-encode param values, matchinggeneratePath()(#15277)/school?/user/:id), the internal regex's incorrectly shifted parameter indices resulting in incorrect parameter extraction/one?/two?) were only partially handled/sitemap.xmland outrank them based on definition orderv8.1.0Compare Source
Minor Changes
v8.0.1Compare Source
Patch Changes
AppLoadContexttype export accidentally left over from v7 now that middleware is always enabled and server request context is provided throughRouterContextProvider. (#15207)v8.0.0Compare Source
Major Changes
future.v8_trailingSlashAwareDataRequestsflag (#15100)tsconfig.jsontarget/libfromES2020 -> ES2022(591853e)packages/to ESM-only. (#14895) (59ebcf1)dataparameter in favor ofloaderDataformetaAPIs (to align withRoute.ComponentProps) (#14931)Route.MetaArgs,Route.MetaMatch,MetaArgs,MetaMatch,Route.ComponentProps.matches,UIMatchfuture.v8_passThroughRequestsflag - the raw incomingrequestis now always passed through toloader/action. Useurlfor the normalized URL without React Router-specific implementation details (.datasuffixes,index/_routessearch params). (#15079)hasErrorBoundaryfield added torouter.routeswhen using a data router (#15074)ErrorBoundaryorerrorElementon your routehasErrorBoundaryis no longer accepted onRouteObject(IndexRouteObject/NonIndexRouteObject),DataRouteObject,<Route>JSX props, or as a key inlazyroute definitions.MapRoutePropertiesFunctionsignature no longer requires returninghasErrorBoundary; the router infers it directly.react-router-dompackage (#15076)react-router/domreact-router-domwas kept around as a convenience so existing v6 app imports would still workreact-router-domimports:RouterProvider/HydratedRoutershould be imported fromreact-router/domreact-routerfuture.v8_middlewareflag — middleware is always enabled in v8 (#15078)future.v8_middlewareflag has been removed; middleware is now always enabledcontextparameter passed toloader,action, andmiddlewarefunctions is always aRouterContextProviderinstancegetLoadContextfunctions in custom servers must return aRouterContextProvider— returning a plain object is no longer supportedMiddlewareEnabledtype (previously exported asUNSAFE_MiddlewareEnabled) has been removed since the conditional it gated is now unconditionalFuturemodule augmentation pattern (interface Future { v8_middleware: true }) is no longer needed to typecontextin Data ModeMinor Changes
cookiefrom^1.0.1to^1.1.1set-cookie-parserfrom^2.6.0to^3.1.0Patch Changes
onSubmittype override fromSharedFormPropsto fix deprecation warning with@types/react@19.x(#14932) (59ebcf1)tsuptotsdown. Published package entry points and public APIs are unchanged. (#15092)Configuration
📅 Schedule: (in timezone Europe/Copenhagen)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate.
1d234e65ba920c1da1ef920c1da1efd8c94972e1d8c94972e1a09bc737d4Superseded by #79, which is merged: main now has react-router and all three adapters at
^8.3.0.These four PRs each bumped one catalog entry to
^8.0.0while leaving the other three at^7.18.2, so every one was a v8 runtime against v7 tooling and none could pass — #71'sTS2305: no exported member 'AppLoadContext'was that split version set, not a migration bug. #79 moved all four together and carried the actual migration (AppLoadContext→RouterContextProvider, metadata→loaderDatain seven routes, dropping the now-defaultv8_middlewareflag).renovate.json5now groups the four packages, placed after the majors →groupName: nullrule so the grouping survives a major — which is when they most need to arrive together. Closing rather than rebasing; the update is already satisfied on main.Pull request closed