react-router 7.0.0-pre.1 → 7.0.0-pre.3
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 +40 -0
- package/dist/chunk-3AAHPOYG.mjs +9617 -0
- package/dist/dom-export.d.mts +13 -0
- package/dist/dom-export.d.ts +13 -3
- package/dist/dom-export.js +5502 -0
- package/dist/dom-export.mjs +112 -118
- package/dist/{lib/dom/lib.d.ts → fog-of-war-BijhfqFM.d.ts} +700 -45
- package/dist/fog-of-war-Bz_EDtxF.d.mts +1595 -0
- package/dist/index.d.mts +839 -0
- package/dist/index.d.ts +839 -74
- package/dist/index.js +9763 -0
- package/dist/index.mjs +225 -11533
- package/dist/lib/types.d.mts +2 -0
- package/dist/lib/types.d.ts +2 -76
- package/dist/lib/types.js +28 -0
- package/dist/lib/types.mjs +1 -1
- package/dist/types-BlYP8xpH.d.mts +1620 -0
- package/dist/types-BlYP8xpH.d.ts +1620 -0
- package/package.json +54 -14
- package/dist/dom-export.mjs.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/lib/components.d.ts +0 -372
- package/dist/lib/context.d.ts +0 -115
- package/dist/lib/dom/dom.d.ts +0 -123
- package/dist/lib/dom/global.d.ts +0 -40
- package/dist/lib/dom/server.d.ts +0 -41
- package/dist/lib/dom/ssr/components.d.ts +0 -123
- package/dist/lib/dom/ssr/data.d.ts +0 -7
- package/dist/lib/dom/ssr/entry.d.ts +0 -47
- package/dist/lib/dom/ssr/errorBoundaries.d.ts +0 -36
- package/dist/lib/dom/ssr/errors.d.ts +0 -2
- package/dist/lib/dom/ssr/fallback.d.ts +0 -2
- package/dist/lib/dom/ssr/fog-of-war.d.ts +0 -28
- package/dist/lib/dom/ssr/invariant.d.ts +0 -2
- package/dist/lib/dom/ssr/links.d.ts +0 -25
- package/dist/lib/dom/ssr/markup.d.ts +0 -5
- package/dist/lib/dom/ssr/routeModules.d.ts +0 -141
- package/dist/lib/dom/ssr/routes-test-stub.d.ts +0 -59
- package/dist/lib/dom/ssr/routes.d.ts +0 -32
- package/dist/lib/dom/ssr/server.d.ts +0 -16
- package/dist/lib/dom/ssr/single-fetch.d.ts +0 -37
- package/dist/lib/dom-export/dom-router-provider.d.ts +0 -5
- package/dist/lib/dom-export/hydrated-router.d.ts +0 -5
- package/dist/lib/dom-export.d.ts +0 -3
- package/dist/lib/hooks.d.ts +0 -410
- package/dist/lib/router/history.d.ts +0 -253
- package/dist/lib/router/links.d.ts +0 -104
- package/dist/lib/router/router.d.ts +0 -540
- package/dist/lib/router/utils.d.ts +0 -505
- package/dist/lib/server-runtime/build.d.ts +0 -38
- package/dist/lib/server-runtime/cookies.d.ts +0 -62
- package/dist/lib/server-runtime/crypto.d.ts +0 -2
- package/dist/lib/server-runtime/data.d.ts +0 -15
- package/dist/lib/server-runtime/dev.d.ts +0 -8
- package/dist/lib/server-runtime/entry.d.ts +0 -3
- package/dist/lib/server-runtime/errors.d.ts +0 -51
- package/dist/lib/server-runtime/headers.d.ts +0 -3
- package/dist/lib/server-runtime/invariant.d.ts +0 -2
- package/dist/lib/server-runtime/jsonify.d.ts +0 -33
- package/dist/lib/server-runtime/markup.d.ts +0 -1
- package/dist/lib/server-runtime/mode.d.ts +0 -9
- package/dist/lib/server-runtime/responses.d.ts +0 -37
- package/dist/lib/server-runtime/routeMatching.d.ts +0 -8
- package/dist/lib/server-runtime/routeModules.d.ts +0 -212
- package/dist/lib/server-runtime/routes.d.ts +0 -31
- package/dist/lib/server-runtime/server.d.ts +0 -5
- package/dist/lib/server-runtime/serverHandoff.d.ts +0 -11
- package/dist/lib/server-runtime/sessions/cookieStorage.d.ts +0 -19
- package/dist/lib/server-runtime/sessions/memoryStorage.d.ts +0 -17
- package/dist/lib/server-runtime/sessions.d.ts +0 -140
- package/dist/lib/server-runtime/single-fetch.d.ts +0 -30
- package/dist/lib/server-runtime/typecheck.d.ts +0 -4
- package/dist/lib/server-runtime/warnings.d.ts +0 -1
- package/dist/main-dom-export.js +0 -19
- package/dist/main.js +0 -19
- package/dist/react-router-dom.development.js +0 -199
- package/dist/react-router-dom.development.js.map +0 -1
- package/dist/react-router-dom.production.min.js +0 -12
- package/dist/react-router-dom.production.min.js.map +0 -1
- package/dist/react-router.development.js +0 -12503
- package/dist/react-router.development.js.map +0 -1
- package/dist/react-router.production.min.js +0 -12
- package/dist/react-router.production.min.js.map +0 -1
- package/dist/umd/react-router-dom.development.js +0 -241
- package/dist/umd/react-router-dom.development.js.map +0 -1
- package/dist/umd/react-router-dom.production.min.js +0 -12
- package/dist/umd/react-router-dom.production.min.js.map +0 -1
- package/dist/umd/react-router.development.js +0 -12818
- package/dist/umd/react-router.development.js.map +0 -1
- package/dist/umd/react-router.production.min.js +0 -12
- package/dist/umd/react-router.production.min.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
# `react-router`
|
|
2
2
|
|
|
3
|
+
## 7.0.0-pre.3
|
|
4
|
+
|
|
5
|
+
## 7.0.0-pre.2
|
|
6
|
+
|
|
7
|
+
### Major Changes
|
|
8
|
+
|
|
9
|
+
- Migrate Remix type generics to React Router ([#12180](https://github.com/remix-run/react-router/pull/12180))
|
|
10
|
+
|
|
11
|
+
- These generics are provided for Remix v2 migration purposes
|
|
12
|
+
- These generics and the APIs they exist on should be considered informally deprecated in favor of the new `Route.*` types
|
|
13
|
+
- Anyone migrating from React Router v6 should probably not leverage these new generics and should migrate straight to the `Route.*` types
|
|
14
|
+
- For React Router v6 users, these generics are new and should not impact your app, with one exception
|
|
15
|
+
- `useFetcher` previously had an optional generic (used primarily by Remix v2) that expected the data type
|
|
16
|
+
- This has been updated in v7 to expect the type of the function that generates the data (i.e., `typeof loader`/`typeof action`)
|
|
17
|
+
- Therefore, you should update your usages:
|
|
18
|
+
- ❌ `useFetcher<LoaderData>()`
|
|
19
|
+
- ✅ `useFetcher<typeof loader>()`
|
|
20
|
+
|
|
21
|
+
- - Consolidate types previously duplicated across `@remix-run/router`, `@remix-run/server-runtime`, and `@remix-run/react` now that they all live in `react-router` ([#12177](https://github.com/remix-run/react-router/pull/12177))
|
|
22
|
+
- Examples: `LoaderFunction`, `LoaderFunctionArgs`, `ActionFunction`, `ActionFunctionArgs`, `DataFunctionArgs`, `RouteManifest`, `LinksFunction`, `Route`, `EntryRoute`
|
|
23
|
+
- The `RouteManifest` type used by the "remix" code is now slightly stricter because it is using the former `@remix-run/router` `RouteManifest`
|
|
24
|
+
- `Record<string, Route> -> Record<string, Route | undefined>`
|
|
25
|
+
- Removed `AppData` type in favor of inlining `unknown` in the few locations it was used
|
|
26
|
+
- Removed `ServerRuntimeMeta*` types in favor of the `Meta*` types they were duplicated from
|
|
27
|
+
- Drop support for Node 18, update minimum Node vestion to 20 ([#12171](https://github.com/remix-run/react-router/pull/12171))
|
|
28
|
+
|
|
29
|
+
- Remove `installGlobals()` as this should no longer be necessary
|
|
30
|
+
|
|
31
|
+
- Update `cookie` dependency to `^1.0.1` - please see the [release notes](https://github.com/jshttp/cookie/releases) for any breaking changes ([#12172](https://github.com/remix-run/react-router/pull/12172))
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- Replace `substr` with `substring` ([#12080](https://github.com/remix-run/react-router/pull/12080))
|
|
36
|
+
- Remove the deprecated `json` utility ([#12146](https://github.com/remix-run/react-router/pull/12146))
|
|
37
|
+
|
|
38
|
+
- You can use [`Response.json`](https://developer.mozilla.org/en-US/docs/Web/API/Response/json_static) if you still need to construct JSON responses in your app
|
|
39
|
+
|
|
40
|
+
- Updated dependencies:
|
|
41
|
+
- `react-router@7.0.0-pre.2`
|
|
42
|
+
|
|
3
43
|
## 7.0.0-pre.1
|
|
4
44
|
|
|
5
45
|
### Patch Changes
|