@remix-run/router 0.0.0-experimental-de419c3d → 0.0.0-experimental-0141b5ec
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 +12 -0
- package/dist/index.d.ts +1 -1
- package/dist/router.cjs.js +21 -7
- package/dist/router.cjs.js.map +1 -1
- package/dist/router.js +19 -7
- package/dist/router.js.map +1 -1
- package/dist/router.umd.js +21 -7
- package/dist/router.umd.js.map +1 -1
- package/dist/router.umd.min.js +2 -2
- package/dist/router.umd.min.js.map +1 -1
- package/index.ts +2 -1
- package/package.json +1 -1
- package/router.ts +10 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# `@remix-run/router`
|
|
2
2
|
|
|
3
|
+
## 1.15.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Preserve hydrated errors during partial hydration runs ([#11305](https://github.com/remix-run/react-router/pull/11305))
|
|
8
|
+
|
|
9
|
+
## 1.15.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Fix encoding/decoding issues with pre-encoded dynamic parameter values ([#11199](https://github.com/remix-run/react-router/pull/11199))
|
|
14
|
+
|
|
3
15
|
## 1.15.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type { ActionFunction, ActionFunctionArgs, AgnosticDataIndexRouteObject, AgnosticDataNonIndexRouteObject, AgnosticDataRouteMatch, AgnosticDataRouteObject, AgnosticIndexRouteObject, AgnosticNonIndexRouteObject, AgnosticRouteMatch, AgnosticRouteObject, DataStrategyFunction, DataStrategyFunctionArgs, DataStrategyMatch, ErrorResponse, FormEncType, FormMethod, HTMLFormMethod, JsonFunction, LazyRouteFunction, LoaderFunction, LoaderFunctionArgs, ParamParseKey, Params, PathMatch, PathParam, PathPattern, RedirectFunction, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, TrackedPromise, UIMatch, V7_FormMethod, } from "./utils";
|
|
2
|
-
export { AbortedDeferredError, DecodedResponse, defer, generatePath, getToPathname, isRouteErrorResponse, joinPaths, json, matchPath, matchRoutes, normalizePathname, redirect, redirectDocument, resolvePath, resolveTo, stripBasename, } from "./utils";
|
|
2
|
+
export { AbortedDeferredError, DecodedResponse as unstable_DecodedResponse, defer, generatePath, getToPathname, isDecodedResponse as unstable_isDecodedResponse, isRouteErrorResponse, joinPaths, json, matchPath, matchRoutes, normalizePathname, redirect, redirectDocument, resolvePath, resolveTo, stripBasename, } from "./utils";
|
|
3
3
|
export type { BrowserHistory, BrowserHistoryOptions, HashHistory, HashHistoryOptions, History, InitialEntry, Location, MemoryHistory, MemoryHistoryOptions, Path, To, } from "./history";
|
|
4
4
|
export { Action, createBrowserHistory, createHashHistory, createMemoryHistory, createPath, parsePath, } from "./history";
|
|
5
5
|
export * from "./router";
|
package/dist/router.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @remix-run/router v0.0.0-experimental-
|
|
2
|
+
* @remix-run/router v0.0.0-experimental-0141b5ec
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -2454,7 +2454,7 @@ function createRouter(init) {
|
|
|
2454
2454
|
// preserving any new action data or existing action data (in the case of
|
|
2455
2455
|
// a revalidation interrupting an actionReload)
|
|
2456
2456
|
// If we have partialHydration enabled, then don't update the state for the
|
|
2457
|
-
// initial data load since
|
|
2457
|
+
// initial data load since it's not a "navigation"
|
|
2458
2458
|
if (!isUninterruptedRevalidation && (!future.v7_partialHydration || !initialHydration)) {
|
|
2459
2459
|
revalidatingFetchers.forEach(rf => {
|
|
2460
2460
|
let fetcher = state.fetchers.get(rf.key);
|
|
@@ -2556,6 +2556,19 @@ function createRouter(init) {
|
|
|
2556
2556
|
}
|
|
2557
2557
|
});
|
|
2558
2558
|
});
|
|
2559
|
+
|
|
2560
|
+
// During partial hydration, preserve SSR errors for routes that don't re-run
|
|
2561
|
+
if (future.v7_partialHydration && initialHydration && state.errors) {
|
|
2562
|
+
Object.entries(state.errors).filter(_ref2 => {
|
|
2563
|
+
let [id] = _ref2;
|
|
2564
|
+
return !matchesToLoad.some(m => m.route.id === id);
|
|
2565
|
+
}).forEach(_ref3 => {
|
|
2566
|
+
let [routeId, error] = _ref3;
|
|
2567
|
+
errors = Object.assign(errors || {}, {
|
|
2568
|
+
[routeId]: error
|
|
2569
|
+
});
|
|
2570
|
+
});
|
|
2571
|
+
}
|
|
2559
2572
|
let updatedFetchers = markFetchRedirectsDone();
|
|
2560
2573
|
let didAbortFetchLoads = abortStaleFetchLoads(pendingNavigationLoadId);
|
|
2561
2574
|
let shouldUpdateFetchers = updatedFetchers || didAbortFetchLoads || revalidatingFetchers.length > 0;
|
|
@@ -3156,12 +3169,12 @@ function createRouter(init) {
|
|
|
3156
3169
|
blockers
|
|
3157
3170
|
});
|
|
3158
3171
|
}
|
|
3159
|
-
function shouldBlockNavigation(
|
|
3172
|
+
function shouldBlockNavigation(_ref4) {
|
|
3160
3173
|
let {
|
|
3161
3174
|
currentLocation,
|
|
3162
3175
|
nextLocation,
|
|
3163
3176
|
historyAction
|
|
3164
|
-
} =
|
|
3177
|
+
} = _ref4;
|
|
3165
3178
|
if (blockerFunctions.size === 0) {
|
|
3166
3179
|
return;
|
|
3167
3180
|
}
|
|
@@ -3832,8 +3845,8 @@ function normalizeNavigateOptions(normalizeFormMethod, isFetcher, path, opts) {
|
|
|
3832
3845
|
}
|
|
3833
3846
|
let text = typeof opts.body === "string" ? opts.body : opts.body instanceof FormData || opts.body instanceof URLSearchParams ?
|
|
3834
3847
|
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#plain-text-form-data
|
|
3835
|
-
Array.from(opts.body.entries()).reduce((acc,
|
|
3836
|
-
let [name, value] =
|
|
3848
|
+
Array.from(opts.body.entries()).reduce((acc, _ref5) => {
|
|
3849
|
+
let [name, value] = _ref5;
|
|
3837
3850
|
return "" + acc + name + "=" + value + "\n";
|
|
3838
3851
|
}, "") : String(opts.body);
|
|
3839
3852
|
return {
|
|
@@ -4965,7 +4978,6 @@ function persistAppliedTransitions(_window, transitions) {
|
|
|
4965
4978
|
|
|
4966
4979
|
exports.AbortedDeferredError = AbortedDeferredError;
|
|
4967
4980
|
exports.Action = Action;
|
|
4968
|
-
exports.DecodedResponse = DecodedResponse;
|
|
4969
4981
|
exports.IDLE_BLOCKER = IDLE_BLOCKER;
|
|
4970
4982
|
exports.IDLE_FETCHER = IDLE_FETCHER;
|
|
4971
4983
|
exports.IDLE_NAVIGATION = IDLE_NAVIGATION;
|
|
@@ -5000,4 +5012,6 @@ exports.redirectDocument = redirectDocument;
|
|
|
5000
5012
|
exports.resolvePath = resolvePath;
|
|
5001
5013
|
exports.resolveTo = resolveTo;
|
|
5002
5014
|
exports.stripBasename = stripBasename;
|
|
5015
|
+
exports.unstable_DecodedResponse = DecodedResponse;
|
|
5016
|
+
exports.unstable_isDecodedResponse = isDecodedResponse;
|
|
5003
5017
|
//# sourceMappingURL=router.cjs.js.map
|