react-router 7.9.2-pre.2 → 7.9.2

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 (30) hide show
  1. package/CHANGELOG.md +19 -11
  2. package/dist/development/{chunk-BMRATXNU.js → chunk-6Z3LVDDH.js} +1 -1
  3. package/dist/{production/chunk-54D6QT34.mjs → development/chunk-I3JMK7SU.mjs} +2 -2
  4. package/dist/development/{chunk-IM5OGALA.mjs → chunk-TMI4QPZX.mjs} +2 -2
  5. package/dist/development/{chunk-CVJRSTVH.js → chunk-VJDS7KU2.js} +134 -134
  6. package/dist/development/dom-export.js +3 -3
  7. package/dist/development/dom-export.mjs +3 -3
  8. package/dist/development/index-react-server-client.js +4 -4
  9. package/dist/development/index-react-server-client.mjs +2 -2
  10. package/dist/development/index-react-server.js +1 -1
  11. package/dist/development/index-react-server.mjs +1 -1
  12. package/dist/development/index.js +97 -97
  13. package/dist/development/index.mjs +3 -3
  14. package/dist/development/lib/types/internal.js +1 -1
  15. package/dist/development/lib/types/internal.mjs +1 -1
  16. package/dist/production/{chunk-JZBSSDER.js → chunk-6XOQCZSJ.js} +1 -1
  17. package/dist/{development/chunk-Z2FQBQSH.mjs → production/chunk-DTPYDGNQ.mjs} +2 -2
  18. package/dist/production/{chunk-QE6DSGL5.mjs → chunk-WLGOH3FE.mjs} +2 -2
  19. package/dist/production/{chunk-MZDKBHOP.js → chunk-Y7UMYKHT.js} +134 -134
  20. package/dist/production/dom-export.js +3 -3
  21. package/dist/production/dom-export.mjs +3 -3
  22. package/dist/production/index-react-server-client.js +4 -4
  23. package/dist/production/index-react-server-client.mjs +2 -2
  24. package/dist/production/index-react-server.js +1 -1
  25. package/dist/production/index-react-server.mjs +1 -1
  26. package/dist/production/index.js +97 -97
  27. package/dist/production/index.mjs +3 -3
  28. package/dist/production/lib/types/internal.js +1 -1
  29. package/dist/production/lib/types/internal.mjs +1 -1
  30. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,29 +1,29 @@
1
1
  # `react-router`
2
2
 
3
- ## 7.9.2-pre.2
4
-
5
- ## 7.9.2-pre.1
6
-
7
- ### Patch Changes
8
-
9
- - feat: enable full transition support for the rsc router ([#14362](https://github.com/remix-run/react-router/pull/14362))
10
-
11
- ## 7.9.2-pre.0
3
+ ## 7.9.2
12
4
 
13
5
  ### Patch Changes
14
6
 
15
7
  - - Update client-side router to run client `middleware` on initial load even if no loaders exist ([#14348](https://github.com/remix-run/react-router/pull/14348))
16
8
  - Update `createRoutesStub` to run route middleware
17
9
  - You will need to set the `<RoutesStub future={{ v8_middleware: true }} />` flag to enable the proper `context` type
10
+
18
11
  - Update Lazy Route Discovery manifest requests to use a singular comma-separated `paths` query param instead of repeated `p` query params ([#14321](https://github.com/remix-run/react-router/pull/14321))
19
12
  - This is because Cloudflare has a hard limit of 100 URL search param key/value pairs when used as a key for caching purposes
20
13
  - If more that 100 paths were included, the cache key would be incomplete and could produce false-positive cache hits
21
14
 
22
- - [UNSTABLE] Add `fetcher.unstable_reset()` API ([#14206](https://github.com/remix-run/react-router/pull/14206))
15
+ - \[UNSTABLE] Add `fetcher.unstable_reset()` API ([#14206](https://github.com/remix-run/react-router/pull/14206))
16
+
23
17
  - Made useOutlet element reference have stable identity in-between route chages ([#13382](https://github.com/remix-run/react-router/pull/13382))
18
+
19
+ - feat: enable full transition support for the rsc router ([#14362](https://github.com/remix-run/react-router/pull/14362))
20
+
24
21
  - In RSC Data Mode, handle SSR'd client errors and re-try in the browser ([#14342](https://github.com/remix-run/react-router/pull/14342))
22
+
25
23
  - Support `middleware` prop on `<Route>` for usage with a data router via `createRoutesFromElements` ([#14357](https://github.com/remix-run/react-router/pull/14357))
24
+
26
25
  - Handle encoded question mark and hash characters in ancestor splat routes ([#14249](https://github.com/remix-run/react-router/pull/14249))
26
+
27
27
  - Fail gracefully on manifest version mismatch logic if `sessionStorage` access is blocked ([#14335](https://github.com/remix-run/react-router/pull/14335))
28
28
 
29
29
  ## 7.9.1
@@ -39,6 +39,7 @@
39
39
  - Stabilize middleware and context APIs. ([#14215](https://github.com/remix-run/react-router/pull/14215))
40
40
 
41
41
  We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use:
42
+
42
43
  - [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider)
43
44
  - [`createContext`](https://reactrouter.com/api/utils/createContext)
44
45
  - `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option
@@ -65,7 +66,7 @@
65
66
 
66
67
  - \[UNSTABLE] Add `<RouterProvider unstable_onError>`/`<HydratedRouter unstable_onError>` prop for client side error reporting ([#14162](https://github.com/remix-run/react-router/pull/14162))
67
68
 
68
- - server action revalidation opt out via $SKIP_REVALIDATION field ([#14154](https://github.com/remix-run/react-router/pull/14154))
69
+ - server action revalidation opt out via $SKIP\_REVALIDATION field ([#14154](https://github.com/remix-run/react-router/pull/14154))
69
70
 
70
71
  - Properly escape interpolated param values in `generatePath()` ([#13530](https://github.com/remix-run/react-router/pull/13530))
71
72
 
@@ -114,6 +115,7 @@
114
115
  - Remove dependency on `@types/node` in TypeScript declaration files ([#14059](https://github.com/remix-run/react-router/pull/14059))
115
116
 
116
117
  - Fix types for `UIMatch` to reflect that the `loaderData`/`data` properties may be `undefined` ([#12206](https://github.com/remix-run/react-router/pull/12206))
118
+
117
119
  - When an `ErrorBoundary` is being rendered, not all active matches will have loader data available, since it may have been their `loader` that threw to trigger the boundary
118
120
  - The `UIMatch.data` type was not correctly handing this and would always reflect the presence of data, leading to the unexpected runtime errors when an `ErrorBoundary` was rendered
119
121
  - ⚠️ This may cause some type errors to show up in your code for unguarded `match.data` accesses - you should properly guard for `undefined` values in those scenarios.
@@ -147,6 +149,7 @@
147
149
  - \[UNSTABLE] When middleware is enabled, make the `context` parameter read-only (via `Readonly<unstable_RouterContextProvider>`) so that TypeScript will not allow you to write arbitrary fields to it in loaders, actions, or middleware. ([#14097](https://github.com/remix-run/react-router/pull/14097))
148
150
 
149
151
  - \[UNSTABLE] Rename and alter the signature/functionality of the `unstable_respond` API in `staticHandler.query`/`staticHandler.queryRoute` ([#14103](https://github.com/remix-run/react-router/pull/14103))
152
+
150
153
  - The API has been renamed to `unstable_generateMiddlewareResponse` for clarity
151
154
  - The main functional change is that instead of running the loaders/actions before calling `unstable_respond` and handing you the result, we now pass a `query`/`queryRoute` function as a parameter and you execute the loaders/actions inside your callback, giving you full access to pre-processing and error handling
152
155
  - The `query` version of the API now has a signature of `(query: (r: Request) => Promise<StaticHandlerContext | Response>) => Promise<Response>`
@@ -792,6 +795,7 @@
792
795
  ```
793
796
 
794
797
  Similar to server-side requests, a fresh `context` will be created per navigation (or `fetcher` call). If you have initial data you'd like to populate in the context for every request, you can provide an `unstable_getContext` function at the root of your app:
798
+
795
799
  - Library mode - `createBrowserRouter(routes, { unstable_getContext })`
796
800
  - Framework mode - `<HydratedRouter unstable_getContext>`
797
801
 
@@ -979,6 +983,7 @@ _No changes_
979
983
  - Remove `future.v7_normalizeFormMethod` future flag ([#11697](https://github.com/remix-run/react-router/pull/11697))
980
984
 
981
985
  - For Remix consumers migrating to React Router, the `crypto` global from the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) is now required when using cookie and session APIs. This means that the following APIs are provided from `react-router` rather than platform-specific packages: ([#11837](https://github.com/remix-run/react-router/pull/11837))
986
+
982
987
  - `createCookie`
983
988
  - `createCookieSessionStorage`
984
989
  - `createMemorySessionStorage`
@@ -987,6 +992,7 @@ _No changes_
987
992
  For consumers running older versions of Node, the `installGlobals` function from `@remix-run/node` has been updated to define `globalThis.crypto`, using [Node's `require('node:crypto').webcrypto` implementation.](https://nodejs.org/api/webcrypto.html)
988
993
 
989
994
  Since platform-specific packages no longer need to implement this API, the following low-level APIs have been removed:
995
+
990
996
  - `createCookieFactory`
991
997
  - `createSessionStorageFactory`
992
998
  - `createCookieSessionStorageFactory`
@@ -1142,6 +1148,7 @@ _No changes_
1142
1148
  ```
1143
1149
 
1144
1150
  This initial implementation targets type inference for:
1151
+
1145
1152
  - `Params` : Path parameters from your routing config in `routes.ts` including file-based routing
1146
1153
  - `LoaderData` : Loader data from `loader` and/or `clientLoader` within your route module
1147
1154
  - `ActionData` : Action data from `action` and/or `clientAction` within your route module
@@ -1156,6 +1163,7 @@ _No changes_
1156
1163
  ```
1157
1164
 
1158
1165
  Check out our docs for more:
1166
+
1159
1167
  - [_Explanations > Type Safety_](https://reactrouter.com/dev/guides/explanation/type-safety)
1160
1168
  - [_How-To > Setting up type safety_](https://reactrouter.com/dev/guides/how-to/setting-up-type-safety)
1161
1169
 
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }/**
2
- * react-router v7.9.2-pre.2
2
+ * react-router v7.9.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.9.2-pre.2
2
+ * react-router v7.9.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -60,7 +60,7 @@ import {
60
60
  withComponentProps,
61
61
  withErrorBoundaryProps,
62
62
  withHydrateFallbackProps
63
- } from "./chunk-QE6DSGL5.mjs";
63
+ } from "./chunk-TMI4QPZX.mjs";
64
64
 
65
65
  // lib/dom/ssr/server.tsx
66
66
  import * as React from "react";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.9.2-pre.2
2
+ * react-router v7.9.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -9110,7 +9110,7 @@ var isBrowser = typeof window !== "undefined" && typeof window.document !== "und
9110
9110
  try {
9111
9111
  if (isBrowser) {
9112
9112
  window.__reactRouterVersion = // @ts-expect-error
9113
- "7.9.2-pre.2";
9113
+ "7.9.2";
9114
9114
  }
9115
9115
  } catch (e) {
9116
9116
  }