react-router 7.15.1 → 7.18.5
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 +73 -2
- package/dist/development/{browser-BOdXz9dK.d.ts → browser-7x6a6gQP.d.ts} +2 -2
- package/dist/development/{browser-3AnU12UI.d.mts → browser-CiGxXXOl.d.mts} +2 -2
- package/dist/development/{chunk-D6LUOGOQ.js → chunk-2ZBLYC7V.js} +265 -57
- package/dist/development/{chunk-4N6VE7H7.mjs → chunk-6KYCQHYJ.mjs} +268 -60
- package/dist/{production/chunk-Y6IFXO7V.js → development/chunk-IFHLIXZW.js} +7 -7
- package/dist/development/{chunk-RJYABSBD.mjs → chunk-JAHXRPFV.mjs} +71 -122
- package/dist/development/{chunk-66UKHEGQ.js → chunk-NDF5KBLP.js} +112 -108
- package/dist/{production/context-ByvtofY2.d.mts → development/context-BlYKn1tE.d.mts} +24 -5
- package/dist/development/{data-BqZ2x964.d.ts → data-CjO11-hU.d.ts} +10 -2
- package/dist/{production/data-BVUf681J.d.mts → development/data-DEjBmEfD.d.mts} +10 -2
- package/dist/development/dom-export.d.mts +4 -4
- package/dist/development/dom-export.d.ts +4 -4
- package/dist/development/dom-export.js +61 -46
- package/dist/development/dom-export.mjs +39 -24
- package/dist/{production/index-react-server-client-BS5F89FR.d.ts → development/index-react-server-client-BaaZU3sM.d.ts} +32 -9
- package/dist/{production/index-react-server-client-DY04-103.d.mts → development/index-react-server-client-KK-TR-t7.d.mts} +20 -6
- package/dist/development/index-react-server-client.d.mts +3 -3
- package/dist/development/index-react-server-client.d.ts +3 -3
- package/dist/development/index-react-server-client.js +4 -4
- package/dist/development/index-react-server-client.mjs +2 -2
- package/dist/development/index-react-server.d.mts +20 -2
- package/dist/development/index-react-server.d.ts +20 -2
- package/dist/development/index-react-server.js +212 -144
- package/dist/development/index-react-server.mjs +211 -143
- package/dist/development/index.d.mts +22 -15
- package/dist/development/index.d.ts +22 -15
- package/dist/development/index.js +160 -211
- package/dist/development/index.mjs +3 -5
- package/dist/{production/instrumentation-cRWWLfsU.d.ts → development/instrumentation-CPkMwccd.d.ts} +12 -2
- package/dist/development/lib/types/internal.d.mts +2 -2
- package/dist/development/lib/types/internal.d.ts +2 -2
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/development/{register-Df8okEea.d.mts → register-CmkRspdl.d.mts} +1 -1
- package/dist/development/{register-Bsscfj79.d.ts → register-roq_0qYo.d.ts} +1 -1
- package/dist/production/{browser-BOdXz9dK.d.ts → browser-7x6a6gQP.d.ts} +2 -2
- package/dist/production/{browser-3AnU12UI.d.mts → browser-CiGxXXOl.d.mts} +2 -2
- package/dist/production/{chunk-PNZCCTKT.js → chunk-75HN637G.js} +112 -108
- package/dist/production/{chunk-JAKZPQZC.mjs → chunk-7RTFRKQW.mjs} +268 -60
- package/dist/production/{chunk-HUBUW7R3.js → chunk-HNBICOIU.js} +265 -57
- package/dist/production/{chunk-6S4627ZB.mjs → chunk-IAM5GYT3.mjs} +71 -122
- package/dist/{development/chunk-4YRVXM2U.js → production/chunk-K3NA4NUH.js} +7 -7
- package/dist/{development/context-ByvtofY2.d.mts → production/context-BlYKn1tE.d.mts} +24 -5
- package/dist/production/{data-BqZ2x964.d.ts → data-CjO11-hU.d.ts} +10 -2
- package/dist/{development/data-BVUf681J.d.mts → production/data-DEjBmEfD.d.mts} +10 -2
- package/dist/production/dom-export.d.mts +4 -4
- package/dist/production/dom-export.d.ts +4 -4
- package/dist/production/dom-export.js +61 -46
- package/dist/production/dom-export.mjs +39 -24
- package/dist/{development/index-react-server-client-BS5F89FR.d.ts → production/index-react-server-client-BaaZU3sM.d.ts} +32 -9
- package/dist/{development/index-react-server-client-DY04-103.d.mts → production/index-react-server-client-KK-TR-t7.d.mts} +20 -6
- package/dist/production/index-react-server-client.d.mts +3 -3
- package/dist/production/index-react-server-client.d.ts +3 -3
- package/dist/production/index-react-server-client.js +4 -4
- package/dist/production/index-react-server-client.mjs +2 -2
- package/dist/production/index-react-server.d.mts +20 -2
- package/dist/production/index-react-server.d.ts +20 -2
- package/dist/production/index-react-server.js +212 -144
- package/dist/production/index-react-server.mjs +211 -143
- package/dist/production/index.d.mts +22 -15
- package/dist/production/index.d.ts +22 -15
- package/dist/production/index.js +160 -211
- package/dist/production/index.mjs +3 -5
- package/dist/{development/instrumentation-cRWWLfsU.d.ts → production/instrumentation-CPkMwccd.d.ts} +12 -2
- package/dist/production/lib/types/internal.d.mts +2 -2
- package/dist/production/lib/types/internal.d.ts +2 -2
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/production/{register-Df8okEea.d.mts → register-CmkRspdl.d.mts} +1 -1
- package/dist/production/{register-Bsscfj79.d.ts → register-roq_0qYo.d.ts} +1 -1
- package/docs/explanation/backend-for-frontend.md +50 -0
- package/docs/explanation/code-splitting.md +61 -0
- package/docs/explanation/concurrency.md +135 -0
- package/docs/explanation/form-vs-fetcher.md +292 -0
- package/docs/explanation/hot-module-replacement.md +137 -0
- package/docs/explanation/hydration.md +14 -0
- package/docs/explanation/index-query-param.md +86 -0
- package/docs/explanation/index.md +4 -0
- package/docs/explanation/lazy-route-discovery.md +78 -0
- package/docs/explanation/location.md +6 -0
- package/docs/explanation/progressive-enhancement.md +150 -0
- package/docs/explanation/race-conditions.md +88 -0
- package/docs/explanation/react-transitions.md +160 -0
- package/docs/explanation/route-matching.md +7 -0
- package/docs/explanation/server-client-execution.md +4 -0
- package/docs/explanation/sessions-and-cookies.md +465 -0
- package/docs/explanation/special-files.md +16 -0
- package/docs/explanation/state-management.md +524 -0
- package/docs/explanation/styling.md +87 -0
- package/docs/explanation/type-safety.md +82 -0
- package/docs/how-to/accessibility.md +44 -0
- package/docs/how-to/client-data.md +199 -0
- package/docs/how-to/data-strategy.md +317 -0
- package/docs/how-to/error-boundary.md +231 -0
- package/docs/how-to/error-reporting.md +142 -0
- package/docs/how-to/fetchers.md +307 -0
- package/docs/how-to/file-route-conventions.md +410 -0
- package/docs/how-to/file-uploads.md +217 -0
- package/docs/how-to/form-validation.md +120 -0
- package/docs/how-to/headers.md +165 -0
- package/docs/how-to/index.md +4 -0
- package/docs/how-to/instrumentation.md +556 -0
- package/docs/how-to/meta.md +40 -0
- package/docs/how-to/middleware.md +763 -0
- package/docs/how-to/navigation-blocking.md +233 -0
- package/docs/how-to/optimize-revalidation.md +12 -0
- package/docs/how-to/pre-rendering.md +225 -0
- package/docs/how-to/presets.md +103 -0
- package/docs/how-to/react-server-components.md +899 -0
- package/docs/how-to/resource-routes.md +126 -0
- package/docs/how-to/route-module-type-safety.md +100 -0
- package/docs/how-to/search-params.md +4 -0
- package/docs/how-to/security.md +32 -0
- package/docs/how-to/server-bundles.md +66 -0
- package/docs/how-to/spa.md +120 -0
- package/docs/how-to/status.md +63 -0
- package/docs/how-to/suspense.md +132 -0
- package/docs/how-to/using-handle.md +117 -0
- package/docs/how-to/view-transitions.md +237 -0
- package/docs/how-to/webhook.md +50 -0
- package/docs/index.md +39 -0
- package/docs/start/data/actions.md +138 -0
- package/docs/start/data/custom.md +198 -0
- package/docs/start/data/data-loading.md +44 -0
- package/docs/start/data/index.md +4 -0
- package/docs/start/data/installation.md +56 -0
- package/docs/start/data/navigating.md +12 -0
- package/docs/start/data/pending-ui.md +12 -0
- package/docs/start/data/route-object.md +268 -0
- package/docs/start/data/routing.md +281 -0
- package/docs/start/data/testing.md +8 -0
- package/docs/start/declarative/index.md +4 -0
- package/docs/start/declarative/installation.md +43 -0
- package/docs/start/declarative/navigating.md +133 -0
- package/docs/start/declarative/routing.md +237 -0
- package/docs/start/declarative/url-values.md +65 -0
- package/docs/start/framework/actions.md +174 -0
- package/docs/start/framework/data-loading.md +201 -0
- package/docs/start/framework/deploying.md +100 -0
- package/docs/start/framework/index.md +4 -0
- package/docs/start/framework/installation.md +41 -0
- package/docs/start/framework/navigating.md +182 -0
- package/docs/start/framework/pending-ui.md +142 -0
- package/docs/start/framework/rendering.md +59 -0
- package/docs/start/framework/route-module.md +527 -0
- package/docs/start/framework/routing.md +362 -0
- package/docs/start/framework/testing.md +133 -0
- package/docs/start/index.md +4 -0
- package/docs/start/modes.md +201 -0
- package/docs/upgrading/component-routes.md +363 -0
- package/docs/upgrading/future.md +490 -0
- package/docs/upgrading/index.md +4 -0
- package/docs/upgrading/remix.md +403 -0
- package/docs/upgrading/router-provider.md +442 -0
- package/docs/upgrading/v6.md +382 -0
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,77 @@
|
|
|
1
1
|
# `react-router`
|
|
2
2
|
|
|
3
|
+
## v7.18.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Bound route manifest processing during server rendering and RSC document/data requests by falling back to initial route discovery for paths with expensive ancestor expansion, accounting for the number and depth of candidate branches when using regex matching ([#15704](https://github.com/remix-run/react-router/pull/15704))
|
|
8
|
+
- Improve turbo-stream decoding validation and object property handling ([d7223c0](https://github.com/remix-run/react-router/commit/d7223c0))
|
|
9
|
+
|
|
10
|
+
## v7.18.4
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Correctly escape streamed RSC redirect locations in meta tag attributes ([#15492](https://github.com/remix-run/react-router/pull/15492))
|
|
15
|
+
- Avoid unintended `document.startViewTransition` calls during initial hydration and `router.revalidate()` calls ([#15485](https://github.com/remix-run/react-router/pull/15485))
|
|
16
|
+
|
|
17
|
+
## v7.18.3
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Improve route matching performance for long paths ([#15423](https://github.com/remix-run/react-router/pull/15423))
|
|
22
|
+
- Improve validation of action request origins ([#15420](https://github.com/remix-run/react-router/pull/15420))
|
|
23
|
+
- Add additional URL validation on client side navigations/redirects ([#15446](https://github.com/remix-run/react-router/pull/15446))
|
|
24
|
+
|
|
25
|
+
## v7.18.2
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- Harden RSC CSRF codepaths. ([#15353](https://github.com/remix-run/react-router/pull/15353))
|
|
30
|
+
|
|
31
|
+
## v7.18.1
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- _No changes_
|
|
36
|
+
|
|
37
|
+
## v7.18.0
|
|
38
|
+
|
|
39
|
+
### Patch Changes
|
|
40
|
+
|
|
41
|
+
- Fix server handler prerender responses when using `ssr: false` and `future.v8_trailingSlashAwareDataRequests: true`. Avoids false positive "SPA Mode" detection when serving prerendered paths ([#15173](https://github.com/remix-run/react-router/pull/15173))
|
|
42
|
+
- Use the `ServerRouter` nonce for nonce-aware SSR components when they don't provide their own value so strict CSP pages can load them. ([#15170](https://github.com/remix-run/react-router/pull/15170))
|
|
43
|
+
- Use `turbo-stream` to serialize and deserialize Framework Mode hydration errors ([#15175](https://github.com/remix-run/react-router/pull/15175))
|
|
44
|
+
- Precompute route branch matchers to avoid recompiling route path regexes during matching ([#15186](https://github.com/remix-run/react-router/pull/15186))
|
|
45
|
+
- Use the constructed request URL host when validating action request origins. ([#15185](https://github.com/remix-run/react-router/pull/15185))
|
|
46
|
+
- Remove the un-documented custom error serialization logic from Data Mode SSR built-in hydration flows ([#15175](https://github.com/remix-run/react-router/pull/15175))
|
|
47
|
+
- Validate protocols in RSC render redirects ([#15177](https://github.com/remix-run/react-router/pull/15177))
|
|
48
|
+
- Consolidate url normalization logic and better handle mixed slashes ([#15176](https://github.com/remix-run/react-router/pull/15176))
|
|
49
|
+
|
|
50
|
+
## v7.17.0
|
|
51
|
+
|
|
52
|
+
### Minor Changes
|
|
53
|
+
|
|
54
|
+
- Ship a subset of the official documentation inside the `react-router` package ([#15121](https://github.com/remix-run/react-router/pull/15121))
|
|
55
|
+
- Markdown docs are now available in `node_modules/react-router/docs`, letting AI coding agents and the React Router agent skills read official docs locally
|
|
56
|
+
- Excludes auto-generated API docs (`api/`), `community/` content, and tutorials (`tutorials/`)
|
|
57
|
+
|
|
58
|
+
## v7.16.0
|
|
59
|
+
|
|
60
|
+
### Minor Changes
|
|
61
|
+
|
|
62
|
+
- Stabilize `future.unstable_trailingSlashAwareDataRequests` as `future.v8_trailingSlashAwareDataRequests` ([#15098](https://github.com/remix-run/react-router/pull/15098))
|
|
63
|
+
|
|
64
|
+
### Patch Changes
|
|
65
|
+
|
|
66
|
+
- Disable manifest path when lazy route dicovery is disabled ([#15068](https://github.com/remix-run/react-router/pull/15068))
|
|
67
|
+
|
|
68
|
+
- Fix browser URL creation to use the configured history window instead of the global window. ([#15066](https://github.com/remix-run/react-router/pull/15066))
|
|
69
|
+
- Pass the history/router window through to `createBrowserURLImpl` so custom window contexts keep the correct URL origin.
|
|
70
|
+
|
|
71
|
+
- Fix `useNavigation()` return type to preserve discriminated union across navigation states ([#15095](https://github.com/remix-run/react-router/pull/15095))
|
|
72
|
+
|
|
73
|
+
- Widen `MetaDescriptor` `script:ld+json` type from `LdJsonObject` to `LdJsonObject | LdJsonObject[]` to permit multiple JSON-LD schemas in a single `<script type="application/ld+json">` tag emitted by `<Meta />` ([#15082](https://github.com/remix-run/react-router/pull/15082))
|
|
74
|
+
|
|
3
75
|
## v7.15.1
|
|
4
76
|
|
|
5
77
|
### Patch Changes
|
|
@@ -12,10 +84,9 @@
|
|
|
12
84
|
|
|
13
85
|
### Unstable Changes
|
|
14
86
|
|
|
15
|
-
⚠️
|
|
87
|
+
⚠️ _[Unstable features](https://reactrouter.com/community/api-development-strategy#unstable-flags) are not recommended for production use_
|
|
16
88
|
|
|
17
89
|
- Add a new `unstable_useRouterState()` hook that consolidates access to active and pending router states (RFC: #12358) ([#15017](https://github.com/remix-run/react-router/pull/15017))
|
|
18
|
-
|
|
19
90
|
- Data/Framework/RSC only — throws when used without a data router
|
|
20
91
|
- This should allow you to consolidate usages of the following hooks which will likely be deprecated and removed in a future major version
|
|
21
92
|
- `useLocation`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { R as RouterInit } from './instrumentation-
|
|
3
|
-
import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction } from './data-
|
|
2
|
+
import { R as RouterInit } from './instrumentation-CPkMwccd.js';
|
|
3
|
+
import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction } from './data-CjO11-hU.js';
|
|
4
4
|
|
|
5
5
|
declare function getRequest(): Request;
|
|
6
6
|
type RSCRouteConfigEntryBase = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { R as RouterInit } from './context-
|
|
3
|
-
import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction } from './data-
|
|
2
|
+
import { R as RouterInit } from './context-BlYKn1tE.mjs';
|
|
3
|
+
import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction } from './data-DEjBmEfD.mjs';
|
|
4
4
|
|
|
5
5
|
declare function getRequest(): Request;
|
|
6
6
|
type RSCRouteConfigEntryBase = {
|