Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency react-router-dom to v6.10.0 - autoclosed #2210

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 9, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
react-router-dom 6.6.1 -> 6.10.0 age adoption passing confidence

Release Notes

remix-run/react-router

v6.10.0

Compare Source

Minor Changes
  • Added support for Future Flags in React Router. The first flag being introduced is future.v7_normalizeFormMethod which will normalize the exposed useNavigation()/useFetcher() formMethod fields as uppercase HTTP methods to align with the fetch() behavior. (#​10207)

    • When future.v7_normalizeFormMethod === false (default v6 behavior),
      • useNavigation().formMethod is lowercase
      • useFetcher().formMethod is lowercase
    • When future.v7_normalizeFormMethod === true:
      • useNavigation().formMethod is uppercase
      • useFetcher().formMethod is uppercase
Patch Changes
  • Fix createStaticHandler to also check for ErrorBoundary on routes in addition to errorElement (#​10190)
  • Updated dependencies:
    • @remix-run/router@1.5.0
    • react-router@6.10.0

v6.9.0

Compare Source

Minor Changes
  • React Router now supports an alternative way to define your route element and errorElement fields as React Components instead of React Elements. You can instead pass a React Component to the new Component and ErrorBoundary fields if you choose. There is no functional difference between the two, so use whichever approach you prefer 😀. You shouldn't be defining both, but if you do Component/ErrorBoundary will "win". (#​10045)

    Example JSON Syntax

    // Both of these work the same:
    const elementRoutes = [{
      path: '/',
      element: <Home />,
      errorElement: <HomeError />,
    }]
    
    const componentRoutes = [{
      path: '/',
      Component: Home,
      ErrorBoundary: HomeError,
    }]
    
    function Home() { ... }
    function HomeError() { ... }

    Example JSX Syntax

    // Both of these work the same:
    const elementRoutes = createRoutesFromElements(
      <Route path='/' element={<Home />} errorElement={<HomeError /> } />
    );
    
    const componentRoutes = createRoutesFromElements(
      <Route path='/' Component={Home} ErrorBoundary={HomeError} />
    );
    
    function Home() { ... }
    function HomeError() { ... }
  • Introducing Lazy Route Modules! (#​10045)

    In order to keep your application bundles small and support code-splitting of your routes, we've introduced a new lazy() route property. This is an async function that resolves the non-route-matching portions of your route definition (loader, action, element/Component, errorElement/ErrorBoundary, shouldRevalidate, handle).

    Lazy routes are resolved on initial load and during the loading or submitting phase of a navigation or fetcher call. You cannot lazily define route-matching properties (path, index, children) since we only execute your lazy route functions after we've matched known routes.

    Your lazy functions will typically return the result of a dynamic import.

    // In this example, we assume most folks land on the homepage so we include that
    // in our critical-path bundle, but then we lazily load modules for /a and /b so
    // they don't load until the user navigates to those routes
    let routes = createRoutesFromElements(
      <Route path="/" element={<Layout />}>
        <Route index element={<Home />} />
        <Route path="a" lazy={() => import("./a")} />
        <Route path="b" lazy={() => import("./b")} />
      </Route>
    );

    Then in your lazy route modules, export the properties you want defined for the route:

    export async function loader({ request }) {
      let data = await fetchData(request);
      return json(data);
    }
    
    // Export a `Component` directly instead of needing to create a React Element from it
    export function Component() {
      let data = useLoaderData();
    
      return (
        <>
          <h1>You made it!</h1>
          <p>{data}</p>
        </>
      );
    }
    
    // Export an `ErrorBoundary` directly instead of needing to create a React Element from it
    export function ErrorBoundary() {
      let error = useRouteError();
      return isRouteErrorResponse(error) ? (
        <h1>
          {error.status} {error.statusText}
        </h1>
      ) : (
        <h1>{error.message || error}</h1>
      );
    }

    An example of this in action can be found in the examples/lazy-loading-router-provider directory of the repository.

    🙌 Huge thanks to @​rossipedia for the Initial Proposal and POC Implementation.

  • Updated dependencies:

    • react-router@6.9.0
    • @remix-run/router@1.4.0

v6.8.2

Compare Source

Patch Changes
  • Treat same-origin absolute URLs in <Link to> as external if they are outside of the router basename (#​10135)
  • Fix useBlocker to return IDLE_BLOCKER during SSR (#​10046)
  • Fix SSR of absolute <Link to> urls (#​10112)
  • Properly escape HTML characters in StaticRouterProvider serialized hydration data (#​10068)
  • Updated dependencies:
    • @remix-run/router@1.3.3
    • react-router@6.8.2

v6.8.1

Compare Source

Patch Changes
  • Improved absolute url detection in Link component (now also supports mailto: urls) (#​9994)
  • Fix partial object (search or hash only) pathnames losing current path value (#​10029)
  • Updated dependencies:
    • react-router@6.8.1
    • @remix-run/router@1.3.2

v6.8.0

Compare Source

Minor Changes
  • Support absolute URLs in <Link to>. If the URL is for the current origin, it will still do a client-side navigation. If the URL is for a different origin then it will do a fresh document request for the new origin. (#​9900)

    <Link to="https://neworigin.com/some/path">    {/* Document request */}
    <Link to="//neworigin.com/some/path">          {/* Document request */}
    <Link to="https://www.currentorigin.com/path"> {/* Client-side navigation */}
Patch Changes
  • Fix bug with search params removal via useSearchParams (#​9969)
  • Respect preventScrollReset on <fetcher.Form> (#​9963)
  • Fix navigation for hash routers on manual URL changes (#​9980)
  • Use pagehide instead of beforeunload for <ScrollRestoration>. This has better cross-browser support, specifically on Mobile Safari. (#​9945)
  • Updated dependencies:
    • @remix-run/router@1.3.1
    • react-router@6.8.0

v6.7.0

Compare Source

Minor Changes
  • Add unstable_useBlocker hook for blocking navigations within the app's location origin (#​9709)
  • Add unstable_usePrompt hook for blocking navigations within the app's location origin (#​9932)
  • Add preventScrollReset prop to <Form> (#​9886)
Patch Changes
  • Added pass-through event listener options argument to useBeforeUnload (#​9709)
  • Streamline jsdom bug workaround in tests (#​9824)
  • Updated dependencies:
    • @remix-run/router@1.3.0
    • react-router@6.7.0

v6.6.2

Compare Source

Patch Changes
  • Ensure useId consistency during SSR (#​9805)
  • Updated dependencies:
    • react-router@6.6.2

Configuration

📅 Schedule: 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.

🔕 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 has been generated by Mend Renovate. View repository job log here.

@changeset-bot
Copy link

changeset-bot bot commented Jan 9, 2023

⚠️ No Changeset found

Latest commit: 01002a2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Jan 9, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
ariakit ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 29, 2023 at 10:01PM (UTC)
1 Ignored Deployment
Name Status Preview Comments Updated
reakit ⬜️ Ignored (Inspect) Mar 29, 2023 at 10:01PM (UTC)

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 9, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 01002a2:

Sandbox Source
Ariakit Configuration

@renovate renovate bot changed the title Update dependency react-router-dom to v6.6.2 Update dependency react-router-dom to v6.7.0 Jan 19, 2023
@renovate renovate bot force-pushed the renovate/react-router-monorepo branch from 345bd4f to 1ac777c Compare January 19, 2023 00:02
@renovate renovate bot changed the title Update dependency react-router-dom to v6.7.0 Update dependency react-router-dom to v6.8.0 Jan 26, 2023
@renovate renovate bot force-pushed the renovate/react-router-monorepo branch from 1ac777c to f2e5697 Compare January 26, 2023 19:28
@renovate renovate bot changed the title Update dependency react-router-dom to v6.8.0 Update dependency react-router-dom to v6.8.1 Feb 6, 2023
@renovate renovate bot force-pushed the renovate/react-router-monorepo branch from f2e5697 to 1da32ce Compare February 6, 2023 23:33
@renovate renovate bot changed the title Update dependency react-router-dom to v6.8.1 Update dependency react-router-dom to v6.8.2 Feb 27, 2023
@renovate renovate bot force-pushed the renovate/react-router-monorepo branch from 1da32ce to 5d563c2 Compare February 27, 2023 20:39
@renovate renovate bot changed the title Update dependency react-router-dom to v6.8.2 Update dependency react-router-dom to v6.9.0 Mar 10, 2023
@renovate renovate bot force-pushed the renovate/react-router-monorepo branch from 5d563c2 to 902c78a Compare March 10, 2023 17:07
@renovate renovate bot changed the title Update dependency react-router-dom to v6.9.0 Update dependency react-router-dom to v6.10.0 Mar 29, 2023
@renovate renovate bot force-pushed the renovate/react-router-monorepo branch from 902c78a to 01002a2 Compare March 29, 2023 21:59
@renovate renovate bot changed the title Update dependency react-router-dom to v6.10.0 Update dependency react-router-dom to v6.10.0 - autoclosed Apr 11, 2023
@renovate renovate bot closed this Apr 11, 2023
@renovate renovate bot deleted the renovate/react-router-monorepo branch April 11, 2023 18:45
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.

None yet

0 participants