react-router 7.5.3 → 7.6.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 +70 -0
- package/dist/development/{chunk-AYJ5UCUI.mjs → chunk-D4RADZKF.mjs} +903 -139
- package/dist/development/dom-export.d.mts +2 -2
- package/dist/development/dom-export.d.ts +1 -2
- package/dist/development/dom-export.js +34 -6102
- package/dist/development/dom-export.mjs +6 -3
- package/dist/development/index.d.mts +33 -67
- package/dist/development/index.d.ts +1893 -197
- package/dist/development/index.js +905 -141
- package/dist/development/index.mjs +2 -2
- package/dist/development/lib/types/route-module.d.mts +1 -2
- package/dist/development/lib/types/route-module.d.ts +1 -2
- package/dist/development/lib/types/route-module.js +1 -1
- package/dist/development/lib/types/route-module.mjs +1 -1
- package/dist/{production/fog-of-war-BLArG-qZ.d.ts → development/lib-CCSAGgcP.d.mts} +57 -12
- package/dist/{production/route-data-C12CLHiN.d.mts → development/route-data-B9_30zbP.d.ts} +11 -1
- package/dist/development/{route-data-C12CLHiN.d.mts → route-data-C6QaL0wu.d.mts} +11 -1
- package/dist/production/{chunk-KKWFQRUV.mjs → chunk-CVXGOGHQ.mjs} +903 -139
- package/dist/production/dom-export.d.mts +2 -2
- package/dist/production/dom-export.d.ts +1 -2
- package/dist/production/dom-export.js +34 -6102
- package/dist/production/dom-export.mjs +6 -3
- package/dist/production/index.d.mts +33 -67
- package/dist/production/index.d.ts +1893 -197
- package/dist/production/index.js +905 -141
- package/dist/production/index.mjs +2 -2
- package/dist/production/lib/types/route-module.d.mts +1 -2
- package/dist/production/lib/types/route-module.d.ts +1 -2
- package/dist/production/lib/types/route-module.js +1 -1
- package/dist/production/lib/types/route-module.mjs +1 -1
- package/dist/{development/fog-of-war-BLArG-qZ.d.ts → production/lib-CCSAGgcP.d.mts} +57 -12
- package/dist/{development/route-data-C12CLHiN.d.ts → production/route-data-B9_30zbP.d.ts} +11 -1
- package/dist/production/{route-data-C12CLHiN.d.ts → route-data-C6QaL0wu.d.mts} +11 -1
- package/package.json +5 -3
- package/dist/development/data-CQbyyGzl.d.mts +0 -11
- package/dist/development/data-CQbyyGzl.d.ts +0 -11
- package/dist/development/fog-of-war-D2zsXvum.d.mts +0 -1691
- package/dist/production/data-CQbyyGzl.d.mts +0 -11
- package/dist/production/data-CQbyyGzl.d.ts +0 -11
- package/dist/production/fog-of-war-D2zsXvum.d.mts +0 -1691
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,75 @@
|
|
|
1
1
|
# `react-router`
|
|
2
2
|
|
|
3
|
+
## 7.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Added a new `react-router.config.ts` `routeDiscovery` option to configure Lazy Route Discovery behavior. ([#13451](https://github.com/remix-run/react-router/pull/13451))
|
|
8
|
+
|
|
9
|
+
- By default, Lazy Route Discovery is enabled and makes manifest requests to the `/__manifest` path:
|
|
10
|
+
- `routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" }`
|
|
11
|
+
- You can modify the manifest path used:
|
|
12
|
+
- `routeDiscovery: { mode: "lazy", manifestPath: "/custom-manifest" }`
|
|
13
|
+
- Or you can disable this feature entirely and include all routes in the manifest on initial document load:
|
|
14
|
+
- `routeDiscovery: { mode: "initial" }`
|
|
15
|
+
|
|
16
|
+
- Add support for route component props in `createRoutesStub`. This allows you to unit test your route components using the props instead of the hooks: ([#13528](https://github.com/remix-run/react-router/pull/13528))
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
let RoutesStub = createRoutesStub([
|
|
20
|
+
{
|
|
21
|
+
path: "/",
|
|
22
|
+
Component({ loaderData }) {
|
|
23
|
+
let data = loaderData as { message: string };
|
|
24
|
+
return <pre data-testid="data">Message: {data.message}</pre>;
|
|
25
|
+
},
|
|
26
|
+
loader() {
|
|
27
|
+
return { message: "hello" };
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
]);
|
|
31
|
+
|
|
32
|
+
render(<RoutesStub />);
|
|
33
|
+
|
|
34
|
+
await waitFor(() => screen.findByText("Message: hello"));
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- Fix `react-router` module augmentation for `NodeNext` ([#13498](https://github.com/remix-run/react-router/pull/13498))
|
|
40
|
+
|
|
41
|
+
- Don't bundle `react-router` in `react-router/dom` CJS export ([#13497](https://github.com/remix-run/react-router/pull/13497))
|
|
42
|
+
|
|
43
|
+
- Fix bug where a submitting `fetcher` would get stuck in a `loading` state if a revalidating `loader` redirected ([#12873](https://github.com/remix-run/react-router/pull/12873))
|
|
44
|
+
|
|
45
|
+
- Fix hydration error if a server `loader` returned `undefined` ([#13496](https://github.com/remix-run/react-router/pull/13496))
|
|
46
|
+
|
|
47
|
+
- Fix initial load 404 scenarios in data mode ([#13500](https://github.com/remix-run/react-router/pull/13500))
|
|
48
|
+
|
|
49
|
+
- Stabilize `useRevalidator`'s `revalidate` function ([#13542](https://github.com/remix-run/react-router/pull/13542))
|
|
50
|
+
|
|
51
|
+
- Preserve status code if a `clientAction` throws a `data()` result in framework mode ([#13522](https://github.com/remix-run/react-router/pull/13522))
|
|
52
|
+
|
|
53
|
+
- Be defensive against leading double slashes in paths to avoid `Invalid URL` errors from the URL constructor ([#13510](https://github.com/remix-run/react-router/pull/13510))
|
|
54
|
+
|
|
55
|
+
- Note we do not sanitize/normalize these paths - we only detect them so we can avoid the error that would be thrown by `new URL("//", window.location.origin)`
|
|
56
|
+
|
|
57
|
+
- Remove `Navigator` declaration for `navigator.connection.saveData` to avoid messing with any other types beyond `saveData` in userland ([#13512](https://github.com/remix-run/react-router/pull/13512))
|
|
58
|
+
|
|
59
|
+
- Fix `handleError` `params` values on `.data` requests for routes with a dynamic param as the last URL segment ([#13481](https://github.com/remix-run/react-router/pull/13481))
|
|
60
|
+
|
|
61
|
+
- Don't trigger an `ErrorBoundary` UI before the reload when we detect a manifest verison mismatch in Lazy Route Discovery ([#13480](https://github.com/remix-run/react-router/pull/13480))
|
|
62
|
+
|
|
63
|
+
- Inline `turbo-stream@2.4.1` dependency and fix decoding ordering of Map/Set instances ([#13518](https://github.com/remix-run/react-router/pull/13518))
|
|
64
|
+
|
|
65
|
+
- Only render dev warnings in DEV mode ([#13461](https://github.com/remix-run/react-router/pull/13461))
|
|
66
|
+
|
|
67
|
+
- UNSTABLE: Fix a few bugs with error bubbling in middleware use-cases ([#13538](https://github.com/remix-run/react-router/pull/13538))
|
|
68
|
+
|
|
69
|
+
- Short circuit post-processing on aborted `dataStrategy` requests ([#13521](https://github.com/remix-run/react-router/pull/13521))
|
|
70
|
+
|
|
71
|
+
- This resolves non-user-facing console errors of the form `Cannot read properties of undefined (reading 'result')`
|
|
72
|
+
|
|
3
73
|
## 7.5.3
|
|
4
74
|
|
|
5
75
|
### Patch Changes
|