react-router 7.5.3-pre.0 → 7.6.0-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.
Files changed (40) hide show
  1. package/CHANGELOG.md +58 -1
  2. package/dist/development/{chunk-MKZGATSN.mjs → chunk-RXI6MVY4.mjs} +903 -139
  3. package/dist/development/dom-export.d.mts +2 -2
  4. package/dist/development/dom-export.d.ts +1 -2
  5. package/dist/development/dom-export.js +34 -6102
  6. package/dist/development/dom-export.mjs +6 -3
  7. package/dist/development/index.d.mts +33 -67
  8. package/dist/development/index.d.ts +1893 -197
  9. package/dist/development/index.js +905 -141
  10. package/dist/development/index.mjs +2 -2
  11. package/dist/development/lib/types/route-module.d.mts +1 -2
  12. package/dist/development/lib/types/route-module.d.ts +1 -2
  13. package/dist/development/lib/types/route-module.js +1 -1
  14. package/dist/development/lib/types/route-module.mjs +1 -1
  15. package/dist/{production/fog-of-war-BLArG-qZ.d.ts → development/lib-CCSAGgcP.d.mts} +57 -12
  16. package/dist/{production/route-data-C12CLHiN.d.mts → development/route-data-B9_30zbP.d.ts} +11 -1
  17. package/dist/development/{route-data-C12CLHiN.d.mts → route-data-C6QaL0wu.d.mts} +11 -1
  18. package/dist/production/{chunk-ZGZJR6R3.mjs → chunk-TW7XT4WH.mjs} +903 -139
  19. package/dist/production/dom-export.d.mts +2 -2
  20. package/dist/production/dom-export.d.ts +1 -2
  21. package/dist/production/dom-export.js +34 -6102
  22. package/dist/production/dom-export.mjs +6 -3
  23. package/dist/production/index.d.mts +33 -67
  24. package/dist/production/index.d.ts +1893 -197
  25. package/dist/production/index.js +905 -141
  26. package/dist/production/index.mjs +2 -2
  27. package/dist/production/lib/types/route-module.d.mts +1 -2
  28. package/dist/production/lib/types/route-module.d.ts +1 -2
  29. package/dist/production/lib/types/route-module.js +1 -1
  30. package/dist/production/lib/types/route-module.mjs +1 -1
  31. package/dist/{development/fog-of-war-BLArG-qZ.d.ts → production/lib-CCSAGgcP.d.mts} +57 -12
  32. package/dist/{development/route-data-C12CLHiN.d.ts → production/route-data-B9_30zbP.d.ts} +11 -1
  33. package/dist/production/{route-data-C12CLHiN.d.ts → route-data-C6QaL0wu.d.mts} +11 -1
  34. package/package.json +5 -3
  35. package/dist/development/data-CQbyyGzl.d.mts +0 -11
  36. package/dist/development/data-CQbyyGzl.d.ts +0 -11
  37. package/dist/development/fog-of-war-D2zsXvum.d.mts +0 -1691
  38. package/dist/production/data-CQbyyGzl.d.mts +0 -11
  39. package/dist/production/data-CQbyyGzl.d.ts +0 -11
  40. package/dist/production/fog-of-war-D2zsXvum.d.mts +0 -1691
package/CHANGELOG.md CHANGED
@@ -1,6 +1,63 @@
1
1
  # `react-router`
2
2
 
3
- ## 7.5.3-pre.0
3
+ ## 7.6.0-pre.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
+ - Don't bundle `react-router` in `react-router/dom` CJS export ([#13497](https://github.com/remix-run/react-router/pull/13497))
41
+ - 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))
42
+ - Fix hydration error if a server `loader` returned `undefined` ([#13496](https://github.com/remix-run/react-router/pull/13496))
43
+ - Fix initial load 404 scenarios in data mode ([#13500](https://github.com/remix-run/react-router/pull/13500))
44
+ - Stabilize `useRevalidator`'s `revalidate` function ([#13542](https://github.com/remix-run/react-router/pull/13542))
45
+ - Preserve status code if a `clientAction` throws a `data()` result in framework mode ([#13522](https://github.com/remix-run/react-router/pull/13522))
46
+ - 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))
47
+
48
+ - 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)`
49
+
50
+ - 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))
51
+ - 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))
52
+ - 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))
53
+ - 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))
54
+ - Only render dev warnings in DEV mode ([#13461](https://github.com/remix-run/react-router/pull/13461))
55
+ - UNSTABLE: Fix a few bugs with error bubbling in middleware use-cases ([#13538](https://github.com/remix-run/react-router/pull/13538))
56
+ - Short circuit post-processing on aborted `dataStrategy` requests ([#13521](https://github.com/remix-run/react-router/pull/13521))
57
+
58
+ - This resolves non-user-facing console errors of the form `Cannot read properties of undefined (reading 'result')`
59
+
60
+ ## 7.5.3
4
61
 
5
62
  ### Patch Changes
6
63