Skip to content

fix(deps): update dependency react-router to v7.8.2 (main)#4650

Merged
kodiakhq[bot] merged 1 commit into
mainfrom
renovate/main-react-router-monorepo
Aug 31, 2025
Merged

fix(deps): update dependency react-router to v7.8.2 (main)#4650
kodiakhq[bot] merged 1 commit into
mainfrom
renovate/main-react-router-monorepo

Conversation

@renovate

@renovate renovate Bot commented Aug 30, 2025

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
react-router (source) 7.6.3 -> 7.8.2 age confidence

Release Notes

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

v7.8.2

Compare Source

Patch Changes
  • [UNSTABLE] Remove Data Mode future.unstable_middleware flag from createBrowserRouter (#​14213)

    • This is only needed as a Framework Mode flag because of the route modules and the getLoadContext type behavior change
    • In Data Mode, it's an opt-in feature because it's just a new property on a route object, so there's no behavior changes that necessitate a flag
  • [UNSTABLE] Add <RouterProvider unstable_onError>/<HydratedRouter unstable_onError> prop for client side error reporting (#​14162)

  • server action revalidation opt out via $SKIP_REVALIDATION field (#​14154)

  • Properly escape interpolated param values in generatePath() (#​13530)

  • Maintain ReadonlyMap and ReadonlySet types in server response data. (#​13092)

  • [UNSTABLE] Delay serialization of .data redirects to 202 responses until after middleware chain (#​14205)

  • Fix TypeError if you throw from patchRoutesOnNavigation when no partial matches exist (#​14198)

  • Fix basename usage without a leading slash in data routers (#​11671)

  • [UNSTABLE] Update client middleware so it returns the data strategy results allowing for more advanced post-processing middleware (#​14151)

v7.8.1

Compare Source

Patch Changes
  • Fix usage of optional path segments in nested routes defined using absolute paths (#​14135)
  • Bubble client pre-next middleware error to the shallowest ancestor that needs to load, not strictly the shallowest ancestor with a loader (#​14150)
  • Fix optional static segment matching in matchPath (#​11813)
  • Fix prerendering when a basename is set with ssr:false (#​13791)
  • Provide isRouteErrorResponse utility in react-server environments (#​14166)
  • Propagate non-redirect Responses thrown from middleware to the error boundary on document/data requests (#​14182)
  • Handle meta and links Route Exports in RSC Data Mode (#​14136)
  • Properly convert returned/thrown data() values to Response instances via Response.json() in resource routes and middleware (#​14159, #​14181)

v7.8.0

Compare Source

Minor Changes
  • Add nonce prop to Links & PrefetchPageLinks (#​14048)
  • Add loaderData arguments/properties alongside existing data arguments/properties to provide consistency and clarity between loaderData and actionData across the board (#​14047)
    • Updated types: Route.MetaArgs, Route.MetaMatch, MetaArgs, MetaMatch, Route.ComponentProps.matches, UIMatch
    • @deprecated warnings have been added to the existing data properties to point users to new loaderData properties, in preparation for removing the data properties in a future major release
Patch Changes
  • Prevent "Did not find corresponding fetcher result" console error when navigating during a fetcher.submit revalidation (#​14114)

  • Bubble client-side middleware errors prior to next to the appropriate ancestor error boundary (#​14138)

  • Switch Lazy Route Discovery manifest URL generation to usea standalone URLSearchParams instance instead of URL.searchParams to avoid a major performance bottleneck in Chrome (#​14084)

  • Adjust internal RSC usage of React.use to avoid Webpack compilation errors when using React 18 (#​14113)

  • Remove dependency on @types/node in TypeScript declaration files (#​14059)

  • Fix types for UIMatch to reflect that the loaderData/data properties may be undefined (#​12206)

    • When an ErrorBoundary is being rendered, not all active matches will have loader data available, since it may have been their loader that threw to trigger the boundary
    • The UIMatch.data type was not correctly handing this and would always reflect the presence of data, leading to the unexpected runtime errors when an ErrorBoundary was rendered
    • ⚠️ This may cause some type errors to show up in your code for unguarded match.data accesses - you should properly guard for undefined values in those scenarios.
    // app/root.tsx
    export function loader() {
      someFunctionThatThrows(); // ❌ Throws an Error
      return { title: "My Title" };
    }
    
    export function Layout({ children }: { children: React.ReactNode }) {
      let matches = useMatches();
      let rootMatch = matches[0] as UIMatch<Awaited<ReturnType<typeof loader>>>;
      //  ^ rootMatch.data is incorrectly typed here, so TypeScript does not
      //    complain if you do the following which throws an error at runtime:
      let { title } = rootMatch.data; // 💥
    
      return <html>...</html>;
    }
  • [UNSTABLE] Ensure resource route errors go through handleError w/middleware enabled (#​14078)

  • [UNSTABLE] Propagate returned Response from server middleware if next wasn't called (#​14093)

  • [UNSTABLE] Allow server middlewares to return data() values which will be converted into a Response (#​14093)

  • [UNSTABLE] Update middleware error handling so that the next function never throws and instead handles any middleware errors at the proper ErrorBoundary and returns the Response up through the ancestor next function (#​14118)

  • [UNSTABLE] When middleware is enabled, make the context parameter read-only (via Readonly<unstable_RouterContextProvider>) so that TypeScript will not allow you to write arbitrary fields to it in loaders, actions, or middleware. (#​14097)

  • [UNSTABLE] Rename and alter the signature/functionality of the unstable_respond API in staticHandler.query/staticHandler.queryRoute (#​14103)

    • The API has been renamed to unstable_generateMiddlewareResponse for clarity
    • The main functional change is that instead of running the loaders/actions before calling unstable_respond and handing you the result, we now pass a query/queryRoute function as a parameter and you execute the loaders/actions inside your callback, giving you full access to pre-processing and error handling
    • The query version of the API now has a signature of (query: (r: Request) => Promise<StaticHandlerContext | Response>) => Promise<Response>
    • The queryRoute version of the API now has a signature of (queryRoute: (r: Request) => Promise<Response>) => Promise<Response>
    • This allows for more advanced usages such as running logic before/after calling query and direct error handling of errors thrown from query
    • ⚠️ This is a breaking change if you've adopted the staticHandler unstable_respond API
    let response = await staticHandler.query(request, {
      requestContext: new unstable_RouterContextProvider(),
      async unstable_generateMiddlewareResponse(query) {
        try {
          // At this point we've run middleware top-down so we need to call the
          // handlers and generate the Response to bubble back up the middleware
          let result = await query(request);
          if (isResponse(result)) {
            return result; // Redirects, etc.
          }
          return await generateHtmlResponse(result);
        } catch (error: unknown) {
          return generateErrorResponse(error);
        }
      },
    });
  • [UNSTABLE] Convert internal middleware implementations to use the new unstable_generateMiddlewareResponse API (#​14103)

  • [UNSTABLE] Change getLoadContext signature (type GetLoadContextFunction) when future.unstable_middleware is enabled so that it returns an unstable_RouterContextProvider instance instead of a Map used to contruct the instance internally (#​14097)

    • This also removes the type unstable_InitialContext export
    • ⚠️ This is a breaking change if you have adopted middleware and are using a custom server with a getLoadContext function
  • [UNSTABLE] Run client middleware on client navigations even if no loaders exist (#​14106)

  • [UNSTABLE] Change the unstable_getContext signature on RouterProvider/HydratedRouter/unstable_RSCHydratedRouter so that it returns an unstable_RouterContextProvider instance instead of a Map used to contruct the instance internally (#​14097)

    • ⚠️ This is a breaking change if you have adopted the unstable_getContext prop
  • [UNSTABLE] proxy server action side-effect redirects from actions for document and callServer requests (#​14131)

  • [UNSTABLE] Fix RSC Data Mode issue where routes that return false from shouldRevalidate would be replaced by an <Outlet /> (#​14071)

v7.7.1

Compare Source

Patch Changes
  • In RSC Data Mode, fix bug where routes with errors weren't forced to revalidate when shouldRevalidate returned false (#​14026)
  • In RSC Data Mode, fix Matched leaf route at location "/..." does not have an element or Component warnings when error boundaries are rendered. (#​14021)

v7.7.0

Compare Source

Minor Changes
Patch Changes
  • Handle InvalidCharacterError when validating cookie signature (#​13847)

  • Pass a copy of searchParams to the setSearchParams callback function to avoid muations of the internal searchParams instance. This was an issue when navigations were blocked because the internal instance be out of sync with useLocation().search. (#​12784)

  • Support invalid Date in turbo-stream v2 fork (#​13684)

  • In Framework Mode, clear critical CSS in development after initial render (#​13872)

  • Strip search parameters from patchRoutesOnNavigation path param for fetcher calls (#​13911)

  • Skip scroll restoration on useRevalidator() calls because they're not new locations (#​13671)

  • Support unencoded UTF-8 routes in prerender config with ssr set to false (#​13699)

  • Do not throw if the url hash is not a valid URI component (#​13247)

  • Fix a regression in createRoutesStub introduced with the middleware feature. (#​13946)

    As part of that work we altered the signature to align with the new middleware APIs without making it backwards compatible with the prior AppLoadContext API. This permitted createRoutesStub to work if you were opting into middleware and the updated context typings, but broke createRoutesStub for users not yet opting into middleware.

    We've reverted this change and re-implemented it in such a way that both sets of users can leverage it.

    // If you have not opted into middleware, the old API should work again
    let context: AppLoadContext = {
      /*...*/
    };
    let Stub = createRoutesStub(routes, context);
    
    // If you have opted into middleware, you should now pass an instantiated `unstable_routerContextProvider` instead of a `getContext` factory function.
    let context = new unstable_RouterContextProvider();
    context.set(SomeContext, someValue);
    let Stub = createRoutesStub(routes, context);

    ⚠️ This may be a breaking bug for if you have adopted the unstable Middleware feature and are using createRoutesStub with the updated API.

  • Remove Content-Length header from Single Fetch responses (#​13902)


Configuration

📅 Schedule: Branch creation - "after 10pm every weekday,before 5am every weekday,every weekend" in timezone America/New_York, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

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.


  • 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 a team as a code owner August 30, 2025 21:46
@renovate renovate Bot added automerge Used by Kodiak bot to automerge PRs dependencies Pull requests that update a dependency file labels Aug 30, 2025
@codecov

codecov Bot commented Aug 30, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.82%. Comparing base (a7677c5) to head (d22a468).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4650      +/-   ##
==========================================
- Coverage   63.83%   63.82%   -0.01%     
==========================================
  Files         171      171              
  Lines       17617    17617              
==========================================
- Hits        11245    11244       -1     
- Misses       5700     5701       +1     
  Partials      672      672              
Flag Coverage Δ
unittests 63.82% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@renovate
renovate Bot force-pushed the renovate/main-react-router-monorepo branch 3 times, most recently from 774a545 to 1dab58e Compare August 30, 2025 23:25
@renovate
renovate Bot force-pushed the renovate/main-react-router-monorepo branch from 1dab58e to d22a468 Compare August 30, 2025 23:56
@kodiakhq
kodiakhq Bot merged commit 14c206d into main Aug 31, 2025
39 of 40 checks passed
@kodiakhq
kodiakhq Bot deleted the renovate/main-react-router-monorepo branch August 31, 2025 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Used by Kodiak bot to automerge PRs dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants