react-router 6.20.0 → 6.20.1-pre.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/react-router.development.js +5 -5
- package/dist/react-router.development.js.map +1 -1
- package/dist/react-router.production.min.js +2 -2
- package/dist/react-router.production.min.js.map +1 -1
- package/dist/umd/react-router.development.js +4 -4
- package/dist/umd/react-router.development.js.map +1 -1
- package/dist/umd/react-router.production.min.js +2 -2
- package/dist/umd/react-router.production.min.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# `react-router`
|
|
2
2
|
|
|
3
|
+
## 6.20.1-pre.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Revert the `useResolvedPath` fix for splat routes due to a large number of applications that were relying on the buggy behavior (see https://github.com/remix-run/react-router/issues/11052#issuecomment-1836589329). We plan to re-introduce this fix behind a future flag in the next minor version. ([#11078](https://github.com/remix-run/react-router/pull/11078))
|
|
8
|
+
- Updated dependencies:
|
|
9
|
+
- `@remix-run/router@1.13.1-pre.0`
|
|
10
|
+
|
|
3
11
|
## 6.20.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* React Router v6.20.0
|
|
2
|
+
* React Router v6.20.1-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
11
|
import * as React from 'react';
|
|
12
|
-
import { UNSAFE_invariant, joinPaths, matchPath,
|
|
12
|
+
import { UNSAFE_invariant, joinPaths, matchPath, UNSAFE_getPathContributingMatches, UNSAFE_warning, resolveTo, parsePath, matchRoutes, Action, UNSAFE_convertRouteMatchToUiMatch, stripBasename, IDLE_BLOCKER, isRouteErrorResponse, createMemoryHistory, AbortedDeferredError, createRouter } from '@remix-run/router';
|
|
13
13
|
export { AbortedDeferredError, Action as NavigationType, createPath, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, resolvePath } from '@remix-run/router';
|
|
14
14
|
|
|
15
15
|
function _extends() {
|
|
@@ -212,7 +212,7 @@ function useNavigateUnstable() {
|
|
|
212
212
|
let {
|
|
213
213
|
pathname: locationPathname
|
|
214
214
|
} = useLocation();
|
|
215
|
-
let routePathnamesJson = JSON.stringify(
|
|
215
|
+
let routePathnamesJson = JSON.stringify(UNSAFE_getPathContributingMatches(matches).map(match => match.pathnameBase));
|
|
216
216
|
let activeRef = React.useRef(false);
|
|
217
217
|
useIsomorphicLayoutEffect(() => {
|
|
218
218
|
activeRef.current = true;
|
|
@@ -301,7 +301,7 @@ function useResolvedPath(to, _temp2) {
|
|
|
301
301
|
let {
|
|
302
302
|
pathname: locationPathname
|
|
303
303
|
} = useLocation();
|
|
304
|
-
let routePathnamesJson = JSON.stringify(
|
|
304
|
+
let routePathnamesJson = JSON.stringify(UNSAFE_getPathContributingMatches(matches).map(match => match.pathnameBase));
|
|
305
305
|
return React.useMemo(() => resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, relative === "path"), [to, routePathnamesJson, locationPathname, relative]);
|
|
306
306
|
}
|
|
307
307
|
|
|
@@ -1013,7 +1013,7 @@ function Navigate(_ref4) {
|
|
|
1013
1013
|
|
|
1014
1014
|
// Resolve the path outside of the effect so that when effects run twice in
|
|
1015
1015
|
// StrictMode they navigate to the same place
|
|
1016
|
-
let path = resolveTo(to,
|
|
1016
|
+
let path = resolveTo(to, UNSAFE_getPathContributingMatches(matches).map(match => match.pathnameBase), locationPathname, relative === "path");
|
|
1017
1017
|
let jsonPath = JSON.stringify(path);
|
|
1018
1018
|
React.useEffect(() => navigate(JSON.parse(jsonPath), {
|
|
1019
1019
|
replace,
|