cloudnativedaysjp / website

Website for CloudNative Days a.k.a Dreamkast-Archives
1 stars 0 forks source link

Update react-router monorepo to v6 (major) - autoclosed #102

Closed renovate[bot] closed 1 year ago

renovate[bot] commented 1 year ago

Mend Renovate

This PR contains the following updates:

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

Release Notes

remix-run/react-router (react-router) ### [`v6.10.0`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#​6100) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router@6.9.0...react-router@6.10.0) ##### Minor Changes - Added support for [**Future Flags**](https://reactrouter.com/en/main/guides/api-development-strategy) 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](https://togithub.com/remix-run/react-router/pull/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 route ID generation when using Fragments in `createRoutesFromElements` ([#​10193](https://togithub.com/remix-run/react-router/pull/10193)) - Updated dependencies: - `@remix-run/router@1.5.0` ### [`v6.9.0`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#​690) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router@6.8.2...react-router@6.9.0) ##### 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](https://togithub.com/remix-run/react-router/pull/10045)) **Example JSON Syntax** ```jsx // Both of these work the same: const elementRoutes = [{ path: '/', element: , errorElement: , }] const componentRoutes = [{ path: '/', Component: Home, ErrorBoundary: HomeError, }] function Home() { ... } function HomeError() { ... } ``` **Example JSX Syntax** ```jsx // Both of these work the same: const elementRoutes = createRoutesFromElements( } errorElement={ } /> ); const componentRoutes = createRoutesFromElements( ); function Home() { ... } function HomeError() { ... } ``` - **Introducing Lazy Route Modules!** ([#​10045](https://togithub.com/remix-run/react-router/pull/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. ```jsx // 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( }> } /> import("./a")} /> import("./b")} /> ); ``` Then in your lazy route modules, export the properties you want defined for the route: ```jsx 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 ( <>

You made it!

{data}

); } // Export an `ErrorBoundary` directly instead of needing to create a React Element from it export function ErrorBoundary() { let error = useRouteError(); return isRouteErrorResponse(error) ? (

{error.status} {error.statusText}

) : (

{error.message || error}

); } ``` An example of this in action can be found in the [`examples/lazy-loading-router-provider`](https://togithub.com/remix-run/react-router/tree/main/examples/lazy-loading-router-provider) directory of the repository. πŸ™Œ Huge thanks to [@​rossipedia](https://togithub.com/rossipedia) for the [Initial Proposal](https://togithub.com/remix-run/react-router/discussions/9826) and [POC Implementation](https://togithub.com/remix-run/react-router/pull/9830). - Updated dependencies: - `@remix-run/router@1.4.0` ##### Patch Changes - Fix `generatePath` incorrectly applying parameters in some cases ([#​10078](https://togithub.com/remix-run/react-router/pull/10078)) - Improve memoization for context providers to avoid unnecessary re-renders ([#​9983](https://togithub.com/remix-run/react-router/pull/9983)) ### [`v6.8.2`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#​682) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router@6.8.1...react-router@6.8.2) ##### Patch Changes - Updated dependencies: - `@remix-run/router@1.3.3` ### [`v6.8.1`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#​681) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router@6.8.0...react-router@6.8.1) ##### Patch Changes - Remove inaccurate console warning for POP navigations and update active blocker logic ([#​10030](https://togithub.com/remix-run/react-router/pull/10030)) - Updated dependencies: - `@remix-run/router@1.3.2` ### [`v6.8.0`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#​680) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router@6.7.0...react-router@6.8.0) ##### Patch Changes - Updated dependencies: - `@remix-run/router@1.3.1` ### [`v6.7.0`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#​670) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router@6.6.2...react-router@6.7.0) ##### Minor Changes - Add `unstable_useBlocker` hook for blocking navigations within the app's location origin ([#​9709](https://togithub.com/remix-run/react-router/pull/9709)) ##### Patch Changes - Fix `generatePath` when optional params are present ([#​9764](https://togithub.com/remix-run/react-router/pull/9764)) - Update `` to accept `ReactNode` as children function return result ([#​9896](https://togithub.com/remix-run/react-router/pull/9896)) - Updated dependencies: - `@remix-run/router@1.3.0` ### [`v6.6.2`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#​662) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router@6.6.1...react-router@6.6.2) ##### Patch Changes - Ensure `useId` consistency during SSR ([#​9805](https://togithub.com/remix-run/react-router/pull/9805)) ### [`v6.6.1`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#​661) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router@6.6.0...react-router@6.6.1) ##### Patch Changes - Updated dependencies: - `@remix-run/router@1.2.1` ### [`v6.6.0`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#​660) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router@6.5.0...react-router@6.6.0) ##### Patch Changes - Prevent `useLoaderData` usage in `errorElement` ([#​9735](https://togithub.com/remix-run/react-router/pull/9735)) - Updated dependencies: - `@remix-run/router@1.2.0` ### [`v6.5.0`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#​650) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router@6.4.5...react-router@6.5.0) This release introduces support for [Optional Route Segments](https://togithub.com/remix-run/react-router/issues/9546). Now, adding a `?` to the end of any path segment will make that entire segment optional. This works for both static segments and dynamic parameters. **Optional Params Examples** - `` will match: - `/multistep` - `/multistep/:widget1` - `/multistep/:widget1/:widget2` - `/multistep/:widget1/:widget2/:widget3` **Optional Static Segment Example** - `` will match: - `/` - `/home` - `` will match: - `/about` - `/fr/about` ##### Minor Changes - Allows optional routes and optional static segments ([#​9650](https://togithub.com/remix-run/react-router/pull/9650)) ##### Patch Changes - Stop incorrectly matching on partial named parameters, i.e. ``, to align with how splat parameters work. If you were previously relying on this behavior then it's recommended to extract the static portion of the path at the `useParams` call site: ([#​9506](https://togithub.com/remix-run/react-router/pull/9506)) ```jsx // Old behavior at URL /prefix-123 }> function Comp() { let params = useParams(); // { id: '123' } let id = params.id; // "123" ... } // New behavior at URL /prefix-123 }> function Comp() { let params = useParams(); // { id: 'prefix-123' } let id = params.id.replace(/^prefix-/, ''); // "123" ... } ``` - Updated dependencies: - `@remix-run/router@1.1.0` ### [`v6.4.5`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#​645) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router@6.4.4...react-router@6.4.5) ##### Patch Changes - Updated dependencies: - `@remix-run/router@1.0.5` ### [`v6.4.4`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#​644) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router@6.4.3...react-router@6.4.4) ##### Patch Changes - Updated dependencies: - `@remix-run/router@1.0.4` ### [`v6.4.3`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#​643) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router@6.4.2...react-router@6.4.3) ##### Patch Changes - `useRoutes` should be able to return `null` when passing `locationArg` ([#​9485](https://togithub.com/remix-run/react-router/pull/9485)) - fix `initialEntries` type in `createMemoryRouter` ([#​9498](https://togithub.com/remix-run/react-router/pull/9498)) - Updated dependencies: - `@remix-run/router@1.0.3` ### [`v6.4.2`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#​642) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router@6.4.1...react-router@6.4.2) ##### Patch Changes - Fix `IndexRouteObject` and `NonIndexRouteObject` types to make `hasErrorElement` optional ([#​9394](https://togithub.com/remix-run/react-router/pull/9394)) - Enhance console error messages for invalid usage of data router hooks ([#​9311](https://togithub.com/remix-run/react-router/pull/9311)) - If an index route has children, it will result in a runtime error. We have strengthened our `RouteObject`/`RouteProps` types to surface the error in TypeScript. ([#​9366](https://togithub.com/remix-run/react-router/pull/9366)) - Updated dependencies: - `@remix-run/router@1.0.2` ### [`v6.4.1`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#​641) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router@6.4.0...react-router@6.4.1) ##### Patch Changes - Preserve state from `initialEntries` ([#​9288](https://togithub.com/remix-run/react-router/pull/9288)) - Updated dependencies: - `@remix-run/router@1.0.1` ### [`v6.4.0`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#​640) [Compare Source](https://togithub.com/remix-run/react-router/compare/v6.3.0...react-router@6.4.0) Whoa this is a big one! `6.4.0` brings all the data loading and mutation APIs over from Remix. Here's a quick high level overview, but it's recommended you go check out the [docs][rr-docs], especially the [feature overview][rr-feature-overview] and the [tutorial][rr-tutorial]. **New APIs** - Create your router with `createMemoryRouter` - Render your router with `` - Load data with a Route `loader` and mutate with a Route `action` - Handle errors with Route `errorElement` - Defer non-critical data with `defer` and `Await` **Bug Fixes** - Path resolution is now trailing slash agnostic ([#​8861](https://togithub.com/remix-run/react-router/issues/8861)) - `useLocation` returns the scoped location inside a `` component ([#​9094](https://togithub.com/remix-run/react-router/issues/9094)) **Updated Dependencies** - `@remix-run/router@1.0.0` [rr-docs]: https://reactrouter.com [rr-feature-overview]: https://reactrouter.com/start/overview [rr-tutorial]: https://reactrouter.com/start/tutorial ### [`v6.3.0`](https://togithub.com/remix-run/react-router/releases/tag/v6.3.0): react-router@v6.3.0 [Compare Source](https://togithub.com/remix-run/react-router/compare/v6.2.2...v6.3.0) #### What's Changed - Added the v5 to v6 backwards compatibility package πŸ’œ ([https://github.com/remix-run/react-router/pull/8752](https://togithub.com/remix-run/react-router/pull/8752)). The official guide can be found [in this discussion](https://togithub.com/remix-run/react-router/discussions/8753) #### New Contributors - [@​mfijas](https://togithub.com/mfijas) made their first contribution in [https://github.com/remix-run/react-router/pull/8717](https://togithub.com/remix-run/react-router/pull/8717) - [@​ThornWu](https://togithub.com/ThornWu) made their first contribution in [https://github.com/remix-run/react-router/pull/8718](https://togithub.com/remix-run/react-router/pull/8718) - [@​janpaepke](https://togithub.com/janpaepke) made their first contribution in [https://github.com/remix-run/react-router/pull/8651](https://togithub.com/remix-run/react-router/pull/8651) - [@​rtmann](https://togithub.com/rtmann) made their first contribution in [https://github.com/remix-run/react-router/pull/8725](https://togithub.com/remix-run/react-router/pull/8725) **Full Changelog**: https://github.com/remix-run/react-router/compare/v6.2.2...v6.3.0 ### [`v6.2.2`](https://togithub.com/remix-run/react-router/releases/tag/v6.2.2) [Compare Source](https://togithub.com/remix-run/react-router/compare/v6.2.1...v6.2.2) #### What's Changed ##### πŸ› Bug Fixes - Fixed nested splat routes that begin with special URL-safe characters ([#​8563](https://togithub.com/remix-run/react-router/issues/8563)) - Fixed a bug where index routes were missing route context in some cases ([#​8497](https://togithub.com/remix-run/react-router/issues/8497)) #### New Contributors - [@​chasinhues](https://togithub.com/chasinhues) made their first contribution in [https://github.com/remix-run/react-router/pull/8514](https://togithub.com/remix-run/react-router/pull/8514) - [@​underager](https://togithub.com/underager) made their first contribution in [https://github.com/remix-run/react-router/pull/8531](https://togithub.com/remix-run/react-router/pull/8531) - [@​kantuni](https://togithub.com/kantuni) made their first contribution in [https://github.com/remix-run/react-router/pull/8537](https://togithub.com/remix-run/react-router/pull/8537) - [@​ArjaanBuijk](https://togithub.com/ArjaanBuijk) made their first contribution in [https://github.com/remix-run/react-router/pull/8536](https://togithub.com/remix-run/react-router/pull/8536) - [@​jmargeta](https://togithub.com/jmargeta) made their first contribution in [https://github.com/remix-run/react-router/pull/8548](https://togithub.com/remix-run/react-router/pull/8548) - [@​koojaa](https://togithub.com/koojaa) made their first contribution in [https://github.com/remix-run/react-router/pull/8542](https://togithub.com/remix-run/react-router/pull/8542) - [@​chrisngobanh](https://togithub.com/chrisngobanh) made their first contribution in [https://github.com/remix-run/react-router/pull/8576](https://togithub.com/remix-run/react-router/pull/8576) - [@​ChristopherChudzicki](https://togithub.com/ChristopherChudzicki) made their first contribution in [https://github.com/remix-run/react-router/pull/8582](https://togithub.com/remix-run/react-router/pull/8582) - [@​awreese](https://togithub.com/awreese) made their first contribution in [https://github.com/remix-run/react-router/pull/8596](https://togithub.com/remix-run/react-router/pull/8596) - [@​bhbs](https://togithub.com/bhbs) made their first contribution in [https://github.com/remix-run/react-router/pull/8601](https://togithub.com/remix-run/react-router/pull/8601) - [@​LukerSpringtree](https://togithub.com/LukerSpringtree) made their first contribution in [https://github.com/remix-run/react-router/pull/8619](https://togithub.com/remix-run/react-router/pull/8619) - [@​hsbtr](https://togithub.com/hsbtr) made their first contribution in [https://github.com/remix-run/react-router/pull/8476](https://togithub.com/remix-run/react-router/pull/8476) - [@​abhi-kr-2100](https://togithub.com/abhi-kr-2100) made their first contribution in [https://github.com/remix-run/react-router/pull/8658](https://togithub.com/remix-run/react-router/pull/8658) - [@​cvbuelow](https://togithub.com/cvbuelow) made their first contribution in [https://github.com/remix-run/react-router/pull/8663](https://togithub.com/remix-run/react-router/pull/8663) - [@​hyesungoh](https://togithub.com/hyesungoh) made their first contribution in [https://github.com/remix-run/react-router/pull/8666](https://togithub.com/remix-run/react-router/pull/8666) - [@​BrianT1414](https://togithub.com/BrianT1414) made their first contribution in [https://github.com/remix-run/react-router/pull/8667](https://togithub.com/remix-run/react-router/pull/8667) - [@​IbraRouisDev](https://togithub.com/IbraRouisDev) made their first contribution in [https://github.com/remix-run/react-router/pull/8683](https://togithub.com/remix-run/react-router/pull/8683) - [@​shihanng](https://togithub.com/shihanng) made their first contribution in [https://github.com/remix-run/react-router/pull/8689](https://togithub.com/remix-run/react-router/pull/8689) - [@​latin-1](https://togithub.com/latin-1) made their first contribution in [https://github.com/remix-run/react-router/pull/8529](https://togithub.com/remix-run/react-router/pull/8529) - [@​Isammoc](https://togithub.com/Isammoc) made their first contribution in [https://github.com/remix-run/react-router/pull/8533](https://togithub.com/remix-run/react-router/pull/8533) - [@​KutnerUri](https://togithub.com/KutnerUri) made their first contribution in [https://github.com/remix-run/react-router/pull/8278](https://togithub.com/remix-run/react-router/pull/8278) - [@​shamsup](https://togithub.com/shamsup) made their first contribution in [https://github.com/remix-run/react-router/pull/8563](https://togithub.com/remix-run/react-router/pull/8563) - [@​brophdawg11](https://togithub.com/brophdawg11) made their first contribution in [https://github.com/remix-run/react-router/pull/8691](https://togithub.com/remix-run/react-router/pull/8691) **Full Changelog**: https://github.com/remix-run/react-router/compare/v6.2.1...v6.2.2 ### [`v6.2.1`](https://togithub.com/remix-run/react-router/releases/tag/v6.2.1) [Compare Source](https://togithub.com/remix-run/react-router/compare/v6.2.0...v6.2.1) This release updates the internal `history` dependency to `5.2.0`. **Full Changelog**: https://github.com/remix-run/react-router/compare/v6.2.0...v6.2.1 ### [`v6.2.0`](https://togithub.com/remix-run/react-router/releases/tag/v6.2.0) [Compare Source](https://togithub.com/remix-run/react-router/compare/v6.1.1...v6.2.0) #### πŸ› Bug fixes - Fixed the `RouteProps` `element` type, which should be a `ReactNode` ([#​8473](https://togithub.com/remix-run/react-router/issues/8473)) - Fixed a bug with `useOutlet` for top-level routes ([#​8483](https://togithub.com/remix-run/react-router/issues/8483)) #### ✨ Features - We now use statically analyzable CJS exports. This enables named imports in Node ESM scripts ([See the commit](https://togithub.com/remix-run/react-router/commit/29c7fc8b5f853b0b06ecd0f5682a9bbe6eca0715)). #### New Contributors - [@​thisiskartik](https://togithub.com/thisiskartik) made their first contribution in [https://github.com/remix-run/react-router/pull/8487](https://togithub.com/remix-run/react-router/pull/8487) - [@​vijaypushkin](https://togithub.com/vijaypushkin) made their first contribution in [https://github.com/remix-run/react-router/pull/8491](https://togithub.com/remix-run/react-router/pull/8491) **Full Changelog**: https://github.com/remix-run/react-router/compare/v6.1.1...v6.2.0 ### [`v6.1.1`](https://togithub.com/remix-run/react-router/releases/tag/v6.1.1) [Compare Source](https://togithub.com/remix-run/react-router/compare/v6.1.0...v6.1.1) In v6.1.0 we inadvertently shipped a new, undocumented API that will likely introduce bugs ([#​7586](https://togithub.com/remix-run/react-router/issues/7586)). We have flagged `HistoryRouter` as `unstable_HistoryRouter`, as this API will likely need to change before a new major release. **Full Changelog**: https://github.com/remix-run/react-router/compare/v6.1.0...v6.1.1 ### [`v6.1.0`](https://togithub.com/remix-run/react-router/releases/tag/v6.1.0) [Compare Source](https://togithub.com/remix-run/react-router/compare/v6.0.2...v6.1.0) #### πŸ› Bug fixes - Fixed a bug that broke support for base64 encoded IDs on nested routes ([#​8291](https://togithub.com/remix-run/react-router/issues/8291)) #### ✨ Features - `` can now receive a `context` prop. This value is passed to child routes and is accessible via the new `useOutletContext` hook. See [the API docs](https://reactrouter.com/docs/en/v6/api#useoutletcontext) for details. ([#​8461](https://togithub.com/remix-run/react-router/issues/8461)) - `` can now receive a child function for access to its props. ([#​8164](https://togithub.com/remix-run/react-router/issues/8164)) #### πŸ’… Enhancements - Improved TypeScript signature for `useMatch` and `matchPath`. For example, when you call `useMatch("foo/:bar/:baz")`, the path is parsed and the return type will be `PathMatch<"bar" | "baz">`. ([#​8030](https://togithub.com/remix-run/react-router/issues/8030)) - A few error message improvements ([#​8202](https://togithub.com/remix-run/react-router/issues/8202)) #### New Contributors - [@​rwieruch](https://togithub.com/rwieruch) made their first contribution in [https://github.com/remix-run/react-router/pull/8244](https://togithub.com/remix-run/react-router/pull/8244) - [@​codeiotic](https://togithub.com/codeiotic) made their first contribution in [https://github.com/remix-run/react-router/pull/8247](https://togithub.com/remix-run/react-router/pull/8247) - [@​Sannnao](https://togithub.com/Sannnao) made their first contribution in [https://github.com/remix-run/react-router/pull/8263](https://togithub.com/remix-run/react-router/pull/8263) - [@​mattmazzola](https://togithub.com/mattmazzola) made their first contribution in [https://github.com/remix-run/react-router/pull/8255](https://togithub.com/remix-run/react-router/pull/8255) - [@​ngokevin](https://togithub.com/ngokevin) made their first contribution in [https://github.com/remix-run/react-router/pull/8267](https://togithub.com/remix-run/react-router/pull/8267) - [@​TimisRobert](https://togithub.com/TimisRobert) made their first contribution in [https://github.com/remix-run/react-router/pull/8269](https://togithub.com/remix-run/react-router/pull/8269) - [@​mikeldking](https://togithub.com/mikeldking) made their first contribution in [https://github.com/remix-run/react-router/pull/8279](https://togithub.com/remix-run/react-router/pull/8279) - [@​fishmandev](https://togithub.com/fishmandev) made their first contribution in [https://github.com/remix-run/react-router/pull/8289](https://togithub.com/remix-run/react-router/pull/8289) - [@​rjerue](https://togithub.com/rjerue) made their first contribution in [https://github.com/remix-run/react-router/pull/8304](https://togithub.com/remix-run/react-router/pull/8304) - [@​rockingskier](https://togithub.com/rockingskier) made their first contribution in [https://github.com/remix-run/react-router/pull/8314](https://togithub.com/remix-run/react-router/pull/8314) - [@​arinthros](https://togithub.com/arinthros) made their first contribution in [https://github.com/remix-run/react-router/pull/8337](https://togithub.com/remix-run/react-router/pull/8337) - [@​noisypigeon](https://togithub.com/noisypigeon) made their first contribution in [https://github.com/remix-run/react-router/pull/8361](https://togithub.com/remix-run/react-router/pull/8361) - [@​elylucas](https://togithub.com/elylucas) made their first contribution in [https://github.com/remix-run/react-router/pull/8368](https://togithub.com/remix-run/react-router/pull/8368) - [@​paulsmithkc](https://togithub.com/paulsmithkc) made their first contribution in [https://github.com/remix-run/react-router/pull/8357](https://togithub.com/remix-run/react-router/pull/8357) - [@​sanketshah19](https://togithub.com/sanketshah19) made their first contribution in [https://github.com/remix-run/react-router/pull/8372](https://togithub.com/remix-run/react-router/pull/8372) - [@​JakubDrozd](https://togithub.com/JakubDrozd) made their first contribution in [https://github.com/remix-run/react-router/pull/8402](https://togithub.com/remix-run/react-router/pull/8402) - [@​markivancho](https://togithub.com/markivancho) made their first contribution in [https://github.com/remix-run/react-router/pull/8414](https://togithub.com/remix-run/react-router/pull/8414) - [@​turansky](https://togithub.com/turansky) made their first contribution in [https://github.com/remix-run/react-router/pull/8420](https://togithub.com/remix-run/react-router/pull/8420) - [@​shivamsinghchahar](https://togithub.com/shivamsinghchahar) made their first contribution in [https://github.com/remix-run/react-router/pull/8423](https://togithub.com/remix-run/react-router/pull/8423) - [@​petersendidit](https://togithub.com/petersendidit) made their first contribution in [https://github.com/remix-run/react-router/pull/8436](https://togithub.com/remix-run/react-router/pull/8436) - [@​Ajayff4](https://togithub.com/Ajayff4) made their first contribution in [https://github.com/remix-run/react-router/pull/8373](https://togithub.com/remix-run/react-router/pull/8373) - [@​RobHannay](https://togithub.com/RobHannay) made their first contribution in [https://github.com/remix-run/react-router/pull/8455](https://togithub.com/remix-run/react-router/pull/8455) - [@​kddnewton](https://togithub.com/kddnewton) made their first contribution in [https://github.com/remix-run/react-router/pull/8030](https://togithub.com/remix-run/react-router/pull/8030) - [@​brockross](https://togithub.com/brockross) made their first contribution in [https://github.com/remix-run/react-router/pull/8462](https://togithub.com/remix-run/react-router/pull/8462) - [@​sergiodxa](https://togithub.com/sergiodxa) made their first contribution in [https://github.com/remix-run/react-router/pull/8164](https://togithub.com/remix-run/react-router/pull/8164) - [@​baozouai](https://togithub.com/baozouai) made their first contribution in [https://github.com/remix-run/react-router/pull/8171](https://togithub.com/remix-run/react-router/pull/8171) - [@​liuhanqu](https://togithub.com/liuhanqu) made their first contribution in [https://github.com/remix-run/react-router/pull/8374](https://togithub.com/remix-run/react-router/pull/8374) **Full Changelog**: https://github.com/remix-run/react-router/compare/v6.0.1...v6.1.0 ### [`v6.0.2`](https://togithub.com/remix-run/react-router/releases/tag/v6.0.2) [Compare Source](https://togithub.com/remix-run/react-router/compare/v6.0.1...v6.0.2) #### ✨ Features - Added the `reloadDocument` prop to ``. This allows `` to function like a normal anchor tag by reloading the document after navigation while maintaining the relative `to` resolution. #### πŸ—’οΈ Docs - Fixed several issues in docblocks and the docs themselves. See the [full changelog](https://togithub.com/remix-run/react-router/compare/v6.0.1...v6.0.2) for the deets! #### 🀝 New Contributors - [@​rwieruch](https://togithub.com/rwieruch) made their first contribution in [https://github.com/remix-run/react-router/pull/8244](https://togithub.com/remix-run/react-router/pull/8244) - [@​ProProgrammer2504](https://togithub.com/ProProgrammer2504) made their first contribution in [https://github.com/remix-run/react-router/pull/8247](https://togithub.com/remix-run/react-router/pull/8247) - [@​Sannnao](https://togithub.com/Sannnao) made their first contribution in [https://github.com/remix-run/react-router/pull/8263](https://togithub.com/remix-run/react-router/pull/8263) - [@​mattmazzola](https://togithub.com/mattmazzola) made their first contribution in [https://github.com/remix-run/react-router/pull/8255](https://togithub.com/remix-run/react-router/pull/8255) - [@​ngokevin](https://togithub.com/ngokevin) made their first contribution in [https://github.com/remix-run/react-router/pull/8267](https://togithub.com/remix-run/react-router/pull/8267) - [@​TimisRobert](https://togithub.com/TimisRobert) made their first contribution in [https://github.com/remix-run/react-router/pull/8269](https://togithub.com/remix-run/react-router/pull/8269) - [@​mikeldking](https://togithub.com/mikeldking) made their first contribution in [https://github.com/remix-run/react-router/pull/8279](https://togithub.com/remix-run/react-router/pull/8279) - [@​fishmandev](https://togithub.com/fishmandev) made their first contribution in [https://github.com/remix-run/react-router/pull/8289](https://togithub.com/remix-run/react-router/pull/8289) ##### Full Changelog ### [`v6.0.1`](https://togithub.com/remix-run/react-router/releases/tag/v6.0.1) [Compare Source](https://togithub.com/remix-run/react-router/compare/v6.0.0...v6.0.1) #### πŸ› Bug Fixes - Add a default `` value ([#​8243](https://togithub.com/remix-run/react-router/issues/8243)) - Add invariant for using `` inside `` to help people make the change ([#​8238](https://togithub.com/remix-run/react-router/issues/8238)) ### [`v6.0.0`](https://togithub.com/remix-run/react-router/releases/tag/v6.0.0) [Compare Source](https://togithub.com/remix-run/react-router/compare/v5.3.4...v6.0.0) React Router v6 is here! Please go read [our blog post for more information on all the great stuff in v6](https://remix.run/blog/react-router-v6) including [notes about how to upgrade from React Router v5](https://remix.run/blog/react-router-v6#upgrading-to-react-router-v6) and Reach Router. ### [`v5.3.4`](https://togithub.com/remix-run/react-router/releases/tag/v5.3.4) [Compare Source](https://togithub.com/remix-run/react-router/compare/v5.3.3...v5.3.4) We removed the `mini-create-react-context` dependency, moving it into an internal module to eliminate peer dependency warnings for users on React 18 ([#​9382](https://togithub.com/remix-run/react-router/issues/9382)). **Full Changelog**: https://github.com/remix-run/react-router/compare/v5.3.3...v5.3.4 ### [`v5.3.3`](https://togithub.com/remix-run/react-router/releases/tag/v5.3.3) [Compare Source](https://togithub.com/remix-run/react-router/compare/v5.3.2...v5.3.3) This release fixes a bad version selector in react-router-native. ### [`v5.3.2`](https://togithub.com/remix-run/react-router/releases/tag/v5.3.2) [Compare Source](https://togithub.com/remix-run/react-router/compare/v5.3.1...v5.3.2) - Fix: make v5 Router compatible with v18 StrictMode by [@​jgoz](https://togithub.com/jgoz) in [https://github.com/remix-run/react-router/pull/8831](https://togithub.com/remix-run/react-router/pull/8831) ### [`v5.3.1`](https://togithub.com/remix-run/react-router/releases/tag/v5.3.1) [Compare Source](https://togithub.com/remix-run/react-router/compare/v5.2.1...v5.3.1) This release adds missing `LICENSE` files to the published build. ### [`v5.2.1`](https://togithub.com/remix-run/react-router/releases/tag/v5.2.1) [Compare Source](https://togithub.com/remix-run/react-router/compare/v5.2.0...v5.2.1) This release fixes a bug with `` so that, when the `to` location is the same as the current, the history state entry is replaced instead of pushed to the stack. See [https://github.com/remix-run/react-router/issues/5362](https://togithub.com/remix-run/react-router/issues/5362) for details. πŸ₯³ Thanks to [@​guidobouman](https://togithub.com/guidobouman) for the PR and for everyone else who weighed in for the fix!
remix-run/react-router (react-router-dom) ### [`v6.10.0`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router-dom/CHANGELOG.md#​6100) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router-dom@6.9.0...react-router-dom@6.10.0) ##### Minor Changes - Added support for [**Future Flags**](https://reactrouter.com/en/main/guides/api-development-strategy) 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](https://togithub.com/remix-run/react-router/pull/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](https://togithub.com/remix-run/react-router/pull/10190)) - Updated dependencies: - `@remix-run/router@1.5.0` - `react-router@6.10.0` ### [`v6.9.0`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router-dom/CHANGELOG.md#​690) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router-dom@6.8.2...react-router-dom@6.9.0) ##### 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](https://togithub.com/remix-run/react-router/pull/10045)) **Example JSON Syntax** ```jsx // Both of these work the same: const elementRoutes = [{ path: '/', element: , errorElement: , }] const componentRoutes = [{ path: '/', Component: Home, ErrorBoundary: HomeError, }] function Home() { ... } function HomeError() { ... } ``` **Example JSX Syntax** ```jsx // Both of these work the same: const elementRoutes = createRoutesFromElements( } errorElement={ } /> ); const componentRoutes = createRoutesFromElements( ); function Home() { ... } function HomeError() { ... } ``` - **Introducing Lazy Route Modules!** ([#​10045](https://togithub.com/remix-run/react-router/pull/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. ```jsx // 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( }> } /> import("./a")} /> import("./b")} /> ); ``` Then in your lazy route modules, export the properties you want defined for the route: ```jsx 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 ( <>

You made it!

{data}

); } // Export an `ErrorBoundary` directly instead of needing to create a React Element from it export function ErrorBoundary() { let error = useRouteError(); return isRouteErrorResponse(error) ? (

{error.status} {error.statusText}

) : (

{error.message || error}

); } ``` An example of this in action can be found in the [`examples/lazy-loading-router-provider`](https://togithub.com/remix-run/react-router/tree/main/examples/lazy-loading-router-provider) directory of the repository. πŸ™Œ Huge thanks to [@​rossipedia](https://togithub.com/rossipedia) for the [Initial Proposal](https://togithub.com/remix-run/react-router/discussions/9826) and [POC Implementation](https://togithub.com/remix-run/react-router/pull/9830). - Updated dependencies: - `react-router@6.9.0` - `@remix-run/router@1.4.0` ### [`v6.8.2`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router-dom/CHANGELOG.md#​682) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router-dom@6.8.1...react-router-dom@6.8.2) ##### Patch Changes - Treat same-origin absolute URLs in `` as external if they are outside of the router `basename` ([#​10135](https://togithub.com/remix-run/react-router/pull/10135)) - Fix `useBlocker` to return `IDLE_BLOCKER` during SSR ([#​10046](https://togithub.com/remix-run/react-router/pull/10046)) - Fix SSR of absolute `` urls ([#​10112](https://togithub.com/remix-run/react-router/pull/10112)) - Properly escape HTML characters in `StaticRouterProvider` serialized hydration data ([#​10068](https://togithub.com/remix-run/react-router/pull/10068)) - Updated dependencies: - `@remix-run/router@1.3.3` - `react-router@6.8.2` ### [`v6.8.1`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router-dom/CHANGELOG.md#​681) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router-dom@6.8.0...react-router-dom@6.8.1) ##### Patch Changes - Improved absolute url detection in `Link` component (now also supports `mailto:` urls) ([#​9994](https://togithub.com/remix-run/react-router/pull/9994)) - Fix partial object (search or hash only) pathnames losing current path value ([#​10029](https://togithub.com/remix-run/react-router/pull/10029)) - Updated dependencies: - `react-router@6.8.1` - `@remix-run/router@1.3.2` ### [`v6.8.0`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router-dom/CHANGELOG.md#​680) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router-dom@6.7.0...react-router-dom@6.8.0) ##### Minor Changes - Support absolute URLs in ``. 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](https://togithub.com/remix-run/react-router/pull/9900)) ```tsx {/* Document request */} {/* Document request */} {/* Client-side navigation */} ``` ##### Patch Changes - Fix bug with search params removal via `useSearchParams` ([#​9969](https://togithub.com/remix-run/react-router/pull/9969)) - Respect `preventScrollReset` on `` ([#​9963](https://togithub.com/remix-run/react-router/pull/9963)) - Fix navigation for hash routers on manual URL changes ([#​9980](https://togithub.com/remix-run/react-router/pull/9980)) - Use `pagehide` instead of `beforeunload` for ``. This has better cross-browser support, specifically on Mobile Safari. ([#​9945](https://togithub.com/remix-run/react-router/pull/9945)) - Updated dependencies: - `@remix-run/router@1.3.1` - `react-router@6.8.0` ### [`v6.7.0`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router-dom/CHANGELOG.md#​670) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router-dom@6.6.2...react-router-dom@6.7.0) ##### Minor Changes - Add `unstable_useBlocker` hook for blocking navigations within the app's location origin ([#​9709](https://togithub.com/remix-run/react-router/pull/9709)) - Add `unstable_usePrompt` hook for blocking navigations within the app's location origin ([#​9932](https://togithub.com/remix-run/react-router/pull/9932)) - Add `preventScrollReset` prop to `
` ([#​9886](https://togithub.com/remix-run/react-router/pull/9886)) ##### Patch Changes - Added pass-through event listener options argument to `useBeforeUnload` ([#​9709](https://togithub.com/remix-run/react-router/pull/9709)) - Streamline jsdom bug workaround in tests ([#​9824](https://togithub.com/remix-run/react-router/pull/9824)) - Updated dependencies: - `@remix-run/router@1.3.0` - `react-router@6.7.0` ### [`v6.6.2`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router-dom/CHANGELOG.md#​662) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router-dom@6.6.1...react-router-dom@6.6.2) ##### Patch Changes - Ensure `useId` consistency during SSR ([#​9805](https://togithub.com/remix-run/react-router/pull/9805)) - Updated dependencies: - `react-router@6.6.2` ### [`v6.6.1`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router-dom/CHANGELOG.md#​661) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router-dom@6.6.0...react-router-dom@6.6.1) ##### Patch Changes - Updated dependencies: - `@remix-run/router@1.2.1` - `react-router@6.6.1` ### [`v6.6.0`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router-dom/CHANGELOG.md#​660) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router-dom@6.5.0...react-router-dom@6.6.0) ##### Minor Changes - Add `useBeforeUnload()` hook ([#​9664](https://togithub.com/remix-run/react-router/pull/9664)) - Remove `unstable_` prefix from `createStaticHandler`/`createStaticRouter`/`StaticRouterProvider` ([#​9738](https://togithub.com/remix-run/react-router/pull/9738)) ##### Patch Changes - Proper hydration of `Error` objects from `StaticRouterProvider` ([#​9664](https://togithub.com/remix-run/react-router/pull/9664)) - Support uppercase `` and `useSubmit` method values ([#​9664](https://togithub.com/remix-run/react-router/pull/9664)) - Skip initial scroll restoration for SSR apps with `hydrationData` ([#​9664](https://togithub.com/remix-run/react-router/pull/9664)) - Fix `

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 these updates again.



This PR has been generated by Mend Renovate. View repository job log here.

aws-amplify-us-east-1[bot] commented 1 year ago

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-102.d1fbfmeuaycsih.amplifyapp.com