hannoeru / vite-plugin-pages

File system based route generator for ⚡️Vite
MIT License
1.84k stars 127 forks source link

chore(deps): update dependency react-router to ^6.20.0 #429

Closed renovate[bot] closed 10 months ago

renovate[bot] commented 1 year ago

Mend Renovate logo banner

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
react-router ^6.11.2 -> ^6.20.0 age adoption passing confidence

Release Notes

remix-run/react-router (react-router) ### [`v6.20.0`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#6200) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router@6.19.0...react-router@6.20.0) ##### Minor Changes - Export the `PathParam` type from the public API ([#​10719](https://togithub.com/remix-run/react-router/pull/10719)) ##### Patch Changes - Fix bug with `resolveTo` in splat routes ([#​11045](https://togithub.com/remix-run/react-router/pull/11045)) - This is a follow up to [#​10983](https://togithub.com/remix-run/react-router/pull/10983) to handle the few other code paths using `getPathContributingMatches` - This removes the `UNSAFE_getPathContributingMatches` export from `@remix-run/router` since we no longer need this in the `react-router`/`react-router-dom` layers - Updated dependencies: - `@remix-run/router@1.13.0` ### [`v6.19.0`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#6190) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router@6.18.0...react-router@6.19.0) ##### Minor Changes - Add `unstable_flushSync` option to `useNavigate`/`useSumbit`/`fetcher.load`/`fetcher.submit` to opt-out of `React.startTransition` and into `ReactDOM.flushSync` for state updates ([#​11005](https://togithub.com/remix-run/react-router/pull/11005)) - Remove the `unstable_` prefix from the [`useBlocker`](https://reactrouter.com/en/main/hooks/use-blocker) hook as it's been in use for enough time that we are confident in the API. We do not plan to remove the prefix from `unstable_usePrompt` due to differences in how browsers handle `window.confirm` that prevent React Router from guaranteeing consistent/correct behavior. ([#​10991](https://togithub.com/remix-run/react-router/pull/10991)) ##### Patch Changes - Fix `useActionData` so it returns proper contextual action data and not *any* action data in the tree ([#​11023](https://togithub.com/remix-run/react-router/pull/11023)) - Fix bug in `useResolvedPath` that would cause `useResolvedPath(".")` in a splat route to lose the splat portion of the URL path. ([#​10983](https://togithub.com/remix-run/react-router/pull/10983)) - ⚠️ This fixes a quite long-standing bug specifically for `"."` paths inside a splat route which incorrectly dropped the splat portion of the URL. If you are relative routing via `"."` inside a splat route in your application you should double check that your logic is not relying on this buggy behavior and update accordingly. - Updated dependencies: - `@remix-run/router@1.12.0` ### [`v6.18.0`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#6180) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router@6.17.0...react-router@6.18.0) ##### Patch Changes - Fix the `future` prop on `BrowserRouter`, `HashRouter` and `MemoryRouter` so that it accepts a `Partial` instead of requiring all flags to be included. ([#​10962](https://togithub.com/remix-run/react-router/pull/10962)) - Updated dependencies: - `@remix-run/router@1.11.0` ### [`v6.17.0`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#6170) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router@6.16.0...react-router@6.17.0) ##### Patch Changes - Fix `RouterProvider` `future` prop type to be a `Partial` so that not all flags must be specified ([#​10900](https://togithub.com/remix-run/react-router/pull/10900)) - Updated dependencies: - `@remix-run/router@1.10.0` ### [`v6.16.0`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#6160) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router@6.15.0...react-router@6.16.0) ##### Minor Changes - In order to move towards stricter TypeScript support in the future, we're aiming to replace current usages of `any` with `unknown` on exposed typings for user-provided data. To do this in Remix v2 without introducing breaking changes in React Router v6, we have added generics to a number of shared types. These continue to default to `any` in React Router and are overridden with `unknown` in Remix. In React Router v7 we plan to move these to `unknown` as a breaking change. ([#​10843](https://togithub.com/remix-run/react-router/pull/10843)) - `Location` now accepts a generic for the `location.state` value - `ActionFunctionArgs`/`ActionFunction`/`LoaderFunctionArgs`/`LoaderFunction` now accept a generic for the `context` parameter (only used in SSR usages via `createStaticHandler`) - The return type of `useMatches` (now exported as `UIMatch`) accepts generics for `match.data` and `match.handle` - both of which were already set to `unknown` - Move the `@private` class export `ErrorResponse` to an `UNSAFE_ErrorResponseImpl` export since it is an implementation detail and there should be no construction of `ErrorResponse` instances in userland. This frees us up to export a `type ErrorResponse` which correlates to an instance of the class via `InstanceType`. Userland code should only ever be using `ErrorResponse` as a type and should be type-narrowing via `isRouteErrorResponse`. ([#​10811](https://togithub.com/remix-run/react-router/pull/10811)) - Export `ShouldRevalidateFunctionArgs` interface ([#​10797](https://togithub.com/remix-run/react-router/pull/10797)) - Removed private/internal APIs only required for the Remix v1 backwards compatibility layer and no longer needed in Remix v2 (`_isFetchActionRedirect`, `_hasFetcherDoneAnything`) ([#​10715](https://togithub.com/remix-run/react-router/pull/10715)) ##### Patch Changes - Updated dependencies: - `@remix-run/router@1.9.0` ### [`v6.15.0`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#6150) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router@6.14.2...react-router@6.15.0) ##### Minor Changes - Add's a new `redirectDocument()` function which allows users to specify that a redirect from a `loader`/`action` should trigger a document reload (via `window.location`) instead of attempting to navigate to the redirected location via React Router ([#​10705](https://togithub.com/remix-run/react-router/pull/10705)) ##### Patch Changes - Ensure `useRevalidator` is referentially stable across re-renders if revalidations are not actively occurring ([#​10707](https://togithub.com/remix-run/react-router/pull/10707)) - Updated dependencies: - `@remix-run/router@1.8.0` ### [`v6.14.2`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#6142) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router@6.14.1...react-router@6.14.2) ##### Patch Changes - Updated dependencies: - `@remix-run/router@1.7.2` ### [`v6.14.1`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#6141) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router@6.14.0...react-router@6.14.1) ##### Patch Changes - Fix loop in `unstable_useBlocker` when used with an unstable blocker function ([#​10652](https://togithub.com/remix-run/react-router/pull/10652)) - Fix issues with reused blockers on subsequent navigations ([#​10656](https://togithub.com/remix-run/react-router/pull/10656)) - Updated dependencies: - `@remix-run/router@1.7.1` ### [`v6.14.0`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#6140) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router@6.13.0...react-router@6.14.0) ##### Patch Changes - Strip `basename` from locations provided to `unstable_useBlocker` functions to match `useLocation` ([#​10573](https://togithub.com/remix-run/react-router/pull/10573)) - Fix `generatePath` when passed a numeric `0` value parameter ([#​10612](https://togithub.com/remix-run/react-router/pull/10612)) - Fix `unstable_useBlocker` key issues in `StrictMode` ([#​10573](https://togithub.com/remix-run/react-router/pull/10573)) - Fix `tsc --skipLibCheck:false` issues on React 17 ([#​10622](https://togithub.com/remix-run/react-router/pull/10622)) - Upgrade `typescript` to 5.1 ([#​10581](https://togithub.com/remix-run/react-router/pull/10581)) - Updated dependencies: - `@remix-run/router@1.7.0` ### [`v6.13.0`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#6130) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router@6.12.1...react-router@6.13.0) ##### Minor Changes - Move [`React.startTransition`](https://react.dev/reference/react/startTransition) usage behind a [future flag](https://reactrouter.com/en/main/guides/api-development-strategy) to avoid issues with existing incompatible `Suspense` usages. We recommend folks adopting this flag to be better compatible with React concurrent mode, but if you run into issues you can continue without the use of `startTransition` until v7. Issues usually boils down to creating net-new promises during the render cycle, so if you run into issues you should either lift your promise creation out of the render cycle or put it behind a `useMemo`. ([#​10596](https://togithub.com/remix-run/react-router/pull/10596)) Existing behavior will no longer include `React.startTransition`: ```jsx {/*...*/} ``` If you wish to enable `React.startTransition`, pass the future flag to your component: ```jsx {/*...*/} ``` ##### Patch Changes - Work around webpack/terser `React.startTransition` minification bug in production mode ([#​10588](https://togithub.com/remix-run/react-router/pull/10588)) ### [`v6.12.1`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#6121) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router@6.12.0...react-router@6.12.1) > **Warning** > Please use version `6.13.0` or later instead of `6.12.1`. This version suffers from a `webpack`/`terser` minification issue resulting in invalid minified code in your resulting production bundles which can cause issues in your application. See [#​10579](https://togithub.com/remix-run/react-router/issues/10579) for more details. ##### Patch Changes - Adjust feature detection of `React.startTransition` to fix webpack + react 17 compilation error ([#​10569](https://togithub.com/remix-run/react-router/pull/10569)) ### [`v6.12.0`](https://togithub.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#6120) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router@6.11.2...react-router@6.12.0) ##### Minor Changes - Wrap internal router state updates with `React.startTransition` if it exists ([#​10438](https://togithub.com/remix-run/react-router/pull/10438)) ##### Patch Changes - Updated dependencies: - `@remix-run/router@1.6.3`

Configuration

📅 Schedule: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

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.



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