react-router 7.9.2-pre.3 → 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 -13
  2. package/dist/development/{chunk-665FWGER.js → chunk-6Z3LVDDH.js} +1 -1
  3. package/dist/{production/chunk-W5PNW5ME.mjs → development/chunk-I3JMK7SU.mjs} +2 -2
  4. package/dist/development/{chunk-2WPYM2VW.mjs → chunk-TMI4QPZX.mjs} +2 -2
  5. package/dist/{production/chunk-NQKLZ2ZX.js → development/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-ADN7TWEK.js → chunk-6XOQCZSJ.js} +1 -1
  17. package/dist/{development/chunk-AQYUIXYF.mjs → production/chunk-DTPYDGNQ.mjs} +2 -2
  18. package/dist/production/{chunk-R53WSUO7.mjs → chunk-WLGOH3FE.mjs} +2 -2
  19. package/dist/{development/chunk-QWBW4WZW.js → production/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,31 +1,29 @@
1
1
  # `react-router`
2
2
 
3
- ## 7.9.2-pre.3
4
-
5
- ## 7.9.2-pre.2
6
-
7
- ## 7.9.2-pre.1
8
-
9
- ### Patch Changes
10
-
11
- - feat: enable full transition support for the rsc router ([#14362](https://github.com/remix-run/react-router/pull/14362))
12
-
13
- ## 7.9.2-pre.0
3
+ ## 7.9.2
14
4
 
15
5
  ### Patch Changes
16
6
 
17
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))
18
8
  - Update `createRoutesStub` to run route middleware
19
9
  - You will need to set the `<RoutesStub future={{ v8_middleware: true }} />` flag to enable the proper `context` type
10
+
20
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))
21
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
22
13
  - If more that 100 paths were included, the cache key would be incomplete and could produce false-positive cache hits
23
14
 
24
- - [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
+
25
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
+
26
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
+
27
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
+
28
25
  - Handle encoded question mark and hash characters in ancestor splat routes ([#14249](https://github.com/remix-run/react-router/pull/14249))
26
+
29
27
  - Fail gracefully on manifest version mismatch logic if `sessionStorage` access is blocked ([#14335](https://github.com/remix-run/react-router/pull/14335))
30
28
 
31
29
  ## 7.9.1
@@ -41,6 +39,7 @@
41
39
  - Stabilize middleware and context APIs. ([#14215](https://github.com/remix-run/react-router/pull/14215))
42
40
 
43
41
  We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use:
42
+
44
43
  - [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider)
45
44
  - [`createContext`](https://reactrouter.com/api/utils/createContext)
46
45
  - `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option
@@ -67,7 +66,7 @@
67
66
 
68
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))
69
68
 
70
- - 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))
71
70
 
72
71
  - Properly escape interpolated param values in `generatePath()` ([#13530](https://github.com/remix-run/react-router/pull/13530))
73
72
 
@@ -116,6 +115,7 @@
116
115
  - Remove dependency on `@types/node` in TypeScript declaration files ([#14059](https://github.com/remix-run/react-router/pull/14059))
117
116
 
118
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
+
119
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
120
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
121
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.
@@ -149,6 +149,7 @@
149
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))
150
150
 
151
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
+
152
153
  - The API has been renamed to `unstable_generateMiddlewareResponse` for clarity
153
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
154
155
  - The `query` version of the API now has a signature of `(query: (r: Request) => Promise<StaticHandlerContext | Response>) => Promise<Response>`
@@ -794,6 +795,7 @@
794
795
  ```
795
796
 
796
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
+
797
799
  - Library mode - `createBrowserRouter(routes, { unstable_getContext })`
798
800
  - Framework mode - `<HydratedRouter unstable_getContext>`
799
801
 
@@ -981,6 +983,7 @@ _No changes_
981
983
  - Remove `future.v7_normalizeFormMethod` future flag ([#11697](https://github.com/remix-run/react-router/pull/11697))
982
984
 
983
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
+
984
987
  - `createCookie`
985
988
  - `createCookieSessionStorage`
986
989
  - `createMemorySessionStorage`
@@ -989,6 +992,7 @@ _No changes_
989
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)
990
993
 
991
994
  Since platform-specific packages no longer need to implement this API, the following low-level APIs have been removed:
995
+
992
996
  - `createCookieFactory`
993
997
  - `createSessionStorageFactory`
994
998
  - `createCookieSessionStorageFactory`
@@ -1144,6 +1148,7 @@ _No changes_
1144
1148
  ```
1145
1149
 
1146
1150
  This initial implementation targets type inference for:
1151
+
1147
1152
  - `Params` : Path parameters from your routing config in `routes.ts` including file-based routing
1148
1153
  - `LoaderData` : Loader data from `loader` and/or `clientLoader` within your route module
1149
1154
  - `ActionData` : Action data from `action` and/or `clientAction` within your route module
@@ -1158,6 +1163,7 @@ _No changes_
1158
1163
  ```
1159
1164
 
1160
1165
  Check out our docs for more:
1166
+
1161
1167
  - [_Explanations > Type Safety_](https://reactrouter.com/dev/guides/explanation/type-safety)
1162
1168
  - [_How-To > Setting up type safety_](https://reactrouter.com/dev/guides/how-to/setting-up-type-safety)
1163
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.3
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.3
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-R53WSUO7.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.3
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.3";
9113
+ "7.9.2";
9114
9114
  }
9115
9115
  } catch (e) {
9116
9116
  }