react-router 7.5.2 → 7.5.3
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 +7 -0
- package/dist/development/{chunk-BAXFHI7N.mjs → chunk-AYJ5UCUI.mjs} +12 -5
- package/dist/development/dom-export.js +11 -4
- package/dist/development/dom-export.mjs +2 -2
- package/dist/development/index.js +12 -5
- package/dist/development/index.mjs +2 -2
- package/dist/development/lib/types/route-module.js +1 -1
- package/dist/development/lib/types/route-module.mjs +1 -1
- package/dist/production/{chunk-XAHXRTXS.mjs → chunk-KKWFQRUV.mjs} +12 -5
- package/dist/production/dom-export.js +11 -4
- package/dist/production/dom-export.mjs +2 -2
- package/dist/production/index.js +12 -5
- package/dist/production/index.mjs +2 -2
- package/dist/production/lib/types/route-module.js +1 -1
- package/dist/production/lib/types/route-module.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# `react-router`
|
|
2
2
|
|
|
3
|
+
## 7.5.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix bug where bubbled action errors would result in `loaderData` being cleared at the handling `ErrorBoundary` route ([#13476](https://github.com/remix-run/react-router/pull/13476))
|
|
8
|
+
- Handle redirects from `clientLoader.hydrate` initial load executions ([#13477](https://github.com/remix-run/react-router/pull/13477))
|
|
9
|
+
|
|
3
10
|
## 7.5.2
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.5.
|
|
2
|
+
* react-router v7.5.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -1590,7 +1590,11 @@ function createRouter(init) {
|
|
|
1590
1590
|
}
|
|
1591
1591
|
return {
|
|
1592
1592
|
matches,
|
|
1593
|
-
pendingActionResult: [
|
|
1593
|
+
pendingActionResult: [
|
|
1594
|
+
boundaryMatch.route.id,
|
|
1595
|
+
result,
|
|
1596
|
+
actionMatch.route.id
|
|
1597
|
+
]
|
|
1594
1598
|
};
|
|
1595
1599
|
}
|
|
1596
1600
|
return {
|
|
@@ -4361,7 +4365,9 @@ function processRouteLoaderData(matches, results, pendingActionResult, isStaticH
|
|
|
4361
4365
|
});
|
|
4362
4366
|
if (pendingError !== void 0 && pendingActionResult) {
|
|
4363
4367
|
errors = { [pendingActionResult[0]]: pendingError };
|
|
4364
|
-
|
|
4368
|
+
if (pendingActionResult[2]) {
|
|
4369
|
+
loaderData[pendingActionResult[2]] = void 0;
|
|
4370
|
+
}
|
|
4365
4371
|
}
|
|
4366
4372
|
return {
|
|
4367
4373
|
loaderData,
|
|
@@ -6525,7 +6531,8 @@ async function singleFetchLoaderNavigationStrategy(args, router, getRouteInfo, f
|
|
|
6525
6531
|
)
|
|
6526
6532
|
);
|
|
6527
6533
|
await Promise.all(routeDfds.map((d) => d.promise));
|
|
6528
|
-
|
|
6534
|
+
let isInitialLoad = !router.state.initialized && router.state.navigation.state === "idle";
|
|
6535
|
+
if ((isInitialLoad || routesParams.size === 0) && !window.__reactRouterHdrActive) {
|
|
6529
6536
|
singleFetchDfd.resolve({ routes: {} });
|
|
6530
6537
|
} else {
|
|
6531
6538
|
let targetRoutes = ssr && foundOptOutRoute && routesParams.size > 0 ? [...routesParams.keys()] : void 0;
|
|
@@ -7941,7 +7948,7 @@ function mergeRefs(...refs) {
|
|
|
7941
7948
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
7942
7949
|
try {
|
|
7943
7950
|
if (isBrowser) {
|
|
7944
|
-
window.__reactRouterVersion = "7.5.
|
|
7951
|
+
window.__reactRouterVersion = "7.5.3";
|
|
7945
7952
|
}
|
|
7946
7953
|
} catch (e) {
|
|
7947
7954
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.5.
|
|
2
|
+
* react-router v7.5.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -1444,7 +1444,11 @@ function createRouter(init) {
|
|
|
1444
1444
|
}
|
|
1445
1445
|
return {
|
|
1446
1446
|
matches,
|
|
1447
|
-
pendingActionResult: [
|
|
1447
|
+
pendingActionResult: [
|
|
1448
|
+
boundaryMatch.route.id,
|
|
1449
|
+
result,
|
|
1450
|
+
actionMatch.route.id
|
|
1451
|
+
]
|
|
1448
1452
|
};
|
|
1449
1453
|
}
|
|
1450
1454
|
return {
|
|
@@ -3607,7 +3611,9 @@ function processRouteLoaderData(matches, results, pendingActionResult, isStaticH
|
|
|
3607
3611
|
});
|
|
3608
3612
|
if (pendingError !== void 0 && pendingActionResult) {
|
|
3609
3613
|
errors = { [pendingActionResult[0]]: pendingError };
|
|
3610
|
-
|
|
3614
|
+
if (pendingActionResult[2]) {
|
|
3615
|
+
loaderData[pendingActionResult[2]] = void 0;
|
|
3616
|
+
}
|
|
3611
3617
|
}
|
|
3612
3618
|
return {
|
|
3613
3619
|
loaderData,
|
|
@@ -4982,7 +4988,8 @@ async function singleFetchLoaderNavigationStrategy(args, router2, getRouteInfo,
|
|
|
4982
4988
|
)
|
|
4983
4989
|
);
|
|
4984
4990
|
await Promise.all(routeDfds.map((d) => d.promise));
|
|
4985
|
-
|
|
4991
|
+
let isInitialLoad = !router2.state.initialized && router2.state.navigation.state === "idle";
|
|
4992
|
+
if ((isInitialLoad || routesParams.size === 0) && !window.__reactRouterHdrActive) {
|
|
4986
4993
|
singleFetchDfd.resolve({ routes: {} });
|
|
4987
4994
|
} else {
|
|
4988
4995
|
let targetRoutes = ssr && foundOptOutRoute && routesParams.size > 0 ? [...routesParams.keys()] : void 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.5.
|
|
2
|
+
* react-router v7.5.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
invariant,
|
|
26
26
|
mapRouteProperties,
|
|
27
27
|
useFogOFWarDiscovery
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-AYJ5UCUI.mjs";
|
|
29
29
|
|
|
30
30
|
// lib/dom-export/dom-router-provider.tsx
|
|
31
31
|
import * as React from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.5.
|
|
2
|
+
* react-router v7.5.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -1740,7 +1740,11 @@ function createRouter(init) {
|
|
|
1740
1740
|
}
|
|
1741
1741
|
return {
|
|
1742
1742
|
matches,
|
|
1743
|
-
pendingActionResult: [
|
|
1743
|
+
pendingActionResult: [
|
|
1744
|
+
boundaryMatch.route.id,
|
|
1745
|
+
result,
|
|
1746
|
+
actionMatch.route.id
|
|
1747
|
+
]
|
|
1744
1748
|
};
|
|
1745
1749
|
}
|
|
1746
1750
|
return {
|
|
@@ -4511,7 +4515,9 @@ function processRouteLoaderData(matches, results, pendingActionResult, isStaticH
|
|
|
4511
4515
|
});
|
|
4512
4516
|
if (pendingError !== void 0 && pendingActionResult) {
|
|
4513
4517
|
errors = { [pendingActionResult[0]]: pendingError };
|
|
4514
|
-
|
|
4518
|
+
if (pendingActionResult[2]) {
|
|
4519
|
+
loaderData[pendingActionResult[2]] = void 0;
|
|
4520
|
+
}
|
|
4515
4521
|
}
|
|
4516
4522
|
return {
|
|
4517
4523
|
loaderData,
|
|
@@ -6675,7 +6681,8 @@ async function singleFetchLoaderNavigationStrategy(args, router, getRouteInfo, f
|
|
|
6675
6681
|
)
|
|
6676
6682
|
);
|
|
6677
6683
|
await Promise.all(routeDfds.map((d) => d.promise));
|
|
6678
|
-
|
|
6684
|
+
let isInitialLoad = !router.state.initialized && router.state.navigation.state === "idle";
|
|
6685
|
+
if ((isInitialLoad || routesParams.size === 0) && !window.__reactRouterHdrActive) {
|
|
6679
6686
|
singleFetchDfd.resolve({ routes: {} });
|
|
6680
6687
|
} else {
|
|
6681
6688
|
let targetRoutes = ssr && foundOptOutRoute && routesParams.size > 0 ? [...routesParams.keys()] : void 0;
|
|
@@ -8091,7 +8098,7 @@ function mergeRefs(...refs) {
|
|
|
8091
8098
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
8092
8099
|
try {
|
|
8093
8100
|
if (isBrowser) {
|
|
8094
|
-
window.__reactRouterVersion = "7.5.
|
|
8101
|
+
window.__reactRouterVersion = "7.5.3";
|
|
8095
8102
|
}
|
|
8096
8103
|
} catch (e) {
|
|
8097
8104
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.5.
|
|
2
|
+
* react-router v7.5.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -125,7 +125,7 @@ import {
|
|
|
125
125
|
useSearchParams,
|
|
126
126
|
useSubmit,
|
|
127
127
|
useViewTransitionState
|
|
128
|
-
} from "./chunk-
|
|
128
|
+
} from "./chunk-AYJ5UCUI.mjs";
|
|
129
129
|
export {
|
|
130
130
|
Await,
|
|
131
131
|
BrowserRouter,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.5.
|
|
2
|
+
* react-router v7.5.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -1590,7 +1590,11 @@ function createRouter(init) {
|
|
|
1590
1590
|
}
|
|
1591
1591
|
return {
|
|
1592
1592
|
matches,
|
|
1593
|
-
pendingActionResult: [
|
|
1593
|
+
pendingActionResult: [
|
|
1594
|
+
boundaryMatch.route.id,
|
|
1595
|
+
result,
|
|
1596
|
+
actionMatch.route.id
|
|
1597
|
+
]
|
|
1594
1598
|
};
|
|
1595
1599
|
}
|
|
1596
1600
|
return {
|
|
@@ -4361,7 +4365,9 @@ function processRouteLoaderData(matches, results, pendingActionResult, isStaticH
|
|
|
4361
4365
|
});
|
|
4362
4366
|
if (pendingError !== void 0 && pendingActionResult) {
|
|
4363
4367
|
errors = { [pendingActionResult[0]]: pendingError };
|
|
4364
|
-
|
|
4368
|
+
if (pendingActionResult[2]) {
|
|
4369
|
+
loaderData[pendingActionResult[2]] = void 0;
|
|
4370
|
+
}
|
|
4365
4371
|
}
|
|
4366
4372
|
return {
|
|
4367
4373
|
loaderData,
|
|
@@ -6525,7 +6531,8 @@ async function singleFetchLoaderNavigationStrategy(args, router, getRouteInfo, f
|
|
|
6525
6531
|
)
|
|
6526
6532
|
);
|
|
6527
6533
|
await Promise.all(routeDfds.map((d) => d.promise));
|
|
6528
|
-
|
|
6534
|
+
let isInitialLoad = !router.state.initialized && router.state.navigation.state === "idle";
|
|
6535
|
+
if ((isInitialLoad || routesParams.size === 0) && !window.__reactRouterHdrActive) {
|
|
6529
6536
|
singleFetchDfd.resolve({ routes: {} });
|
|
6530
6537
|
} else {
|
|
6531
6538
|
let targetRoutes = ssr && foundOptOutRoute && routesParams.size > 0 ? [...routesParams.keys()] : void 0;
|
|
@@ -7941,7 +7948,7 @@ function mergeRefs(...refs) {
|
|
|
7941
7948
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
7942
7949
|
try {
|
|
7943
7950
|
if (isBrowser) {
|
|
7944
|
-
window.__reactRouterVersion = "7.5.
|
|
7951
|
+
window.__reactRouterVersion = "7.5.3";
|
|
7945
7952
|
}
|
|
7946
7953
|
} catch (e) {
|
|
7947
7954
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.5.
|
|
2
|
+
* react-router v7.5.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -1444,7 +1444,11 @@ function createRouter(init) {
|
|
|
1444
1444
|
}
|
|
1445
1445
|
return {
|
|
1446
1446
|
matches,
|
|
1447
|
-
pendingActionResult: [
|
|
1447
|
+
pendingActionResult: [
|
|
1448
|
+
boundaryMatch.route.id,
|
|
1449
|
+
result,
|
|
1450
|
+
actionMatch.route.id
|
|
1451
|
+
]
|
|
1448
1452
|
};
|
|
1449
1453
|
}
|
|
1450
1454
|
return {
|
|
@@ -3607,7 +3611,9 @@ function processRouteLoaderData(matches, results, pendingActionResult, isStaticH
|
|
|
3607
3611
|
});
|
|
3608
3612
|
if (pendingError !== void 0 && pendingActionResult) {
|
|
3609
3613
|
errors = { [pendingActionResult[0]]: pendingError };
|
|
3610
|
-
|
|
3614
|
+
if (pendingActionResult[2]) {
|
|
3615
|
+
loaderData[pendingActionResult[2]] = void 0;
|
|
3616
|
+
}
|
|
3611
3617
|
}
|
|
3612
3618
|
return {
|
|
3613
3619
|
loaderData,
|
|
@@ -4982,7 +4988,8 @@ async function singleFetchLoaderNavigationStrategy(args, router2, getRouteInfo,
|
|
|
4982
4988
|
)
|
|
4983
4989
|
);
|
|
4984
4990
|
await Promise.all(routeDfds.map((d) => d.promise));
|
|
4985
|
-
|
|
4991
|
+
let isInitialLoad = !router2.state.initialized && router2.state.navigation.state === "idle";
|
|
4992
|
+
if ((isInitialLoad || routesParams.size === 0) && !window.__reactRouterHdrActive) {
|
|
4986
4993
|
singleFetchDfd.resolve({ routes: {} });
|
|
4987
4994
|
} else {
|
|
4988
4995
|
let targetRoutes = ssr && foundOptOutRoute && routesParams.size > 0 ? [...routesParams.keys()] : void 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.5.
|
|
2
|
+
* react-router v7.5.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
invariant,
|
|
26
26
|
mapRouteProperties,
|
|
27
27
|
useFogOFWarDiscovery
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-KKWFQRUV.mjs";
|
|
29
29
|
|
|
30
30
|
// lib/dom-export/dom-router-provider.tsx
|
|
31
31
|
import * as React from "react";
|
package/dist/production/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.5.
|
|
2
|
+
* react-router v7.5.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -1740,7 +1740,11 @@ function createRouter(init) {
|
|
|
1740
1740
|
}
|
|
1741
1741
|
return {
|
|
1742
1742
|
matches,
|
|
1743
|
-
pendingActionResult: [
|
|
1743
|
+
pendingActionResult: [
|
|
1744
|
+
boundaryMatch.route.id,
|
|
1745
|
+
result,
|
|
1746
|
+
actionMatch.route.id
|
|
1747
|
+
]
|
|
1744
1748
|
};
|
|
1745
1749
|
}
|
|
1746
1750
|
return {
|
|
@@ -4511,7 +4515,9 @@ function processRouteLoaderData(matches, results, pendingActionResult, isStaticH
|
|
|
4511
4515
|
});
|
|
4512
4516
|
if (pendingError !== void 0 && pendingActionResult) {
|
|
4513
4517
|
errors = { [pendingActionResult[0]]: pendingError };
|
|
4514
|
-
|
|
4518
|
+
if (pendingActionResult[2]) {
|
|
4519
|
+
loaderData[pendingActionResult[2]] = void 0;
|
|
4520
|
+
}
|
|
4515
4521
|
}
|
|
4516
4522
|
return {
|
|
4517
4523
|
loaderData,
|
|
@@ -6675,7 +6681,8 @@ async function singleFetchLoaderNavigationStrategy(args, router, getRouteInfo, f
|
|
|
6675
6681
|
)
|
|
6676
6682
|
);
|
|
6677
6683
|
await Promise.all(routeDfds.map((d) => d.promise));
|
|
6678
|
-
|
|
6684
|
+
let isInitialLoad = !router.state.initialized && router.state.navigation.state === "idle";
|
|
6685
|
+
if ((isInitialLoad || routesParams.size === 0) && !window.__reactRouterHdrActive) {
|
|
6679
6686
|
singleFetchDfd.resolve({ routes: {} });
|
|
6680
6687
|
} else {
|
|
6681
6688
|
let targetRoutes = ssr && foundOptOutRoute && routesParams.size > 0 ? [...routesParams.keys()] : void 0;
|
|
@@ -8091,7 +8098,7 @@ function mergeRefs(...refs) {
|
|
|
8091
8098
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
8092
8099
|
try {
|
|
8093
8100
|
if (isBrowser) {
|
|
8094
|
-
window.__reactRouterVersion = "7.5.
|
|
8101
|
+
window.__reactRouterVersion = "7.5.3";
|
|
8095
8102
|
}
|
|
8096
8103
|
} catch (e) {
|
|
8097
8104
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.5.
|
|
2
|
+
* react-router v7.5.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -125,7 +125,7 @@ import {
|
|
|
125
125
|
useSearchParams,
|
|
126
126
|
useSubmit,
|
|
127
127
|
useViewTransitionState
|
|
128
|
-
} from "./chunk-
|
|
128
|
+
} from "./chunk-KKWFQRUV.mjs";
|
|
129
129
|
export {
|
|
130
130
|
Await,
|
|
131
131
|
BrowserRouter,
|