Skip to content

fix(deps): update react-router monorepo (major) - #174

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/major-react-router-monorepo
Open

renovate[bot] wants to merge 1 commit into
masterfrom
renovate/major-react-router-monorepo

Conversation

@renovate

@renovate renovate Bot commented Nov 22, 2024 •

Copy link
Copy Markdown
Contributor

Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
react-router (source) 4.4.0-beta.8 → 8.5.1 age confidence
react-router-dom (source) 4.4.0-beta.8 → 7.18.5 age confidence

Release Notes

remix-run/react-router (react-router)

v8.5.1

Compare Source

Patch Changes
  • Fix URIError: URI malformed when an ssr: false dev server receives a URL path with a malformed percent-encoding (#​15649)
  • Bound server route manifest processing for paths with expensive route expansion (#​15703)
    • Fall back to initial route discovery during server rendering and RSC document/data requests
    • Account for the number and depth of candidate branches when using regex matching
  • Encode commas within paths sent to the lazy route discovery manifest endpoint so routes with commas in their paths are discovered correctly (#​15640)
  • Fix fetcher revalidation errors bubbling to the root error boundary instead of the nearest boundary above the route that owns the fetcher (#​15676)
  • Avoid duplicate history entries when posting a <Form> to the current URL with an encoded action (#​15679)
    • Replace the current history entry when the action contains characters that get percent-encoded, such as spaces or non-ASCII characters
  • Fix an unhandled promise rejection when the browser skips a viewTransition navigation, for example in a hidden tab (#​15582)
  • Bubble rejected lazy.Component imports on loader-less routes to the nearest error boundary (#​15658)
    • Render the error boundary instead of a blank page
  • Preserve pending fetcher mutation revalidation when an older navigation or background reload completes to prevent stale loader data (#​15686)
    • Keep newer fetcher loads cancellable and preserve them when earlier revalidations finish or abort, preventing older responses from overwriting fresh fetcher data
  • Retry rejected lazy route imports instead of caching failures permanently (#​15689)
  • Revalidate loader data when a fetcher action redirect is not followed (#​15557)
    • Revalidate when an action redirect is ignored because a newer navigation started or the fetcher unmounted while the action was running
    • Include shared parent loaders when another navigation completed while the action was running
    • Continue to respect shouldRevalidate
    • Return fetchers to idle when a revalidation completes a pending navigation started by another fetcher's redirect
  • Avoid adding an incompatible document.startViewTransition() overload to the global Document type (#​15680)
    • Allow transition results to be assigned to the DOM ViewTransition type
  • Skip deleteData in destroySession when the session has no ID (#​15639)
    • Avoid failures when destroying a session without a cookie on storage that rejects an empty key
  • Surface the host's 404 response when a SPA fallback route has no prerendered data (#​15646)
    • Request single-fetch .data files for hydrating routes with a server loader in an ssr: false app with a prerender config
    • Avoid the internal "No result found for routeId" error for non-prerendered parameterized paths served via the SPA fallback
  • Improve turbo-stream decoding validation and object property handling (18e1fbd)
Unstable Changes

⚠️ Unstable features are not recommended for production use

  • Add an opt-in <Await unstable_promise={promise}> implementation based on React's use() API (#​15678)
    • Use React.use instead of React Router's internal promise tracking
    • Accept promise-like values and retain errorElement, useAsyncValue, and useAsyncError support
    • Handle only promise rejections with errorElement when using unstable_promise, allowing child render errors to bubble to the nearest React error boundary
    • Track streamed promises during decoding so settled server content stays visible during hydration updates with either Await API or direct React.use()
  • Fix URIError: URI malformed when an API-only (ssr: "unstable_api-only") server receives a URL path with a malformed percent-encoding (#​15649)
  • Fix duplicate headers when throwing a redirect from an RSC server function (#​15667)

v8.5.0

Compare Source

Minor Changes
  • Deprecate React Router's view transition APIs in favor of React's <ViewTransition> component, available in React 19.3 and later (#​15493)
    • Deprecate the viewTransition props/options, useViewTransitionState, and NavLink's isTransitioning render prop and transitioning class
    • Preserve existing behavior, including support for older React versions
    • See the migration guide for a navigation example and compatibility considerations
Patch Changes
  • Fix <Await> failing to server render promises decoded from an RSC payload, which caused the Suspense boundary to switch to client rendering (#​15597)
  • Declare @types/react and @types/react-dom as optional peer dependencies so the shipped type definitions resolve React types under strict (non-hoisted) node_modules layouts (#​15528)
  • Fix the unstable_useRouterState documentation example to call the imported alias (#​15535)
  • Render the HydrateFallback of a route discovered through patchRoutesOnNavigation during initial hydration (#​15537)
    • Routes discovered during initial hydration are now exposed in state.matches while their loaders run, so <RouterProvider> renders down to the discovered route's HydrateFallback instead of rendering nothing
  • Fix router state recovery when updates occur before RouterProvider subscribes, including when other subscribers are already attached, and report current client errors once without replaying server errors during hydration (#​15637)
  • Fix matchPath not treating a static segment as optional when it contains characters outside [\w-] (#​15425)
  • Fix an RSC server crash when a client aborts a document request while the HTML stream waits for the RSC payload (#​15612)
  • Stop revalidating a fetcher after fetcher.reset(), so its cleared data no longer comes back on the next revalidation (#​15633)
Unstable Changes

⚠️ Unstable features are not recommended for production use

  • Add an unstable_fetch prop to <HydratedRouter> to customize JavaScript-issued manifest and server data requests in conventional Framework Mode (#​15586)
    • The function receives the intended request as well as context identifying the type of request
    • Data request context includes navigationType ("PUSH", "REPLACE", or "POP" for navigation-initiated requests, including reloaded fetchers; null otherwise)
      • Data strategies receive equivalent metadata through unstable_initiator and unstable_navigationType
    • The custom fetch context is a discriminated union, so narrowing type to "navigation" guarantees a non-null navigationType, while other data requests have a null navigationType
      • Fetchers reloaded after an initialization redirect retain the "initialization" type and include their fetcher key
    • Like other router initialization options, the implementation is captured when the singleton router is created and thus subsequent prop changes are ignored
    • Browser-managed data prefetches from <Link prefetch> use native <link rel="prefetch"> elements and do not call the custom implementation
    • Use the callback for custom fetch options, custom headers, safe request retries, or response header inspection
    • Return response bodies unchanged so React Router can decode its manifest and Turbo Stream data protocols
  • Support API-only Framework Mode with runtime server data loading, actions, revalidation, and lazy route discovery (#​15601)
    • Hydrate prerendered pages from build-time data and fetch server loader data when hydrating a SPA fallback
    • Preserve normal loader revalidation and server-action support for eagerly loaded and lazily discovered routes, and honor loader opt-outs when making server data requests
  • Add unstable_useRouteDiscovery for application-controlled route discovery in conventional Framework Mode (#​15602)
    • Discover selected destinations or load the running client's full route manifest without loading route modules
    • Compose manifest-mismatch handlers, with shared recovery and cancellation that preserves application state
    • Keep full-manifest failures catchable without rendering error boundaries, whether mismatch handlers use the hook or event's loadAllRoutes()
    • Cancel pending revalidation alongside a canceled navigation, retaining existing data and settling interrupted fetchers before restoring Back/Forward history
    • Enable future.unstable_customRouteDiscovery to opt in
      • Apps without the flag retain existing discovery behavior
    • Call event.defaultBehavior() from a custom mismatch handler to explicitly run built-in recovery
  • Return middleware short-circuit responses as-is for document requests in RSC modes, including resource routes, instead of decoding non-RSC bodies as Flight (#​15628)
    • Include server middleware in both eager and lazy RSC route configuration types
    • Preserve HTML rendering for cached Flight responses returned by middleware, and pass through raw responses that replace the result of next()

v8.4.0

Compare Source

Minor Changes
  • Deprecate the createStaticRouter({ branches }) option (#​15297)
    • createStaticRouter now caches route branches internally, ignores branches, and logs a deprecation warning when the option is provided
    • The deprecated EntryContext.branches property remains available for compatibility but is always an empty array
Patch Changes
  • Prevent stale route discovery during manifest version-mismatch recovery (#​15489)
    • Keep concurrent manifest responses pending while a document reload is in progress
    • Report a discovery error when a previous reload failed to resolve a version mismatch instead of loading a stale route or reloading repeatedly
    • Fail pending requests if a document reload does not complete within five seconds or the document is restored from the back-forward cache, allowing subsequent requests to recover
  • Preserve lazy route module import errors during SPA navigations instead of replacing them with a missing dataStrategy result error (#​15464)
  • Switch to more granular internal router contexts to avoid unnecessary route component re-renders when unrelated data router state changes (#​15376)
    • ⚠️ This contains some breaking changes to exported UNSAFE_ contexts, so please review carefully if you are using those unsafe exports
  • Correctly escape streamed RSC redirect locations in meta tag attributes (#​15491)
  • Avoid unintended document.startViewTransition calls during initial hydration and router.revalidate() calls (#​15484)
  • Fix SingleFetchNoResultError thrown when a fetcher revalidates against a splat route during lazy route discovery (#​15395)
    • Track discovery per fetcher load so revalidation waits for the current load's discovery, even when the fetcher key is reused, while still restarting interrupted loaders after discovery completes
  • Preserve the underlying decode failure as the cause of the Unable to decode turbo-stream response error (#​15450)
Unstable Changes

⚠️ Unstable features are not recommended for production use

  • Add a Data Mode future.unstable_routePatternMatching flag for more efficient route matching powered by @remix-run/route-pattern (#​15298)
    • Add an unstable_validateParams route field to reject invalid parameter values and continue matching
  • Document access control requirements for RSC Server Functions (#​15490)
    • Treat every Server Function as a public endpoint that must perform all of its own access control checks
    • Recommend route actions when access control should be provided by route middleware

v8.3.1

Compare Source

Patch Changes
  • Fix Expected fetcher: <key> error thrown on navigation when a fetcher is aborted during its post-action revalidation (#​15365)
  • Fix lazy route discovery caching a path as discovered when the triggering navigation was aborted after the manifest response settled but before the route tree was patched, which permanently (for the session) shadowed the real route behind a catch-all or produced 404s on every subsequent visit (#​15399)
  • Improve route matching performance for long paths (#​15417)
  • Improve validation of action request origins (#​15419)
  • Fix <ScrollRestoration> leaving history.scrollRestoration set to "auto" after a bfcache restore, which let the browser restore scroll on subsequent history traversals before the destination route had rendered (#​15397)
  • Properly respect the relative option in useSubmit/fetcher.submit when resolivng the action path (#​15400)
  • Add additional URL validation on client side navigations/redirects (#​15445)

v8.3.0

Compare Source

Patch Changes
  • Encode path params in href/generatePath per RFC 3986 path-segment rules instead of encodeURIComponent (#​15310)
    • Characters that are valid literally in a path segment ($ & + , ; = : @ — RFC 3986 pchar) are no longer percent-encoded, so values like a semver build 1.0.0+1 interpolate unchanged instead of becoming 1.0.0%2B1
    • Structural/unsafe characters (/ ? # %, whitespace, non-ASCII) are still escaped exactly as before
  • Use crypto.randomUUID() for createMemorySessionStorage session ids (#​15302)
    • createMemorySessionStorage is only intended for local development and testing - sessions are lost when the server restarts
  • Fix NavLink not applying its pending state when to has a trailing slash (#​15300)
  • Preserve RSC route component metadata so routes with a clientLoader can skip unnecessary server requests once their components have rendered while still fetching missing server-rendered elements (#​15323)
  • Harden RSC CSRF code paths (#​15311)
  • Fix server crash (TypeError: Invalid state: Unable to enqueue) when a request is aborted while the RSC HTML stream has a pending flush (#​15286)
    • Handle cancellation of the injectRSCPayload readable side, clear the pending flush, and cancel the underlying RSC payload stream
Unstable Changes

⚠️ Unstable features are not recommended for production use

  • Detect stale RSC clients during lazy route discovery and reload the destination document (#​15318)
Migration

Apps using the default RSC Framework entry do not need to make any changes. Apps with a custom entry.rsc.tsx should import the generated client version and pass it to unstable_matchRSCServerRequest:

import clientVersion from "virtual:react-router/unstable_rsc/client-version";

return unstable_matchRSCServerRequest({
  // ...
  clientVersion,
});
  • Add CSP nonce support to RSC document rendering (#​15320)

    • Add nonce options to unstable_routeRSCServerRequest and unstable_RSCStaticRouter
    • Forward the nonce to the HTML renderer and apply it to injected RSC payload scripts and nonce-aware framework components

    To adopt nonce-based CSP, update your entry.ssr.tsx (run react-router reveal entry.ssr first in RSC Framework Mode) to generate a fresh nonce for each request. Pass it to routeRSCServerRequest, spread the renderHTML options into React's HTML renderer, pass options.nonce to RSCStaticRouter, and use the same nonce in the Content-Security-Policy response header:

    const nonce = crypto.randomUUID();
    const response = await routeRSCServerRequest({
      request,
      serverResponse,
      createFromReadableStream,
      nonce,
      async renderHTML(getPayload, options) {
        const payload = getPayload();
        return renderHTMLToReadableStream(
          <RSCStaticRouter getPayload={getPayload} nonce={options.nonce} />,
          {
            ...options,
            bootstrapScriptContent,
            formState: await payload.formState,
            signal: request.signal,
          },
        );
      },
    });
    response.headers.set(
      "Content-Security-Policy",
      `script-src 'self' 'nonce-${nonce}'`,
    );

v8.2.0

Compare Source

Patch Changes
  • Fix href() to properly stringify and URL-encode param values, matching generatePath() (#​15277)
    • splat params preserve path separators while encoding each segment individually
  • Fix dynamic param extraction for routes with optional static segments (#​15200)
    • When a route path contains optional static segments (e.g. /school?/user/:id), the internal regex's incorrectly shifted parameter indices resulting in incorrect parameter extraction
    • Consecutive optional static segments (e.g. /one?/two?) were only partially handled
  • Preserve navigation blocker state through a revalidation (#​15246)
  • Fix route ranking for dynamic parameters with static extension suffixes (#​15273)
    • These were not being detected as dynamic param segments and instead got incorrectly scored higher as a static segment
    • This meant they could potentially tie truly static routes like /sitemap.xml and outrank them based on definition order
    • These are now correctly identified as dynamic parameter segments and scored correctly
  • Use ReactFormState types instead of unknown (#​15263)

v8.1.0

Compare Source

Minor Changes
  • Return route metadata from server request, client navigation, and client fetcher instrumentations (#​15235)
    • Adds result metadata after instrumented calls complete, including the URL, matched route pattern, and params
    • Adds known HTTP status codes to server request handler instrumentation results

v8.0.1

Compare Source

Patch Changes
  • Remove the obsolete AppLoadContext type export accidentally left over from v7 now that middleware is always enabled and server request context is provided through RouterContextProvider. (#​15207)

v8.0.0

Compare Source

Major Changes
  • Remove the future.v8_trailingSlashAwareDataRequests flag (#​15100)
    • Trailing slash-aware data request URLs are now the default behavior.
  • Update tsconfig.json target/lib from ES2020 -> ES2022 (591853e)
  • Switch the published packages in packages/ to ESM-only. (#​14895) (59ebcf1)
  • Remove deprecated data parameter in favor of loaderData for meta APIs (to align with Route.ComponentProps) (#​14931)
    • Route.MetaArgs, Route.MetaMatch, MetaArgs, MetaMatch, Route.ComponentProps.matches, UIMatch
  • Remove future.v8_passThroughRequests flag - the raw incoming request is now always passed through to loader/action. Use url for the normalized URL without React Router-specific implementation details (.data suffixes, index/_routes search params). (#​15079)
  • Remove internal hasErrorBoundary field added to router.routes when using a data router (#​15074)
    • This should not impact user-facing code since this was an internal prop and was computed based on the presence of ErrorBoundary or errorElement on your route
    • hasErrorBoundary is no longer accepted on RouteObject (IndexRouteObject/NonIndexRouteObject), DataRouteObject, <Route> JSX props, or as a key in lazy route definitions.
    • The MapRoutePropertiesFunction signature no longer requires returning hasErrorBoundary; the router infers it directly.
  • Remove react-router-dom package (#​15076)
    • In v7 everything DOM-specific was collapsed into react-router/dom
      • react-router-dom was kept around as a convenience so existing v6 app imports would still work
    • For v8, you will need to swap react-router-dom imports:
      • RouterProvider/HydratedRouter should be imported from react-router/dom
      • Everything else should be imported from react-router
  • Remove future.v8_middleware flag — middleware is always enabled in v8 (#​15078)
    • The future.v8_middleware flag has been removed; middleware is now always enabled
    • The context parameter passed to loader, action, and middleware functions is always a RouterContextProvider instance
    • getLoadContext functions in custom servers must return a RouterContextProvider — returning a plain object is no longer supported
    • The MiddlewareEnabled type (previously exported as UNSAFE_MiddlewareEnabled) has been removed since the conditional it gated is now unconditional
    • The Future module augmentation pattern (interface Future { v8_middleware: true }) is no longer needed to type context in Data Mode
  • Update minimum Node version to 22.22.0 (#​14928)
  • Update minimum React version to 19.2.7 (#​15062)
Minor Changes
  • Bump dependencies (#​15080)
    • Bumped cookie from ^1.0.1 to ^1.1.1
    • Bumped set-cookie-parser from ^2.6.0 to ^3.1.0
Patch Changes
  • Ensure client middleware errors load lazy route error boundaries before bubbling (#​15086)
  • Remove explicit onSubmit type override from SharedFormProps to fix deprecation warning with @types/react@19.x (#​14932) (59ebcf1)
  • Update package builds to preserve individual module files in published artifacts. Public APIs and documented import paths are unchanged. (#​15092)
    • Updated package TypeScript configs to support modern module syntax used by the build configuration.
  • Migrate package builds from tsup to tsdown. Published package entry points and public APIs are unchanged. (#​15092)
  • Upgrade React Router's TypeScript tooling to TypeScript 6. Runtime behavior and public APIs are unchanged. (#​15092)

v7.18.5: v7.18.5

Compare Source

See the changelog for release notes: https://github.com/remix-run/react-router/blob/v7/CHANGELOG.md#v7185

v7.18.4: v7.18.4

Compare Source

See the changelog for release notes: https://github.com/remix-run/react-router/blob/v7/CHANGELOG.md#v7184

v7.18.3: v7.18.3

Compare Source

See the changelog for release notes: https://github.com/remix-run/react-router/blob/v7/CHANGELOG.md#v7183

v7.18.2: v7.18.2

Compare Source

See the changelog for release notes: https://github.com/remix-run/react-router/blob/v7/CHANGELOG.md#v7182

v7.18.1: v7.18.1

Compare Source

See the changelog for release notes: https://github.com/remix-run/react-router/blob/v7/CHANGELOG.md#v7181

v7.18.0

Compare Source

Patch Changes
  • Fix server handler prerender responses when using ssr: false and future.v8_trailingSlashAwareDataRequests: true. Avoids false positive "SPA Mode" detection when serving prerendered paths (#​15173)
  • Use the ServerRouter nonce for nonce-aware SSR components when they don't provide their own value so strict CSP pages can load them. (#​15170)
  • Use turbo-stream to serialize and deserialize Framework Mode hydration errors (#​15175)
  • Precompute route branch matchers to avoid recompiling route path regexes during matching (#​15186)
  • Use the constructed request URL host when validating action request origins. (#​15185)
  • Remove the un-documented custom error serialization logic from Data Mode SSR built-in hydration flows (#​15175)
  • Validate protocols in RSC render redirects (#​15177)
  • Consolidate url normalization logic and better handle mixed slashes (#​15176)

v7.17.0

Compare Source

Minor Changes
  • Ship a subset of the official documentation inside the react-router package (#​15121)
    • Markdown docs are now available in node_modules/react-router/docs, letting AI coding agents and the React Router agent skills read official docs locally
    • Excludes auto-generated API docs (api/), community/ content, and tutorials (tutorials/)

v7.16.0

Compare Source

Minor Changes
  • Stabilize future.unstable_trailingSlashAwareDataRequests as future.v8_trailingSlashAwareDataRequests (#​15098)
Patch Changes
  • Disable manifest path when lazy route dicovery is disabled (#​15068)

  • Fix browser URL creation to use the configured history window instead of the global window. (#​15066)

    • Pass the history/router window through to createBrowserURLImpl so custom window contexts keep the correct URL origin.
  • Fix useNavigation() return type to preserve discriminated union across navigation states (#​15095)

  • Widen MetaDescriptor script:ld+json type from LdJsonObject to LdJsonObject | LdJsonObject[] to permit multiple JSON-LD schemas in a single <script type="application/ld+json"> tag emitted by <Meta /> (#​15082)

v7.15.1

Compare Source

Patch Changes
  • Update router to operate on fetcher Maps in an immutable manner to avoid delayed React renders from potentially reading an updated but not yet committed Map. This could result in brief flickers in some fetcher-driven optimistic UI scenarios. (#​15028)
  • Fix serverLoader() returning stale SSR data when a client navigation aborts pending hydration before the hydration clientLoader resolves (#​15022)
  • Fix RouterProvider onError callback not being called for synchronous initial loader errors in SPA mode (#​15039) (#​14942)
  • Memoize useFetchers to return a stable identity and only change if fetchers changed (#​15028)
  • Internal refactor to consolidate mutation request detection through shared utility (#​15033)
Unstable Changes

⚠️ Unstable features are not recommended for production use

  • Add a new unstable_useRouterState() hook that consolidates access to active and pending router states (RFC: #​12358) (#​15017)
    • Data/Framework/RSC only — throws when used without a data router

    • This should allow you to consolidate usages of the following hooks which will likely be deprecated and removed in a future major version

      • useLocation
      • useSearchParams
      • useParams
      • useMatches
      • useNavigationType
      • useNavigation
      let { active, pending } = unstable_useRouterState();
      
      // Active is always populated with the current location
      active.location; // replaces `useLocation()`
      active.searchParams; // replaces `useSearchParams()[0]`
      active.params; // replaces `useParams()`
      active.matches; // replaces `useMatches()`
      active.type; // replaces `useNavigationType()`
      
      // Pending is only populated during a navigation
      pending.location; // replaces `useNavigation().location`
      pending.searchParams; // equivalent to `new URLSearchParams(useNavigation().search)`
      pending.params; // Not directly accessible today
      pending.matches; // Not directly accessible today
      pending.type; // Not directly accessible today
      pending.state; // replaces `useNavigation().state`
      pending.formMethod; // replaces useNavigation().formMethod
      pending.formAction; // replaces useNavigation().formAction
      pending.formEncType; // replaces useNavigation().formEncType
      pending.formData; // replaces useNavigation().formData
      pending.json; // replaces useNavigation().json
      pending.text; // replaces useNavigation().text

v7.15.0

Compare Source

Minor Changes
  • Stabilize unstable_defaultShouldRevalidate as defaultShouldRevalidate on <Link>, <Form>, useLinkClickHandler, useSubmit, fetcher.submit, and setSearchParams (a993f09)

    • ⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
  • Stabilize the instrumentation APIs. unstable_instrumentations is now instrumentations and unstable_pattern is now pattern (a993f09)

    • The unstable_ServerInstrumentation, unstable_ClientInstrumentation, unstable_InstrumentRequestHandlerFunction, unstable_InstrumentRouterFunction, unstable_InstrumentRouteFunction, and unstable_InstrumentationHandlerResult types have had their unstable_ prefixes removed
    • ⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
  • Stabilize unstable_mask as mask on <Link>, useLinkClickHandler, and useNavigate, and rename the corresponding Location.unstable_mask field to Location.mask (a993f09)

    • ⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
  • Stabilize the unstable_normalizePath option on staticHandler.query and staticHandler.queryRoute as normalizePath (a993f09)

    • ⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
  • Stabilize future.unstable_passThroughRequests as future.v8_passThroughRequests (a993f09)

    • ⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
  • Remove unstable_subResourceIntegrity from the runtime FutureConfig type; the flag is now controlled by the top-level subResourceIntegrity option in react-router.config.ts (a993f09)

    • ⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
  • Stabilize unstable_url as url on loader, action, and middleware function args (a993f09)

    • ⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
  • Stabilize unstable_useTransitions as useTransitions on <BrowserRouter>, <HashRouter>, <HistoryRouter>, <MemoryRouter>, <Router>, <RouterProvider>, <HydratedRouter>, and useLinkClickHandler (a993f09)

    • ⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
Patch Changes
  • Add nonce to <Scripts> <link rel="modulepreload"> elements (if provided) (af5d49b)

  • Fix a bug with unstable_defaultShouldRevalidate={false} where parent routes that did not export a shouldRevalidate function could be incorrectly included in the single fetch call for new child route data (#​15012)

  • Improve server-side route matching performance by pre-computing flattened/cached route branches (#​14967) (af5d49b)

    • Performance benchmarks showed roughly a 10-15% improvement in server-side request handling performance
  • Mark mask as an optional field in Location for easier mocking in unit tests (#​14999)

  • Cache flattened/ranked route branches to optimize server-side route matching (#​14967)

  • Improve route matching performance in Framework/Data Mode (#​14971) (af5d49b)

    • Avoiding unnecessary calls to matchRoutes in data router scenarios
      • This includes adding back the optimization that was removed in 7.6.0 (#​13562)
      • The issues that prompted the revert have been addressed by using the available router matches but always updating match.route to the latest route in the manifest
    • Leverage pre-computed pre-computing flattened/cached route branches during client side route matching
    • Performance benchmarks showed roughly a 15-30% improvement in server-side request handling performance

v7.14.2

Compare Source

Patch Changes
  • Remove the un-documented custom error serialization logic from the internal turbo-stream implementation. React Router only automatically handles serialization of Error and it's standard subtypes (SyntaxError, TypeError, etc.). ([aabf4a1)

  • Properly handle parent middleware redirects during fetcher.load ([aabf4a1)

  • Remove redundant Omit<RouterProviderProps, "flushSync"> from react-router/dom RouterProvider ([aabf4a1)

  • Improved types for generatePath's param arg ([aabf4a1)

    Type errors when required params are omitted:

    // Before
    // Passes type checks, but throws at runtime 💥
    generatePath(":required", { required: null });
    
    // After
    generatePath(":required", { required: null });
    //                          ^^^^^^^^ Type 'null' is not assignable to type 'string'.ts(2322)

    Allow omission of optional params:

    // Before
    generatePath(":optional?", {});
    //                         ^^ Property 'optional' is missing in type '{}' but required in type '{ optional: string | null | undefined; }'.ts(2741)
    
    // After
    generatePath(":optional?", {});

    Allows extra keys:

    // Before
    generatePath(":a", { a: "1", b: "2" });
    //                           ^ Object literal may only specify known properties, and 'b' does not exist in type '{ a: string; }'.ts(2353)
    
    // After
    generatePath(":a", { a: "1", b: "2" });

v7.14.1

Compare Source

Patch Changes
  • Fix a potential race condition that can occur when rendering a HydrateFallback and initial loaders land before the router.subscribe call happens in the RouterProvider layout effect
  • Normalize double-slashes in redirect paths

v7.14.0

Compare Source

Patch Changes
  • UNSTABLE RSC FRAMEWORK MODE BREAKING CHANGE - Existing route module exports remain unchanged from stable v7 non-RSC mode, but new exports are added for RSC mode. If you want to use RSC features, you will need to update your route modules to export the new annotations. (#​14901)

    If you are using RSC framework mode currently, you will need to update your route modules to the new conventions. The following route module components have their own mutually exclusive server component counterparts:

    Server Component Export Client Component
    ServerComponent default
    ServerErrorBoundary ErrorBoundary
    ServerLayout Layout
    ServerHydrateFallback HydrateFallback

    If you were previously exporting a ServerComponent, your ErrorBoundary, Layout, and HydrateFallback were also server components. If you want to keep those as server components, you can rename them and prefix them with Server. If you were previously importing the implementations of those components from a client module, you can simply inline them.

    Example:

    Before

    import { ErrorBoundary as ClientErrorBoundary } from "./client";
    
    export function ServerComponent() {
      // ...
    }
    
    export function ErrorBoundary() {
      return <ClientErrorBoundary />;
    }
    
    export function Layout() {
      // ...
    }
    
    export function HydrateFallback() {
      // ...
    }

    After

    export function ServerComponent() {
      // ...
    }
    
    export function ErrorBoundary() {
      // previous implementation of ClientErrorBoundary, this is now a client component
    }
    
    export function ServerLayout() {
      // rename previous Layout export to ServerLayout to make it a server component
    }
    
    export function ServerHydrateFallback() {
      // rename previous HydrateFallback export to ServerHydrateFallback to make it a server component
    }
  • rsc Link prefetch (#​14902)

  • Remove recursion from turbo-stream v2 allowing for encoding / decoding of massive payloads. (#​14838)

  • encodeViaTurboStream leaked memory via unremoved AbortSignal listener (#​14900)

v7.13.2

Compare 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.ComponentProps to createRoutesStub (#​14892)

  • Fix percent encoding in relative path navigation (#​14786)

  • Add future.unstable_passThroughRequests flag (#​14775)

    By default, React Router normalizes the request.url passed to your loader, action, and middleware functions by removing React Router's internal implementation details (.data suffixes, index + _routes query params).

    Enabling this flag removes that normalization and passes the raw HTTP request instance to your handlers. This provides a few benefits:

    • Reduces server-side overhead by eliminating multiple new Request() calls on the critical path
    • Allows you to distinguish document from data requests in your handlers base don the presence of a .data suffix (useful for observability purposes)

    If you were previously relying on the normalization of request.url, you can switch to use the new sibling unstable_url parameter which contains a URL instance representing the normalized location:

    // ❌ Before: you could assume there was no `.data` suffix in `request.url`
    export async function loader({ request }: Route.LoaderArgs) {
      let url = new URL(request.url);
      if (url.pathname === "/path") {
        // This check will fail with the flag enabled because the `.data` suffix will
        // exist on data requests
      }
    }
    
    // ✅ After: use `unstable_url` for normalized routing logic and `request.url`
    // for raw routing logic
    export async function loader({ request, unstable_url }: Route.LoaderArgs) {
      if (unstable_url.pathname === "/path") {
        // This will always have the `.data` suffix stripped
      }
    
      // And now you can distinguish between document versus data requests
      let isDataRequest = new URL(request.url).pathname.endsWith(".data");
    }
  • 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: URL parameter 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/_routes query params) (#​14775)

    This is being added alongside the new future.unstable_passthroughRequests future flag so that users still have a way to access the normalized URL when that flag is enabled and non-normalized request'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 of request.url in your application code.

    If you don't have the flag enabled, then unstable_url will match request.url.

v7.13.1

Compare 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)

    • matchPath("/users/:id?", "/usersblah") now returns null.
    • matchPath("/test_route/:part?", "/test_route_more") now returns null.
  • add RSC unstable_getRequest (#​14758)

  • Fix HydrateFallback rendering 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)

    // routes/gallery.tsx
    export function clientLoader({ request }: Route.LoaderArgs) {
      let sp = new URL(request.url).searchParams;
      return {
        images: getImages(),
        // When the router location has the image param, load the modal data
        modalImage: sp.has("image") ? getImage(sp.get("image")!) : null,
      };
    }
    
    export default function Gallery({ loaderData }: Route.ComponentProps) {
      return (
        <>
          <GalleryGrid>
            {loaderData.images.map((image) => (
              <Link
                key={image.id}
                {/* Navigate the router to /galley?image=N */}}
                to={`/gallery?image=${image.id}`}
                {/* But display /images/N in the URL bar */}}
                unstable_mask={`/images/${image.id}`}
              >
                <img src={image.url} alt={image.alt} />
              </Link>
            ))}
          </GalleryGrid>
    
          {/* When the modal data exists, display the modal */}
          {data.modalImage ? (
            <dialog open>
              <img src={data.modalImage.url} alt={data.modalImage.alt} />
            </dialog>
          ) : null}
        </>
      );
    }

    Notes:

    • The masked location, if present, will be available on useLocation().unstable_mask so you can detect whether you are currently masked or not.
    • Masked URLs only work for SPA use cases, and will be removed from history.state during SSR.
    • This provides a first-class API to mask URLs in Data Mode to achieve the same behavior you could do in Declarative Mode via manual backgroundLocation management.
  • RSC: Update failed origin checks to return a 400 status and appropriate UI instead of a generic 500 ([#​14755](htt

[!IMPORTANT]
✂ PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot requested a review from notrab November 22, 2024 08:51
@vercel

vercel Bot commented Nov 22, 2024 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
create-react-app-redux Error Error Oct 27, 2026 11:02pm UTC

@renovate
renovate Bot force-pushed the renovate/major-react-router-monorepo branch from c1520a4 to d3777a1 Compare November 22, 2024 15:07
@renovate
renovate Bot force-pushed the renovate/major-react-router-monorepo branch from d3777a1 to e9d3916 Compare December 3, 2024 03:37
@renovate renovate Bot changed the title fix(deps): update react-router monorepo to v7 (major) fix(deps): update react-router monorepo to v7 (major) - autoclosed Dec 8, 2024
@renovate renovate Bot closed this Dec 8, 2024
@renovate
renovate Bot deleted the renovate/major-react-router-monorepo branch December 8, 2024 18:34
@renovate renovate Bot changed the title fix(deps): update react-router monorepo to v7 (major) - autoclosed fix(deps): update react-router monorepo to v7 (major) Dec 9, 2024
@renovate renovate Bot reopened this Dec 9, 2024
@renovate
renovate Bot force-pushed the renovate/major-react-router-monorepo branch from 9ac8e2d to e9d3916 Compare December 9, 2024 06:41
@renovate
renovate Bot force-pushed the renovate/major-react-router-monorepo branch from e9d3916 to 9761826 Compare December 20, 2024 21:03
@renovate renovate Bot changed the title fix(deps): update react-router monorepo to v7 (major) fix(deps): update react-router monorepo to v6 (major) Dec 20, 2024
@renovate
renovate Bot force-pushed the renovate/major-react-router-monorepo branch from 9761826 to f8453da Compare December 21, 2024 00:07
@renovate renovate Bot changed the title fix(deps): update react-router monorepo to v6 (major) fix(deps): update react-router monorepo to v7 (major) Dec 21, 2024
@renovate
renovate Bot force-pushed the renovate/major-react-router-monorepo branch from f8453da to 36c2479 Compare December 23, 2024 20:43
@renovate
renovate Bot force-pushed the renovate/major-react-router-monorepo branch from 36c2479 to 2d52cda Compare January 16, 2025 17:41
@renovate
renovate Bot force-pushed the renovate/major-react-router-monorepo branch from 2d52cda to d9630e9 Compare January 19, 2025 09:02
@renovate
renovate Bot force-pushed the renovate/major-react-router-monorepo branch from d9630e9 to 45bacb9 Compare January 30, 2025 17:13
@renovate
renovate Bot force-pushed the renovate/major-react-router-monorepo branch from 45bacb9 to 101fa75 Compare February 1, 2025 20:56
@renovate
renovate Bot force-pushed the renovate/major-react-router-monorepo branch from 101fa75 to 2bb750e Compare February 18, 2025 21:52
@renovate
renovate Bot force-pushed the renovate/major-react-router-monorepo branch from 47a73a7 to 551f08b Compare April 28, 2025 22:14
@renovate
renovate Bot force-pushed the renovate/major-react-router-monorepo branch from 551f08b to 43fa4f4 Compare May 8, 2025 15:54
@renovate
renovate Bot force-pushed the renovate/major-react-router-monorepo branch from 43fa4f4 to 3df2c73 Compare May 25, 2025 14:01
@renovate
renovate Bot force-pushed the renovate/major-react-router-monorepo branch from 3df2c73 to de72e81 Compare June 5, 2025 21:28
@renovate
renovate Bot force-pushed the renovate/major-react-router-monorepo branch from de72e81 to 3514daa Compare June 27, 2025 19:14
@renovate
renovate Bot force-pushed the renovate/major-react-router-monorepo branch from 3514daa to fcddf44 Compare July 17, 2025 00:00
@renovate
renovate Bot force-pushed the renovate/major-react-router-monorepo branch from fcddf44 to 4912012 Compare July 25, 2025 00:55
@renovate
renovate Bot force-pushed the renovate/major-react-router-monorepo branch from 4912012 to 76e166e Compare August 7, 2025 21:29
@renovate
renovate Bot force-pushed the renovate/major-react-router-monorepo branch from 76e166e to e1010fb Compare August 15, 2025 21:29
@renovate
renovate Bot force-pushed the renovate/major-react-router-monorepo branch from e1010fb to c7cb9bf Compare August 22, 2025 23:02
@renovate
renovate Bot force-pushed the renovate/major-react-router-monorepo branch from c7cb9bf to 8276468 Compare September 13, 2025 20:02
@renovate
renovate Bot force-pushed the renovate/major-react-router-monorepo branch from 8276468 to 7ba9b12 Compare September 24, 2025 18:08
@renovate
renovate Bot force-pushed the renovate/major-react-router-monorepo branch from 7ba9b12 to bd0900e Compare September 26, 2025 20:32
@renovate
renovate Bot force-pushed the renovate/major-react-router-monorepo branch from bd0900e to cebb7d1 Compare October 8, 2025 19:12

This branch had an error being deployed

1 failed deployment
Preview — ab80d1a0 Deployed Oct 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants