react-router 0.0.0-experimental-e988dc602 → 0.0.0-experimental-d050831b5

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 (50) hide show
  1. package/CHANGELOG.md +89 -0
  2. package/dist/development/{chunk-EUVE7DCV.mjs → chunk-BNM2ILEX.mjs} +1214 -1181
  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 -6135
  6. package/dist/development/dom-export.mjs +6 -3
  7. package/dist/development/index.d.mts +47 -93
  8. package/dist/development/index.d.ts +1904 -221
  9. package/dist/development/index.js +1214 -1190
  10. package/dist/development/index.mjs +2 -19
  11. package/dist/{production/lib/types/route-module.d.mts → development/lib/types/internal.d.mts} +88 -23
  12. package/dist/development/lib/types/{route-module.d.mts → internal.d.ts} +87 -23
  13. package/dist/development/lib/types/{route-module.js → internal.js} +4 -4
  14. package/dist/development/lib/types/{route-module.mjs → internal.mjs} +1 -1
  15. package/dist/development/{fog-of-war-DrUCUQQ-.d.ts → lib-DRnPBLeb.d.mts} +136 -178
  16. package/dist/development/{route-data-BIYebJr3.d.ts → register-BPC2Sp5k.d.ts} +30 -12
  17. package/dist/development/register-e9PGCFx1.d.mts +10 -0
  18. package/dist/{production/route-data-BIYebJr3.d.mts → development/route-data-Wlht-qYx.d.mts} +21 -12
  19. package/dist/production/{chunk-OIBET7ZQ.mjs → chunk-UTVOGZZO.mjs} +1214 -1181
  20. package/dist/production/dom-export.d.mts +2 -2
  21. package/dist/production/dom-export.d.ts +1 -2
  22. package/dist/production/dom-export.js +34 -6135
  23. package/dist/production/dom-export.mjs +6 -3
  24. package/dist/production/index.d.mts +47 -93
  25. package/dist/production/index.d.ts +1904 -221
  26. package/dist/production/index.js +1214 -1190
  27. package/dist/production/index.mjs +2 -19
  28. package/dist/production/lib/types/{route-module.d.ts → internal.d.mts} +88 -23
  29. package/dist/{development/lib/types/route-module.d.ts → production/lib/types/internal.d.ts} +87 -23
  30. package/dist/production/lib/types/{route-module.js → internal.js} +4 -4
  31. package/dist/production/lib/types/{route-module.mjs → internal.mjs} +1 -1
  32. package/dist/production/{fog-of-war-DrUCUQQ-.d.ts → lib-DRnPBLeb.d.mts} +136 -178
  33. package/dist/production/{route-data-BIYebJr3.d.ts → register-BPC2Sp5k.d.ts} +30 -12
  34. package/dist/production/register-e9PGCFx1.d.mts +10 -0
  35. package/dist/{development/route-data-BIYebJr3.d.mts → production/route-data-Wlht-qYx.d.mts} +21 -12
  36. package/package.json +9 -38
  37. package/dist/development/data-CQbyyGzl.d.mts +0 -11
  38. package/dist/development/data-CQbyyGzl.d.ts +0 -11
  39. package/dist/development/fog-of-war-C5L_Yd5M.d.mts +0 -1778
  40. package/dist/development/rsc-export.d.mts +0 -1788
  41. package/dist/development/rsc-export.d.ts +0 -1788
  42. package/dist/development/rsc-export.js +0 -2784
  43. package/dist/development/rsc-export.mjs +0 -2749
  44. package/dist/production/data-CQbyyGzl.d.mts +0 -11
  45. package/dist/production/data-CQbyyGzl.d.ts +0 -11
  46. package/dist/production/fog-of-war-C5L_Yd5M.d.mts +0 -1778
  47. package/dist/production/rsc-export.d.mts +0 -1788
  48. package/dist/production/rsc-export.d.ts +0 -1788
  49. package/dist/production/rsc-export.js +0 -2784
  50. package/dist/production/rsc-export.mjs +0 -2749
package/CHANGELOG.md CHANGED
@@ -1,5 +1,94 @@
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
+
73
+ ## 7.5.3
74
+
75
+ ### Patch Changes
76
+
77
+ - 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))
78
+ - Handle redirects from `clientLoader.hydrate` initial load executions ([#13477](https://github.com/remix-run/react-router/pull/13477))
79
+
80
+ ## 7.5.2
81
+
82
+ ### Patch Changes
83
+
84
+ - Update Single Fetch to also handle the 204 redirects used in `?_data` requests in Remix v2 ([#13364](https://github.com/remix-run/react-router/pull/13364))
85
+
86
+ - This allows applications to return a redirect on `.data` requests from outside the scope of React Router (i.e., an `express`/`hono` middleware)
87
+ - ⚠️ Please note that doing so relies on implementation details that are subject to change without a SemVer major release
88
+ - This is primarily done to ease upgrading to Single Fetch for existing Remix v2 applications, but the recommended way to handle this is redirecting from a route middleware
89
+
90
+ - Adjust approach for Prerendering/SPA Mode via headers ([#13453](https://github.com/remix-run/react-router/pull/13453))
91
+
3
92
  ## 7.5.1
4
93
 
5
94
  ### Patch Changes