@remix-run/router 0.2.0-pre.5 → 0.2.0-pre.8
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 +35 -4
- package/dist/index.d.ts +2 -2
- package/dist/router.cjs.js +245 -189
- package/dist/router.cjs.js.map +1 -1
- package/dist/router.d.ts +19 -8
- package/dist/router.js +244 -186
- package/dist/router.js.map +1 -1
- package/dist/utils.d.ts +41 -37
- package/index.ts +6 -6
- package/package.json +1 -1
- package/router.ts +247 -192
- package/utils.ts +171 -130
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @remix-run/router
|
|
2
2
|
|
|
3
|
+
## 0.2.0-pre.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix: avoid uneccesary re-renders on `defer` resolution (#9155)
|
|
8
|
+
- fix: pass `useMatches` objects to `ScrollRestoration` `getKey` (#9157)
|
|
9
|
+
- fix: fetcher submission revalidating fetchers using wrong key (#9166)
|
|
10
|
+
- fix: use a push navigation on submission errors (#9162)
|
|
11
|
+
|
|
12
|
+
## 0.2.0-pre.7
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- fix: fix default redirect push/replace behavior (#9117)
|
|
17
|
+
|
|
18
|
+
## 0.2.0-pre.6
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- fix: Rename `<Deferred>` to `<Await>` (#9095)
|
|
23
|
+
|
|
24
|
+
- We are no longer replacing the `Promise` on `loaderData` with the value/error
|
|
25
|
+
when it settles so it's now always a `Promise`.
|
|
26
|
+
- To that end, we changed from `<Deferred value={promise}>` to
|
|
27
|
+
`<Await resolve={promise}>` for clarity, and it also now supports using
|
|
28
|
+
`<Await>` with raw promises from anywhere, not only those on `loaderData`
|
|
29
|
+
from a defer() call.
|
|
30
|
+
- Note that raw promises will not be automatically cancelled on interruptions
|
|
31
|
+
so they are not recommended
|
|
32
|
+
- The hooks are now `useAsyncValue`/`useAsyncError`
|
|
33
|
+
|
|
3
34
|
## 0.2.0-pre.5
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
|
@@ -7,10 +38,10 @@
|
|
|
7
38
|
- feat: Deferred API Updates (#9070)
|
|
8
39
|
|
|
9
40
|
- Support array and single promise usages
|
|
10
|
-
- `return
|
|
11
|
-
- `return
|
|
41
|
+
- `return defer([ await critical(), lazy() ])`
|
|
42
|
+
- `return defer(lazy())`
|
|
12
43
|
- Remove `Deferrable`/`ResolvedDeferrable` in favor of raw `Promise`'s and `Awaited`
|
|
13
|
-
- Remove generics from `
|
|
44
|
+
- Remove generics from `useAsyncValue` until `useLoaderData` generic is decided in 6.5
|
|
14
45
|
|
|
15
46
|
- feat: Add `createStaticRouter` for `@remix-run/router` SSR usage (#9013)
|
|
16
47
|
|
|
@@ -85,7 +116,7 @@
|
|
|
85
116
|
### Patch Changes
|
|
86
117
|
|
|
87
118
|
- fix: Handle fetcher 404s as normal boundary errors (#9015)
|
|
88
|
-
- feat: adds `
|
|
119
|
+
- feat: adds `defer()` support to data routers (#9002)
|
|
89
120
|
- feat: add basename support for data routers (#9026)
|
|
90
121
|
- ci: simplify dist/ directory for CJS/ESM only (#9017)
|
|
91
122
|
- fix: Fix trailing slash behavior on pathless routing when using a basename (#9045)
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { BrowserHistoryOptions, HashHistoryOptions, MemoryHistoryOptions } from "./history";
|
|
2
2
|
import type { Router, RouterInit } from "./router";
|
|
3
3
|
import { convertRoutesToDataRoutes } from "./utils";
|
|
4
|
-
export type { ActionFunction, ActionFunctionArgs,
|
|
5
|
-
export { ErrorResponse,
|
|
4
|
+
export type { ActionFunction, ActionFunctionArgs, AgnosticDataRouteMatch, AgnosticDataRouteObject, AgnosticRouteMatch, AgnosticRouteObject, TrackedPromise, FormEncType, FormMethod, JsonFunction, LoaderFunction, LoaderFunctionArgs, ParamParseKey, Params, PathMatch, PathPattern, RedirectFunction, ShouldRevalidateFunction, Submission, } from "./utils";
|
|
5
|
+
export { ErrorResponse, defer, generatePath, getToPathname, invariant, isRouteErrorResponse, joinPaths, json, matchPath, matchRoutes, normalizePathname, redirect, resolvePath, resolveTo, stripBasename, warning, } from "./utils";
|
|
6
6
|
export type { BrowserHistory, HashHistory, History, InitialEntry, Location, MemoryHistory, Path, To, } from "./history";
|
|
7
7
|
export { Action, createBrowserHistory, createPath, createHashHistory, createMemoryHistory, parsePath, } from "./history";
|
|
8
8
|
export * from "./router";
|