react-router 0.0.0-experimental-d07149147 → 0.0.0-experimental-abd9fc79b
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 +64 -0
- package/dist/development/dom-export.d.ts +6 -172
- package/dist/development/dom-export.js +12 -1009
- package/dist/development/index-react-server-client.d.ts +7 -4
- package/dist/development/index-react-server-client.js +8 -52
- package/dist/development/index-react-server.d.ts +1650 -1641
- package/dist/development/index-react-server.js +2883 -3683
- package/dist/development/index.d.ts +41 -1476
- package/dist/development/index.js +36 -2571
- package/dist/development/lib/actions.js +50 -0
- package/dist/development/lib/components.d.ts +1030 -0
- package/dist/development/lib/components.js +841 -0
- package/dist/development/lib/context.d.ts +83 -0
- package/dist/development/lib/context.js +41 -0
- package/dist/development/lib/dom/dom.d.ts +119 -0
- package/dist/development/lib/dom/dom.js +143 -0
- package/dist/development/lib/dom/lib.d.ts +2053 -0
- package/dist/development/lib/dom/lib.js +1271 -0
- package/dist/development/lib/dom/server.d.ts +138 -0
- package/dist/development/lib/dom/server.js +301 -0
- package/dist/development/lib/dom/ssr/components.d.ts +198 -0
- package/dist/development/lib/dom/ssr/components.js +589 -0
- package/dist/development/lib/dom/ssr/data.js +29 -0
- package/dist/development/lib/dom/ssr/entry.d.ts +60 -0
- package/dist/development/lib/dom/ssr/errorBoundaries.d.ts +27 -0
- package/dist/development/lib/dom/ssr/errorBoundaries.js +87 -0
- package/dist/development/lib/dom/ssr/fallback.js +33 -0
- package/dist/development/lib/dom/ssr/fog-of-war.d.ts +12 -0
- package/dist/development/lib/dom/ssr/fog-of-war.js +180 -0
- package/dist/development/lib/dom/ssr/hydration.d.ts +32 -0
- package/dist/development/lib/dom/ssr/hydration.js +29 -0
- package/dist/development/lib/dom/ssr/invariant.js +16 -0
- package/dist/development/lib/dom/ssr/links.js +170 -0
- package/dist/development/lib/dom/ssr/markup.js +24 -0
- package/dist/development/lib/dom/ssr/routeModules.d.ts +206 -0
- package/dist/development/lib/dom/ssr/routeModules.js +31 -0
- package/dist/development/lib/dom/ssr/routes-test-stub.d.ts +62 -0
- package/dist/development/lib/dom/ssr/routes-test-stub.js +108 -0
- package/dist/development/lib/dom/ssr/routes.d.ts +33 -0
- package/dist/development/lib/dom/ssr/routes.js +303 -0
- package/dist/development/lib/dom/ssr/server.d.ts +48 -0
- package/dist/development/lib/dom/ssr/server.js +69 -0
- package/dist/development/lib/dom/ssr/single-fetch.d.ts +14 -0
- package/dist/development/lib/dom/ssr/single-fetch.js +345 -0
- package/dist/development/lib/dom-export/dom-router-provider.d.ts +9 -0
- package/dist/development/lib/dom-export/dom-router-provider.js +22 -0
- package/dist/development/lib/dom-export/hydrated-router.d.ts +125 -0
- package/dist/development/lib/dom-export/hydrated-router.js +150 -0
- package/dist/development/lib/errors.js +29 -0
- package/dist/development/lib/hooks.d.ts +947 -0
- package/dist/development/lib/hooks.js +1388 -0
- package/dist/development/lib/href.d.ts +20 -0
- package/dist/development/lib/href.js +50 -0
- package/dist/development/lib/router/history.d.ts +258 -0
- package/dist/development/lib/router/history.js +372 -0
- package/dist/development/lib/router/instrumentation.d.ts +86 -0
- package/dist/development/lib/router/instrumentation.js +213 -0
- package/dist/development/lib/router/links.d.ts +114 -0
- package/dist/development/lib/router/router.d.ts +663 -0
- package/dist/development/lib/router/router.js +2988 -0
- package/dist/development/lib/router/url.js +18 -0
- package/dist/development/lib/router/utils.d.ts +948 -0
- package/dist/development/lib/router/utils.js +810 -0
- package/dist/development/lib/rsc/browser.d.ts +137 -0
- package/dist/development/lib/rsc/browser.js +602 -0
- package/dist/development/lib/rsc/errorBoundaries.d.ts +11 -0
- package/dist/development/lib/rsc/errorBoundaries.js +90 -0
- package/dist/development/lib/rsc/html-stream/browser.d.ts +48 -0
- package/dist/development/lib/rsc/html-stream/browser.js +74 -0
- package/dist/development/lib/rsc/html-stream/server.js +78 -0
- package/dist/development/lib/rsc/route-modules.js +27 -0
- package/dist/development/lib/rsc/server.rsc.d.ts +219 -0
- package/dist/development/lib/rsc/server.ssr.d.ts +129 -0
- package/dist/development/lib/rsc/server.ssr.js +404 -0
- package/dist/development/lib/server-runtime/build.d.ts +66 -0
- package/dist/development/lib/server-runtime/cookies.d.ts +66 -0
- package/dist/development/lib/server-runtime/cookies.js +139 -0
- package/dist/development/lib/server-runtime/crypto.js +43 -0
- package/dist/development/lib/server-runtime/data.js +25 -0
- package/dist/development/lib/server-runtime/dev.d.ts +9 -0
- package/dist/development/lib/server-runtime/dev.js +26 -0
- package/dist/development/lib/server-runtime/entry.js +20 -0
- package/dist/development/lib/server-runtime/errors.js +75 -0
- package/dist/development/lib/server-runtime/headers.js +73 -0
- package/dist/development/lib/server-runtime/invariant.js +19 -0
- package/dist/development/lib/server-runtime/mode.d.ts +12 -0
- package/dist/development/lib/server-runtime/mode.js +25 -0
- package/dist/development/lib/server-runtime/routeMatching.js +28 -0
- package/dist/development/lib/server-runtime/routes.d.ts +13 -0
- package/dist/development/lib/server-runtime/routes.js +74 -0
- package/dist/development/lib/server-runtime/server.d.ts +10 -0
- package/dist/development/lib/server-runtime/server.js +345 -0
- package/dist/development/lib/server-runtime/serverHandoff.js +17 -0
- package/dist/development/lib/server-runtime/sessions/cookieStorage.d.ts +25 -0
- package/dist/development/lib/server-runtime/sessions/cookieStorage.js +45 -0
- package/dist/development/lib/server-runtime/sessions/memoryStorage.d.ts +23 -0
- package/dist/development/lib/server-runtime/sessions/memoryStorage.js +52 -0
- package/dist/development/lib/server-runtime/sessions.d.ts +145 -0
- package/dist/development/lib/server-runtime/sessions.js +98 -0
- package/dist/development/lib/server-runtime/single-fetch.d.ts +7 -0
- package/dist/development/lib/server-runtime/single-fetch.js +215 -0
- package/dist/development/lib/server-runtime/urls.js +28 -0
- package/dist/development/lib/server-runtime/warnings.js +20 -0
- package/dist/development/lib/types/future.d.ts +9 -0
- package/dist/development/lib/types/internal.d.ts +26 -177
- package/dist/development/lib/types/internal.js +3 -2
- package/dist/development/{register-roq_0qYo.d.ts → lib/types/register.d.ts} +9 -15
- package/dist/development/lib/types/route-data.d.ts +113 -0
- package/dist/development/lib/types/route-module-annotations.d.ts +149 -0
- package/dist/development/lib/types/route-module.d.ts +19 -0
- package/dist/development/lib/types/serializes-to.d.ts +13 -0
- package/dist/development/lib/types/utils.d.ts +11 -0
- package/dist/development/vendor/turbo-stream-v2/flatten.js +159 -0
- package/dist/development/vendor/turbo-stream-v2/turbo-stream.js +179 -0
- package/dist/development/vendor/turbo-stream-v2/unflatten.js +199 -0
- package/dist/development/vendor/turbo-stream-v2/utils.js +39 -0
- package/dist/production/dom-export.d.ts +6 -172
- package/dist/production/dom-export.js +12 -1009
- package/dist/production/index-react-server-client.d.ts +7 -4
- package/dist/production/index-react-server-client.js +8 -52
- package/dist/production/index-react-server.d.ts +1650 -1641
- package/dist/production/index-react-server.js +2874 -3683
- package/dist/production/index.d.ts +41 -1476
- package/dist/production/index.js +36 -2571
- package/dist/production/lib/actions.js +50 -0
- package/dist/production/lib/components.d.ts +1030 -0
- package/dist/production/lib/components.js +841 -0
- package/dist/production/lib/context.d.ts +83 -0
- package/dist/production/lib/context.js +41 -0
- package/dist/production/lib/dom/dom.d.ts +119 -0
- package/dist/production/lib/dom/dom.js +143 -0
- package/dist/production/lib/dom/lib.d.ts +2053 -0
- package/dist/production/lib/dom/lib.js +1271 -0
- package/dist/production/lib/dom/server.d.ts +138 -0
- package/dist/production/lib/dom/server.js +301 -0
- package/dist/production/lib/dom/ssr/components.d.ts +198 -0
- package/dist/production/lib/dom/ssr/components.js +589 -0
- package/dist/production/lib/dom/ssr/data.js +29 -0
- package/dist/production/lib/dom/ssr/entry.d.ts +60 -0
- package/dist/production/lib/dom/ssr/errorBoundaries.d.ts +27 -0
- package/dist/production/lib/dom/ssr/errorBoundaries.js +87 -0
- package/dist/production/lib/dom/ssr/fallback.js +23 -0
- package/dist/production/lib/dom/ssr/fog-of-war.d.ts +12 -0
- package/dist/production/lib/dom/ssr/fog-of-war.js +180 -0
- package/dist/production/lib/dom/ssr/hydration.d.ts +32 -0
- package/dist/production/lib/dom/ssr/hydration.js +29 -0
- package/dist/production/lib/dom/ssr/invariant.js +16 -0
- package/dist/production/lib/dom/ssr/links.js +170 -0
- package/dist/production/lib/dom/ssr/markup.js +24 -0
- package/dist/production/lib/dom/ssr/routeModules.d.ts +206 -0
- package/dist/production/lib/dom/ssr/routeModules.js +31 -0
- package/dist/production/lib/dom/ssr/routes-test-stub.d.ts +62 -0
- package/dist/production/lib/dom/ssr/routes-test-stub.js +108 -0
- package/dist/production/lib/dom/ssr/routes.d.ts +33 -0
- package/dist/production/lib/dom/ssr/routes.js +303 -0
- package/dist/production/lib/dom/ssr/server.d.ts +48 -0
- package/dist/production/lib/dom/ssr/server.js +69 -0
- package/dist/production/lib/dom/ssr/single-fetch.d.ts +14 -0
- package/dist/production/lib/dom/ssr/single-fetch.js +345 -0
- package/dist/production/lib/dom-export/dom-router-provider.d.ts +9 -0
- package/dist/production/lib/dom-export/dom-router-provider.js +22 -0
- package/dist/production/lib/dom-export/hydrated-router.d.ts +125 -0
- package/dist/production/lib/dom-export/hydrated-router.js +150 -0
- package/dist/production/lib/errors.js +29 -0
- package/dist/production/lib/hooks.d.ts +947 -0
- package/dist/production/lib/hooks.js +1373 -0
- package/dist/production/lib/href.d.ts +20 -0
- package/dist/production/lib/href.js +50 -0
- package/dist/production/lib/router/history.d.ts +258 -0
- package/dist/production/lib/router/history.js +372 -0
- package/dist/production/lib/router/instrumentation.d.ts +86 -0
- package/dist/production/lib/router/instrumentation.js +213 -0
- package/dist/production/lib/router/links.d.ts +114 -0
- package/dist/production/lib/router/router.d.ts +663 -0
- package/dist/production/lib/router/router.js +2988 -0
- package/dist/production/lib/router/url.js +18 -0
- package/dist/production/lib/router/utils.d.ts +948 -0
- package/dist/production/lib/router/utils.js +801 -0
- package/dist/production/lib/rsc/browser.d.ts +137 -0
- package/dist/production/lib/rsc/browser.js +602 -0
- package/dist/production/lib/rsc/errorBoundaries.d.ts +11 -0
- package/dist/production/lib/rsc/errorBoundaries.js +90 -0
- package/dist/production/lib/rsc/html-stream/browser.d.ts +48 -0
- package/dist/production/lib/rsc/html-stream/browser.js +74 -0
- package/dist/production/lib/rsc/html-stream/server.js +78 -0
- package/dist/production/lib/rsc/route-modules.js +27 -0
- package/dist/production/lib/rsc/server.rsc.d.ts +219 -0
- package/dist/production/lib/rsc/server.ssr.d.ts +129 -0
- package/dist/production/lib/rsc/server.ssr.js +404 -0
- package/dist/production/lib/server-runtime/build.d.ts +66 -0
- package/dist/production/lib/server-runtime/cookies.d.ts +66 -0
- package/dist/production/lib/server-runtime/cookies.js +139 -0
- package/dist/production/lib/server-runtime/crypto.js +43 -0
- package/dist/production/lib/server-runtime/data.js +25 -0
- package/dist/production/lib/server-runtime/dev.d.ts +9 -0
- package/dist/production/lib/server-runtime/dev.js +26 -0
- package/dist/production/lib/server-runtime/entry.js +20 -0
- package/dist/production/lib/server-runtime/errors.js +75 -0
- package/dist/production/lib/server-runtime/headers.js +73 -0
- package/dist/production/lib/server-runtime/invariant.js +19 -0
- package/dist/production/lib/server-runtime/mode.d.ts +12 -0
- package/dist/production/lib/server-runtime/mode.js +25 -0
- package/dist/production/lib/server-runtime/routeMatching.js +28 -0
- package/dist/production/lib/server-runtime/routes.d.ts +13 -0
- package/dist/production/lib/server-runtime/routes.js +74 -0
- package/dist/production/lib/server-runtime/server.d.ts +10 -0
- package/dist/production/lib/server-runtime/server.js +345 -0
- package/dist/production/lib/server-runtime/serverHandoff.js +17 -0
- package/dist/production/lib/server-runtime/sessions/cookieStorage.d.ts +25 -0
- package/dist/production/lib/server-runtime/sessions/cookieStorage.js +45 -0
- package/dist/production/lib/server-runtime/sessions/memoryStorage.d.ts +23 -0
- package/dist/production/lib/server-runtime/sessions/memoryStorage.js +52 -0
- package/dist/production/lib/server-runtime/sessions.d.ts +145 -0
- package/dist/production/lib/server-runtime/sessions.js +98 -0
- package/dist/production/lib/server-runtime/single-fetch.d.ts +7 -0
- package/dist/production/lib/server-runtime/single-fetch.js +215 -0
- package/dist/production/lib/server-runtime/urls.js +28 -0
- package/dist/production/lib/server-runtime/warnings.js +20 -0
- package/dist/production/lib/types/future.d.ts +9 -0
- package/dist/production/lib/types/internal.d.ts +26 -177
- package/dist/production/lib/types/internal.js +3 -2
- package/dist/production/{register-roq_0qYo.d.ts → lib/types/register.d.ts} +9 -15
- package/dist/production/lib/types/route-data.d.ts +113 -0
- package/dist/production/lib/types/route-module-annotations.d.ts +149 -0
- package/dist/production/lib/types/route-module.d.ts +19 -0
- package/dist/production/lib/types/serializes-to.d.ts +13 -0
- package/dist/production/lib/types/utils.d.ts +11 -0
- package/dist/production/vendor/turbo-stream-v2/flatten.js +159 -0
- package/dist/production/vendor/turbo-stream-v2/turbo-stream.js +179 -0
- package/dist/production/vendor/turbo-stream-v2/unflatten.js +199 -0
- package/dist/production/vendor/turbo-stream-v2/utils.js +39 -0
- package/docs/explanation/code-splitting.md +16 -0
- package/docs/how-to/middleware.md +14 -130
- package/docs/how-to/react-server-components.md +1 -1
- package/docs/how-to/route-module-type-safety.md +1 -16
- package/docs/how-to/status.md +1 -1
- package/docs/index.md +3 -6
- package/docs/start/framework/deploying.md +1 -1
- package/docs/start/modes.md +1 -2
- package/docs/upgrading/component-routes.md +2 -2
- package/docs/upgrading/future.md +26 -228
- package/docs/upgrading/router-provider.md +6 -3
- package/docs/upgrading/v7.md +443 -0
- package/package.json +43 -87
- package/dist/development/browser-B2PdsXXH.d.ts +0 -318
- package/dist/development/browser-DBmQ1yAR.d.mts +0 -318
- package/dist/development/chunk-2LN5XYLV.mjs +0 -2535
- package/dist/development/chunk-FXH6PCLA.js +0 -188
- package/dist/development/chunk-INNQPBPI.js +0 -1366
- package/dist/development/chunk-NPZCI77A.js +0 -10307
- package/dist/development/chunk-YXISIC3F.mjs +0 -11606
- package/dist/development/context-CeD5LmaF.d.mts +0 -1779
- package/dist/development/data-CjO11-hU.d.ts +0 -1740
- package/dist/development/data-DEjBmEfD.d.mts +0 -1740
- package/dist/development/dom-export.d.mts +0 -172
- package/dist/development/dom-export.mjs +0 -1010
- package/dist/development/index-react-server-client-3ykjivgQ.d.ts +0 -3677
- package/dist/development/index-react-server-client-CACgcj2J.d.mts +0 -2614
- package/dist/development/index-react-server-client.d.mts +0 -4
- package/dist/development/index-react-server-client.mjs +0 -59
- package/dist/development/index-react-server.d.mts +0 -2711
- package/dist/development/index-react-server.mjs +0 -3821
- package/dist/development/index.d.mts +0 -1479
- package/dist/development/index.mjs +0 -275
- package/dist/development/instrumentation-Dkmpzd13.d.ts +0 -715
- package/dist/development/lib/types/internal.d.mts +0 -184
- package/dist/development/lib/types/internal.mjs +0 -10
- package/dist/development/register-CmkRspdl.d.mts +0 -30
- package/dist/production/browser-B2PdsXXH.d.ts +0 -318
- package/dist/production/browser-DBmQ1yAR.d.mts +0 -318
- package/dist/production/chunk-CTPMZNY4.mjs +0 -2535
- package/dist/production/chunk-EGIXHPKG.js +0 -10307
- package/dist/production/chunk-L4O4PVIV.js +0 -1366
- package/dist/production/chunk-OINPVNTA.js +0 -188
- package/dist/production/chunk-TPWBPI22.mjs +0 -11606
- package/dist/production/context-CeD5LmaF.d.mts +0 -1779
- package/dist/production/data-CjO11-hU.d.ts +0 -1740
- package/dist/production/data-DEjBmEfD.d.mts +0 -1740
- package/dist/production/dom-export.d.mts +0 -172
- package/dist/production/dom-export.mjs +0 -1010
- package/dist/production/index-react-server-client-3ykjivgQ.d.ts +0 -3677
- package/dist/production/index-react-server-client-CACgcj2J.d.mts +0 -2614
- package/dist/production/index-react-server-client.d.mts +0 -4
- package/dist/production/index-react-server-client.mjs +0 -59
- package/dist/production/index-react-server.d.mts +0 -2711
- package/dist/production/index-react-server.mjs +0 -3821
- package/dist/production/index.d.mts +0 -1479
- package/dist/production/index.mjs +0 -275
- package/dist/production/instrumentation-Dkmpzd13.d.ts +0 -715
- package/dist/production/lib/types/internal.d.mts +0 -184
- package/dist/production/lib/types/internal.mjs +0 -10
- package/dist/production/register-CmkRspdl.d.mts +0 -30
- package/docs/upgrading/remix.md +0 -403
- package/docs/upgrading/v6.md +0 -382
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,69 @@
|
|
|
1
1
|
# `react-router`
|
|
2
2
|
|
|
3
|
+
## v8.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Remove the obsolete `AppLoadContext` type export accidentally left over from v7 now that middleware is always enabled and server request context is provided through `RouterContextProvider`. ([#15207](https://github.com/remix-run/react-router/pull/15207))
|
|
8
|
+
|
|
9
|
+
## v8.0.0
|
|
10
|
+
|
|
11
|
+
### Major Changes
|
|
12
|
+
|
|
13
|
+
- Remove the `future.v8_trailingSlashAwareDataRequests` flag ([#15100](https://github.com/remix-run/react-router/pull/15100))
|
|
14
|
+
- Trailing slash-aware data request URLs are now the default behavior.
|
|
15
|
+
- Update `tsconfig.json` `target`/`lib` from `ES2020 -> ES2022` ([591853e](https://github.com/remix-run/react-router/commit/591853e))
|
|
16
|
+
- Switch the published packages in `packages/` to ESM-only. ([#14895](https://github.com/remix-run/react-router/pull/14895)) ([59ebcf1](https://github.com/remix-run/react-router/commit/59ebcf1))
|
|
17
|
+
- Remove deprecated `data` parameter in favor of `loaderData` for `meta` APIs (to align with `Route.ComponentProps`) ([#14931](https://github.com/remix-run/react-router/pull/14931))
|
|
18
|
+
- `Route.MetaArgs`, `Route.MetaMatch`, `MetaArgs`, `MetaMatch`, `Route.ComponentProps.matches`, `UIMatch`
|
|
19
|
+
- Remove `future.v8_passThroughRequests` flag - the raw incoming `request` is now always passed through to `loader`/`action`. Use `url` for the normalized URL without React Router-specific implementation details (`.data` suffixes, `index`/`_routes` search params). ([#15079](https://github.com/remix-run/react-router/pull/15079))
|
|
20
|
+
- Remove internal `hasErrorBoundary` field added to `router.routes` when using a data router ([#15074](https://github.com/remix-run/react-router/pull/15074))
|
|
21
|
+
- This should not impact user-facing code since this was an internal prop and was computed based on the presence of `ErrorBoundary` or `errorElement` on your route
|
|
22
|
+
- `hasErrorBoundary` is no longer accepted on `RouteObject` (`IndexRouteObject`/`NonIndexRouteObject`), `DataRouteObject`, `<Route>` JSX props, or as a key in `lazy` route definitions.
|
|
23
|
+
- The `MapRoutePropertiesFunction` signature no longer requires returning `hasErrorBoundary`; the router infers it directly.
|
|
24
|
+
- Remove `react-router-dom` package ([#15076](https://github.com/remix-run/react-router/pull/15076))
|
|
25
|
+
- In v7 everything DOM-specific was collapsed into `react-router/dom`
|
|
26
|
+
- `react-router-dom` was kept around as a convenience so existing v6 app imports would still work
|
|
27
|
+
- For v8, you will need to swap `react-router-dom` imports:
|
|
28
|
+
- `RouterProvider`/`HydratedRouter` should be imported from `react-router/dom`
|
|
29
|
+
- Everything else should be imported from `react-router`
|
|
30
|
+
- Remove `future.v8_middleware` flag — middleware is always enabled in v8 ([#15078](https://github.com/remix-run/react-router/pull/15078))
|
|
31
|
+
- The `future.v8_middleware` flag has been removed; middleware is now always enabled
|
|
32
|
+
- The `context` parameter passed to `loader`, `action`, and `middleware` functions is always a `RouterContextProvider` instance
|
|
33
|
+
- `getLoadContext` functions in custom servers must return a `RouterContextProvider` — returning a plain object is no longer supported
|
|
34
|
+
- The `MiddlewareEnabled` type (previously exported as `UNSAFE_MiddlewareEnabled`) has been removed since the conditional it gated is now unconditional
|
|
35
|
+
- The `Future` module augmentation pattern (`interface Future { v8_middleware: true }`) is no longer needed to type `context` in Data Mode
|
|
36
|
+
- Update minimum Node version to 22.22.0 ([#14928](https://github.com/remix-run/react-router/pull/14928))
|
|
37
|
+
- Update minimum React version to 19.2.7 ([#15062](https://github.com/remix-run/react-router/pull/15062))
|
|
38
|
+
|
|
39
|
+
### Minor Changes
|
|
40
|
+
|
|
41
|
+
- Bump dependencies ([#15080](https://github.com/remix-run/react-router/pull/15080))
|
|
42
|
+
- Bumped `cookie` from `^1.0.1` to `^1.1.1`
|
|
43
|
+
- Bumped `set-cookie-parser` from `^2.6.0` to `^3.1.0`
|
|
44
|
+
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- Ensure client middleware errors load lazy route error boundaries before bubbling ([#15086](https://github.com/remix-run/react-router/pull/15086))
|
|
48
|
+
- Remove explicit `onSubmit` type override from `SharedFormProps` to fix deprecation warning with `@types/react@19.x` ([#14932](https://github.com/remix-run/react-router/pull/14932)) ([59ebcf1](https://github.com/remix-run/react-router/commit/59ebcf1))
|
|
49
|
+
- Update package builds to preserve individual module files in published artifacts. Public APIs and documented import paths are unchanged. ([#15092](https://github.com/remix-run/react-router/pull/15092))
|
|
50
|
+
- Updated package TypeScript configs to support modern module syntax used by the build configuration.
|
|
51
|
+
- Migrate package builds from `tsup` to `tsdown`. Published package entry points and public APIs are unchanged. ([#15092](https://github.com/remix-run/react-router/pull/15092))
|
|
52
|
+
- Upgrade React Router's TypeScript tooling to TypeScript 6. Runtime behavior and public APIs are unchanged. ([#15092](https://github.com/remix-run/react-router/pull/15092))
|
|
53
|
+
|
|
54
|
+
## v7.18.0
|
|
55
|
+
|
|
56
|
+
### Patch Changes
|
|
57
|
+
|
|
58
|
+
- 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))
|
|
59
|
+
- 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))
|
|
60
|
+
- Use `turbo-stream` to serialize and deserialize Framework Mode hydration errors ([#15175](https://github.com/remix-run/react-router/pull/15175))
|
|
61
|
+
- Precompute route branch matchers to avoid recompiling route path regexes during matching ([#15186](https://github.com/remix-run/react-router/pull/15186))
|
|
62
|
+
- Use the constructed request URL host when validating action request origins. ([#15185](https://github.com/remix-run/react-router/pull/15185))
|
|
63
|
+
- 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))
|
|
64
|
+
- Validate protocols in RSC render redirects ([#15177](https://github.com/remix-run/react-router/pull/15177))
|
|
65
|
+
- Consolidate url normalization logic and better handle mixed slashes ([#15176](https://github.com/remix-run/react-router/pull/15176))
|
|
66
|
+
|
|
3
67
|
## v7.17.0
|
|
4
68
|
|
|
5
69
|
### Minor Changes
|
|
@@ -1,173 +1,7 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { RouterProviderProps as RouterProviderProps$1, RouterInit, ClientOnErrorFunction } from 'react-router';
|
|
3
|
-
import { C as ClientInstrumentation } from './instrumentation-Dkmpzd13.js';
|
|
4
|
-
export { D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, R as unstable_RSCHydratedRouter, d as unstable_RSCManifestPayload, e as unstable_RSCPayload, f as unstable_RSCRenderPayload, c as unstable_createCallServer } from './browser-B2PdsXXH.js';
|
|
5
|
-
import './data-CjO11-hU.js';
|
|
6
1
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
* @category Types
|
|
14
|
-
*/
|
|
15
|
-
interface HydratedRouterProps {
|
|
16
|
-
/**
|
|
17
|
-
* Context factory function to be passed through to {@link createBrowserRouter}.
|
|
18
|
-
* This function will be called to create a fresh `context` instance on each
|
|
19
|
-
* navigation/fetch and made available to
|
|
20
|
-
* [`clientAction`](../../start/framework/route-module#clientAction)/[`clientLoader`](../../start/framework/route-module#clientLoader)
|
|
21
|
-
* functions.
|
|
22
|
-
*/
|
|
23
|
-
getContext?: RouterInit["getContext"];
|
|
24
|
-
/**
|
|
25
|
-
* Array of instrumentation objects allowing you to instrument the router and
|
|
26
|
-
* individual routes prior to router initialization (and on any subsequently
|
|
27
|
-
* added routes via `route.lazy` or `patchRoutesOnNavigation`). This is
|
|
28
|
-
* mostly useful for observability such as wrapping navigations, fetches,
|
|
29
|
-
* as well as route loaders/actions/middlewares with logging and/or performance
|
|
30
|
-
* tracing. See the [docs](../../how-to/instrumentation) for more information.
|
|
31
|
-
*
|
|
32
|
-
* ```tsx
|
|
33
|
-
* const logging = {
|
|
34
|
-
* router({ instrument }) {
|
|
35
|
-
* instrument({
|
|
36
|
-
* navigate: (impl, { to }) => logExecution(`navigate ${to}`, impl),
|
|
37
|
-
* fetch: (impl, { to }) => logExecution(`fetch ${to}`, impl)
|
|
38
|
-
* });
|
|
39
|
-
* },
|
|
40
|
-
* route({ instrument, id }) {
|
|
41
|
-
* instrument({
|
|
42
|
-
* middleware: (impl, { request }) => logExecution(
|
|
43
|
-
* `middleware ${request.url} (route ${id})`,
|
|
44
|
-
* impl
|
|
45
|
-
* ),
|
|
46
|
-
* loader: (impl, { request }) => logExecution(
|
|
47
|
-
* `loader ${request.url} (route ${id})`,
|
|
48
|
-
* impl
|
|
49
|
-
* ),
|
|
50
|
-
* action: (impl, { request }) => logExecution(
|
|
51
|
-
* `action ${request.url} (route ${id})`,
|
|
52
|
-
* impl
|
|
53
|
-
* ),
|
|
54
|
-
* })
|
|
55
|
-
* }
|
|
56
|
-
* };
|
|
57
|
-
*
|
|
58
|
-
* async function logExecution(label: string, impl: () => Promise<void>) {
|
|
59
|
-
* let start = performance.now();
|
|
60
|
-
* console.log(`start ${label}`);
|
|
61
|
-
* await impl();
|
|
62
|
-
* let duration = Math.round(performance.now() - start);
|
|
63
|
-
* console.log(`end ${label} (${duration}ms)`);
|
|
64
|
-
* }
|
|
65
|
-
*
|
|
66
|
-
* startTransition(() => {
|
|
67
|
-
* hydrateRoot(
|
|
68
|
-
* document,
|
|
69
|
-
* <HydratedRouter instrumentations={[logging]} />
|
|
70
|
-
* );
|
|
71
|
-
* });
|
|
72
|
-
* ```
|
|
73
|
-
*/
|
|
74
|
-
instrumentations?: ClientInstrumentation[];
|
|
75
|
-
/**
|
|
76
|
-
* An error handler function that will be called for any middleware, loader, action,
|
|
77
|
-
* or render errors that are encountered in your application. This is useful for
|
|
78
|
-
* logging or reporting errors instead of in the {@link ErrorBoundary} because it's not
|
|
79
|
-
* subject to re-rendering and will only run one time per error.
|
|
80
|
-
*
|
|
81
|
-
* The `errorInfo` parameter is passed along from
|
|
82
|
-
* [`componentDidCatch`](https://react.dev/reference/react/Component#componentdidcatch)
|
|
83
|
-
* and is only present for render errors.
|
|
84
|
-
*
|
|
85
|
-
* ```tsx
|
|
86
|
-
* <HydratedRouter onError={(error, info) => {
|
|
87
|
-
* let { location, params, pattern, errorInfo } = info;
|
|
88
|
-
* console.error(error, location, errorInfo);
|
|
89
|
-
* reportToErrorService(error, location, errorInfo);
|
|
90
|
-
* }} />
|
|
91
|
-
* ```
|
|
92
|
-
*/
|
|
93
|
-
onError?: ClientOnErrorFunction;
|
|
94
|
-
/**
|
|
95
|
-
* Control whether router state updates are internally wrapped in
|
|
96
|
-
* [`React.startTransition`](https://react.dev/reference/react/startTransition).
|
|
97
|
-
*
|
|
98
|
-
* - When left `undefined`, all state updates are wrapped in
|
|
99
|
-
* `React.startTransition`
|
|
100
|
-
* - This can lead to buggy behaviors if you are wrapping your own
|
|
101
|
-
* navigations/fetchers in `startTransition`.
|
|
102
|
-
* - When set to `true`, {@link Link} and {@link Form} navigations will be wrapped
|
|
103
|
-
* in `React.startTransition` and router state changes will be wrapped in
|
|
104
|
-
* `React.startTransition` and also sent through
|
|
105
|
-
* [`useOptimistic`](https://react.dev/reference/react/useOptimistic) to
|
|
106
|
-
* surface mid-navigation router state changes to the UI.
|
|
107
|
-
* - When set to `false`, the router will not leverage `React.startTransition` or
|
|
108
|
-
* `React.useOptimistic` on any navigations or state changes.
|
|
109
|
-
*
|
|
110
|
-
* For more information, please see the [docs](../../explanation/react-transitions).
|
|
111
|
-
*/
|
|
112
|
-
useTransitions?: boolean;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Framework-mode router component to be used to hydrate a router from a
|
|
116
|
-
* {@link ServerRouter}. See [`entry.client.tsx`](../framework-conventions/entry.client.tsx).
|
|
117
|
-
*
|
|
118
|
-
* @public
|
|
119
|
-
* @category Framework Routers
|
|
120
|
-
* @mode framework
|
|
121
|
-
* @param props Props
|
|
122
|
-
* @param {dom.HydratedRouterProps.getContext} props.getContext n/a
|
|
123
|
-
* @param {dom.HydratedRouterProps.onError} props.onError n/a
|
|
124
|
-
* @returns A React element that represents the hydrated application.
|
|
125
|
-
*/
|
|
126
|
-
declare function HydratedRouter(props: HydratedRouterProps): React.JSX.Element;
|
|
127
|
-
|
|
128
|
-
declare global {
|
|
129
|
-
interface Window {
|
|
130
|
-
__FLIGHT_DATA: any[];
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Get the prerendered [RSC](https://react.dev/reference/rsc/server-components)
|
|
135
|
-
* stream for hydration. Usually passed directly to your
|
|
136
|
-
* `react-server-dom-xyz/client`'s `createFromReadableStream`.
|
|
137
|
-
*
|
|
138
|
-
* @example
|
|
139
|
-
* import { startTransition, StrictMode } from "react";
|
|
140
|
-
* import { hydrateRoot } from "react-dom/client";
|
|
141
|
-
* import {
|
|
142
|
-
* unstable_getRSCStream as getRSCStream,
|
|
143
|
-
* unstable_RSCHydratedRouter as RSCHydratedRouter,
|
|
144
|
-
* } from "react-router";
|
|
145
|
-
* import type { unstable_RSCPayload as RSCPayload } from "react-router";
|
|
146
|
-
*
|
|
147
|
-
* createFromReadableStream(getRSCStream()).then(
|
|
148
|
-
* (payload: RSCServerPayload) => {
|
|
149
|
-
* startTransition(async () => {
|
|
150
|
-
* hydrateRoot(
|
|
151
|
-
* document,
|
|
152
|
-
* <StrictMode>
|
|
153
|
-
* <RSCHydratedRouter {...props} />
|
|
154
|
-
* </StrictMode>,
|
|
155
|
-
* {
|
|
156
|
-
* // Options
|
|
157
|
-
* }
|
|
158
|
-
* );
|
|
159
|
-
* });
|
|
160
|
-
* }
|
|
161
|
-
* );
|
|
162
|
-
*
|
|
163
|
-
* @name unstable_getRSCStream
|
|
164
|
-
* @public
|
|
165
|
-
* @category RSC
|
|
166
|
-
* @mode data
|
|
167
|
-
* @returns A [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream)
|
|
168
|
-
* that contains the [RSC](https://react.dev/reference/rsc/server-components)
|
|
169
|
-
* data for hydration.
|
|
170
|
-
*/
|
|
171
|
-
declare function getRSCStream(): ReadableStream;
|
|
172
|
-
|
|
173
|
-
export { HydratedRouter, type HydratedRouterProps, RouterProvider, type RouterProviderProps, getRSCStream as unstable_getRSCStream };
|
|
2
|
+
import { RouterProvider, RouterProviderProps } from "./lib/dom-export/dom-router-provider.js";
|
|
3
|
+
import { DecodeActionFunction, DecodeFormStateFunction, DecodeReplyFunction, RSCManifestPayload, RSCPayload, RSCRenderPayload } from "./lib/rsc/server.rsc.js";
|
|
4
|
+
import { RSCHydratedRouter, createCallServer } from "./lib/rsc/browser.js";
|
|
5
|
+
import { HydratedRouter, HydratedRouterProps } from "./lib/dom-export/hydrated-router.js";
|
|
6
|
+
import { getRSCStream } from "./lib/rsc/html-stream/browser.js";
|
|
7
|
+
export { HydratedRouter, type HydratedRouterProps, RouterProvider, type RouterProviderProps, type DecodeActionFunction as unstable_DecodeActionFunction, type DecodeFormStateFunction as unstable_DecodeFormStateFunction, type DecodeReplyFunction as unstable_DecodeReplyFunction, RSCHydratedRouter as unstable_RSCHydratedRouter, type RSCManifestPayload as unstable_RSCManifestPayload, type RSCPayload as unstable_RSCPayload, type RSCRenderPayload as unstable_RSCRenderPayload, createCallServer as unstable_createCallServer, getRSCStream as unstable_getRSCStream };
|