react-router 7.1.5 → 7.2.0-pre.1

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 (36) hide show
  1. package/CHANGELOG.md +55 -1
  2. package/dist/development/{chunk-IR6S3I6Y.mjs → chunk-FXE4ZOSB.mjs} +282 -97
  3. package/dist/development/dom-export.d.mts +2 -2
  4. package/dist/development/dom-export.d.ts +2 -2
  5. package/dist/development/dom-export.js +222 -58
  6. package/dist/development/dom-export.mjs +12 -4
  7. package/dist/{production/fog-of-war-CCAcUMgB.d.ts → development/fog-of-war-rn7nVSAv.d.ts} +9 -5
  8. package/dist/development/{fog-of-war-D6dP9JIt.d.mts → fog-of-war-yKFj2vdd.d.mts} +9 -5
  9. package/dist/development/index.d.mts +43 -7
  10. package/dist/development/index.d.ts +43 -7
  11. package/dist/development/index.js +283 -97
  12. package/dist/development/index.mjs +4 -2
  13. package/dist/development/lib/types/route-module.d.mts +3 -1
  14. package/dist/development/lib/types/route-module.d.ts +3 -1
  15. package/dist/development/lib/types/route-module.js +1 -1
  16. package/dist/development/lib/types/route-module.mjs +1 -1
  17. package/dist/development/{route-data-Cq_b5feC.d.ts → route-data-CfLfC_Bh.d.mts} +2 -1
  18. package/dist/{production/route-data-Cq_b5feC.d.mts → development/route-data-CfLfC_Bh.d.ts} +2 -1
  19. package/dist/production/{chunk-JRAGQQ3X.mjs → chunk-3BG6WSY4.mjs} +282 -97
  20. package/dist/production/dom-export.d.mts +2 -2
  21. package/dist/production/dom-export.d.ts +2 -2
  22. package/dist/production/dom-export.js +222 -58
  23. package/dist/production/dom-export.mjs +12 -4
  24. package/dist/{development/fog-of-war-CCAcUMgB.d.ts → production/fog-of-war-rn7nVSAv.d.ts} +9 -5
  25. package/dist/production/{fog-of-war-D6dP9JIt.d.mts → fog-of-war-yKFj2vdd.d.mts} +9 -5
  26. package/dist/production/index.d.mts +43 -7
  27. package/dist/production/index.d.ts +43 -7
  28. package/dist/production/index.js +283 -97
  29. package/dist/production/index.mjs +4 -2
  30. package/dist/production/lib/types/route-module.d.mts +3 -1
  31. package/dist/production/lib/types/route-module.d.ts +3 -1
  32. package/dist/production/lib/types/route-module.js +1 -1
  33. package/dist/production/lib/types/route-module.mjs +1 -1
  34. package/dist/production/{route-data-Cq_b5feC.d.ts → route-data-CfLfC_Bh.d.mts} +2 -1
  35. package/dist/{development/route-data-Cq_b5feC.d.mts → production/route-data-CfLfC_Bh.d.ts} +2 -1
  36. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,59 @@
1
1
  # `react-router`
2
2
 
3
+ ## 7.2.0-pre.1
4
+
5
+ ### Minor Changes
6
+
7
+ - New type-safe `href` utility that guarantees links point to actual paths in your app ([#13012](https://github.com/remix-run/react-router/pull/13012))
8
+
9
+ ```tsx
10
+ import { href } from "react-router";
11
+
12
+ export default function Component() {
13
+ const link = href("/blog/:slug", { slug: "my-first-post" });
14
+ return (
15
+ <main>
16
+ <Link to={href("/products/:id", { id: "asdf" })} />
17
+ <NavLink to={href("/:lang?/about", { lang: "en" })} />
18
+ </main>
19
+ );
20
+ }
21
+ ```
22
+
23
+ ### Patch Changes
24
+
25
+ - Fix typegen for repeated params ([#13012](https://github.com/remix-run/react-router/pull/13012))
26
+
27
+ In React Router, path parameters are keyed by their name.
28
+ So for a path pattern like `/a/:id/b/:id?/c/:id`, the last `:id` will set the value for `id` in `useParams` and the `params` prop.
29
+ For example, `/a/1/b/2/c/3` will result in the value `{ id: 3 }` at runtime.
30
+
31
+ Previously, generated types for params incorrectly modeled repeated params with an array.
32
+ So `/a/1/b/2/c/3` generated a type like `{ id: [1,2,3] }`.
33
+
34
+ To be consistent with runtime behavior, the generated types now correctly model the "last one wins" semantics of path parameters.
35
+ So `/a/1/b/2/c/3` now generates a type like `{ id: 3 }`.
36
+
37
+ ## 7.2.0-pre.0
38
+
39
+ ### Patch Changes
40
+
41
+ - Don't apply Single Fetch revalidation de-optimization when in SPA mode since there is no server HTTP request ([#12948](https://github.com/remix-run/react-router/pull/12948))
42
+ - Add unstable support for splitting route modules in framework mode via `future.unstable_splitRouteModules` ([#11871](https://github.com/remix-run/react-router/pull/11871))
43
+ - Align dev server behavior with static file server behavior when `ssr:false` is set ([#12948](https://github.com/remix-run/react-router/pull/12948))
44
+
45
+ - When no `prerender` config exists, only SSR down to the root `HydrateFallback` (SPA Mode)
46
+ - When a `prerender` config exists but the current path is not prerendered, only SSR down to the root `HydrateFallback` (SPA Fallback)
47
+ - Return a 404 on `.data` requests to non-pre-rendered paths
48
+
49
+ - Improve prefetch performance of CSS side effects in framework mode ([#12889](https://github.com/remix-run/react-router/pull/12889))
50
+ - Disable Lazy Route Discovery for all `ssr:false` apps and not just "SPA Mode" because there is no runtime server to serve the search-param-configured `__manifest` requests ([#12894](https://github.com/remix-run/react-router/pull/12894))
51
+
52
+ - We previously only disabled this for "SPA Mode" which is `ssr:false` and no `prerender` config but we realized it should apply to all `ssr:false` apps, including those prerendering multiple pages
53
+ - In those `prerender` scenarios we would prerender the `/__manifest` file assuming the static file server would serve it but that makes some unneccesary assumptions about the static file server behaviors
54
+
55
+ - Properly handle interrupted manifest requests in lazy route discovery ([#12915](https://github.com/remix-run/react-router/pull/12915))
56
+
3
57
  ## 7.1.5
4
58
 
5
59
  ### Patch Changes
@@ -83,7 +137,7 @@ _No changes_
83
137
  - Collapse `@remix-run/server-runtime` into `react-router`
84
138
  - Collapse `@remix-run/testing` into `react-router`
85
139
 
86
- - Remove single\_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522))
140
+ - Remove single_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522))
87
141
 
88
142
  - Drop support for Node 16, React Router SSR now requires Node 18 or higher ([#11391](https://github.com/remix-run/react-router/pull/11391))
89
143