react-router 7.2.0-pre.5 → 7.2.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 CHANGED
@@ -1,43 +1,6 @@
1
1
  # `react-router`
2
2
 
3
- ## 7.2.0-pre.5
4
-
5
- ### Patch Changes
6
-
7
- - [REMOVE] Fix prerender calls to serverLoader from clientLoader ([#13047](https://github.com/remix-run/react-router/pull/13047))
8
-
9
- ## 7.2.0-pre.4
10
-
11
- ## 7.2.0-pre.3
12
-
13
- ### Patch Changes
14
-
15
- - Add `unstable_SerializesTo` brand type for library authors to register types serializable by React Router's streaming format (`turbo-stream`) ([`ab5b05b02`](https://github.com/remix-run/react-router/commit/ab5b05b02f99f062edb3c536c392197c88eb6c77))
16
-
17
- ## 7.2.0-pre.2
18
-
19
- ### Patch Changes
20
-
21
- - Properly handle revalidations to across a prerender/SPA boundary ([#13021](https://github.com/remix-run/react-router/pull/13021))
22
-
23
- - In "hybrid" applications where some routes are pre-rendered and some are served from a SPA fallback, we need to avoid making `.data` requests if the path wasn't pre-rendered because the request will 404
24
- - We don't know all the pre-rendered paths client-side, however:
25
- - All `loader` data in `ssr:false` mode is static because it's generated at build time
26
- - A route must use a `clientLoader` to do anything dynamic
27
- - Therefore, if a route only has a `loader` and not a `clientLoader`, we disable revalidation by default because there is no new data to retrieve
28
- - We short circuit and skip single fetch `.data` request logic if there are no server loaders with `shouldLoad=true` in our single fetch `dataStrategy`
29
- - This ensures that the route doesn't cause a `.data` request that would 404 after a submission
30
-
31
- - Error at build time in `ssr:false` + `prerender` apps for the edge case scenario of: ([#13021](https://github.com/remix-run/react-router/pull/13021))
32
-
33
- - A parent route has only a `loader` (does not have a `clientLoader`)
34
- - The parent route is pre-rendered
35
- - The parent route has children routes which are not prerendered
36
- - This means that when the child paths are loaded via the SPA fallback, the parent won't have any `loaderData` because there is no server on which to run the `loader`
37
- - This can be resolved by either adding a parent `clientLoader` or pre-rendering the child paths
38
- - If you add a `clientLoader`, calling the `serverLoader()` on non-prerendered paths will throw a 404
39
-
40
- ## 7.2.0-pre.1
3
+ ## 7.2.0
41
4
 
42
5
  ### Minor Changes
43
6
 
@@ -71,12 +34,31 @@
71
34
  To be consistent with runtime behavior, the generated types now correctly model the "last one wins" semantics of path parameters.
72
35
  So `/a/1/b/2/c/3` now generates a type like `{ id: 3 }`.
73
36
 
74
- ## 7.2.0-pre.0
37
+ - 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))
75
38
 
76
- ### Patch Changes
39
+ - Properly handle revalidations to across a prerender/SPA boundary ([#13021](https://github.com/remix-run/react-router/pull/13021))
40
+
41
+ - In "hybrid" applications where some routes are pre-rendered and some are served from a SPA fallback, we need to avoid making `.data` requests if the path wasn't pre-rendered because the request will 404
42
+ - We don't know all the pre-rendered paths client-side, however:
43
+ - All `loader` data in `ssr:false` mode is static because it's generated at build time
44
+ - A route must use a `clientLoader` to do anything dynamic
45
+ - Therefore, if a route only has a `loader` and not a `clientLoader`, we disable revalidation by default because there is no new data to retrieve
46
+ - We short circuit and skip single fetch `.data` request logic if there are no server loaders with `shouldLoad=true` in our single fetch `dataStrategy`
47
+ - This ensures that the route doesn't cause a `.data` request that would 404 after a submission
48
+
49
+ - Error at build time in `ssr:false` + `prerender` apps for the edge case scenario of: ([#13021](https://github.com/remix-run/react-router/pull/13021))
50
+
51
+ - A parent route has only a `loader` (does not have a `clientLoader`)
52
+ - The parent route is pre-rendered
53
+ - The parent route has children routes which are not prerendered
54
+ - This means that when the child paths are loaded via the SPA fallback, the parent won't have any `loaderData` because there is no server on which to run the `loader`
55
+ - This can be resolved by either adding a parent `clientLoader` or pre-rendering the child paths
56
+ - If you add a `clientLoader`, calling the `serverLoader()` on non-prerendered paths will throw a 404
77
57
 
78
- - 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))
79
58
  - Add unstable support for splitting route modules in framework mode via `future.unstable_splitRouteModules` ([#11871](https://github.com/remix-run/react-router/pull/11871))
59
+
60
+ - Add `unstable_SerializesTo` brand type for library authors to register types serializable by React Router's streaming format (`turbo-stream`) ([`ab5b05b02`](https://github.com/remix-run/react-router/commit/ab5b05b02f99f062edb3c536c392197c88eb6c77))
61
+
80
62
  - Align dev server behavior with static file server behavior when `ssr:false` is set ([#12948](https://github.com/remix-run/react-router/pull/12948))
81
63
 
82
64
  - When no `prerender` config exists, only SSR down to the root `HydrateFallback` (SPA Mode)
@@ -84,6 +66,7 @@
84
66
  - Return a 404 on `.data` requests to non-pre-rendered paths
85
67
 
86
68
  - Improve prefetch performance of CSS side effects in framework mode ([#12889](https://github.com/remix-run/react-router/pull/12889))
69
+
87
70
  - 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))
88
71
 
89
72
  - 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
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.2.0-pre.5
2
+ * react-router v7.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -7118,7 +7118,7 @@ function mergeRefs(...refs) {
7118
7118
  var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
7119
7119
  try {
7120
7120
  if (isBrowser) {
7121
- window.__reactRouterVersion = "7.2.0-pre.5";
7121
+ window.__reactRouterVersion = "7.2.0";
7122
7122
  }
7123
7123
  } catch (e) {
7124
7124
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.2.0-pre.5
2
+ * react-router v7.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.2.0-pre.5
2
+ * react-router v7.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -25,7 +25,7 @@ import {
25
25
  matchRoutes,
26
26
  shouldHydrateRouteLoader,
27
27
  useFogOFWarDiscovery
28
- } from "./chunk-FCWNNWGU.mjs";
28
+ } from "./chunk-HA7DTUK3.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.2.0-pre.5
2
+ * react-router v7.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -7264,7 +7264,7 @@ function mergeRefs(...refs) {
7264
7264
  var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
7265
7265
  try {
7266
7266
  if (isBrowser) {
7267
- window.__reactRouterVersion = "7.2.0-pre.5";
7267
+ window.__reactRouterVersion = "7.2.0";
7268
7268
  }
7269
7269
  } catch (e) {
7270
7270
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.2.0-pre.5
2
+ * react-router v7.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -121,7 +121,7 @@ import {
121
121
  useSearchParams,
122
122
  useSubmit,
123
123
  useViewTransitionState
124
- } from "./chunk-FCWNNWGU.mjs";
124
+ } from "./chunk-HA7DTUK3.mjs";
125
125
  export {
126
126
  Await,
127
127
  BrowserRouter,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.2.0-pre.5
2
+ * react-router v7.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.2.0-pre.5
2
+ * react-router v7.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.2.0-pre.5
2
+ * react-router v7.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -7118,7 +7118,7 @@ function mergeRefs(...refs) {
7118
7118
  var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
7119
7119
  try {
7120
7120
  if (isBrowser) {
7121
- window.__reactRouterVersion = "7.2.0-pre.5";
7121
+ window.__reactRouterVersion = "7.2.0";
7122
7122
  }
7123
7123
  } catch (e) {
7124
7124
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.2.0-pre.5
2
+ * react-router v7.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.2.0-pre.5
2
+ * react-router v7.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -25,7 +25,7 @@ import {
25
25
  matchRoutes,
26
26
  shouldHydrateRouteLoader,
27
27
  useFogOFWarDiscovery
28
- } from "./chunk-7XNVUWNN.mjs";
28
+ } from "./chunk-Z4EF7MSU.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.2.0-pre.5
2
+ * react-router v7.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -7264,7 +7264,7 @@ function mergeRefs(...refs) {
7264
7264
  var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
7265
7265
  try {
7266
7266
  if (isBrowser) {
7267
- window.__reactRouterVersion = "7.2.0-pre.5";
7267
+ window.__reactRouterVersion = "7.2.0";
7268
7268
  }
7269
7269
  } catch (e) {
7270
7270
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.2.0-pre.5
2
+ * react-router v7.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -121,7 +121,7 @@ import {
121
121
  useSearchParams,
122
122
  useSubmit,
123
123
  useViewTransitionState
124
- } from "./chunk-7XNVUWNN.mjs";
124
+ } from "./chunk-Z4EF7MSU.mjs";
125
125
  export {
126
126
  Await,
127
127
  BrowserRouter,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.2.0-pre.5
2
+ * react-router v7.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.2.0-pre.5
2
+ * react-router v7.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-router",
3
- "version": "7.2.0-pre.5",
3
+ "version": "7.2.0",
4
4
  "description": "Declarative routing for React",
5
5
  "keywords": [
6
6
  "react",