react-router 6.26.0-pre.1 → 6.26.1-pre.0

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 CHANGED
@@ -1,13 +1,14 @@
1
1
  # `react-router`
2
2
 
3
- ## 6.26.0-pre.1
3
+ ## 6.26.1-pre.0
4
4
 
5
5
  ### Patch Changes
6
6
 
7
+ - Rename `unstable_patchRoutesOnMiss` to `unstable_patchRoutesOnNavigation` because it will now be called on the first navigation to paths matching splat/param routes in case there exists a higher-scoring route match not yet discovered ([#11888](https://github.com/remix-run/react-router/pull/11888))
7
8
  - Updated dependencies:
8
- - `@remix-run/router@1.19.0-pre.1`
9
+ - `@remix-run/router@1.19.1-pre.0`
9
10
 
10
- ## 6.26.0-pre.0
11
+ ## 6.26.0
11
12
 
12
13
  ### Minor Changes
13
14
 
@@ -16,11 +17,9 @@
16
17
  ### Patch Changes
17
18
 
18
19
  - Fix initial hydration behavior when using `future.v7_partialHydration` along with `unstable_patchRoutesOnMiss` ([#11838](https://github.com/remix-run/react-router/pull/11838))
19
-
20
20
  - During initial hydration, `router.state.matches` will now include any partial matches so that we can render ancestor `HydrateFallback` components
21
-
22
21
  - Updated dependencies:
23
- - `@remix-run/router@1.19.0-pre.0`
22
+ - `@remix-run/router@1.19.0`
24
23
 
25
24
  ## 6.25.1
26
25
 
@@ -31,7 +30,6 @@ No significant changes to this package were made in this release. [See the repo
31
30
  ### Minor Changes
32
31
 
33
32
  - Stabilize `future.unstable_skipActionErrorRevalidation` as `future.v7_skipActionErrorRevalidation` ([#11769](https://github.com/remix-run/react-router/pull/11769))
34
-
35
33
  - When this flag is enabled, actions will not automatically trigger a revalidation if they return/throw a `Response` with a `4xx`/`5xx` status code
36
34
  - You may still opt-into revalidation via `shouldRevalidate`
37
35
  - This also changes `shouldRevalidate`'s `unstable_actionStatus` parameter to `actionStatus`
@@ -55,7 +53,6 @@ No significant changes to this package were made in this release. [See the repo
55
53
  ### Minor Changes
56
54
 
57
55
  - Add support for Lazy Route Discovery (a.k.a. Fog of War) ([#11626](https://github.com/remix-run/react-router/pull/11626))
58
-
59
56
  - RFC: <https://github.com/remix-run/react-router/discussions/11113>
60
57
  - `unstable_patchRoutesOnMiss` docs: <https://reactrouter.com/en/main/routers/create-browser-router>
61
58
 
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ActionFunction, ActionFunctionArgs, Blocker, BlockerFunction, unstable_DataStrategyFunction, unstable_DataStrategyFunctionArgs, unstable_DataStrategyMatch, ErrorResponse, Fetcher, HydrationState, InitialEntry, JsonFunction, LazyRouteFunction, LoaderFunction, LoaderFunctionArgs, Location, Navigation, ParamParseKey, Params, Path, PathMatch, PathParam, PathPattern, RedirectFunction, RelativeRoutingType, Router as RemixRouter, FutureConfig as RouterFutureConfig, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, To, UIMatch, unstable_HandlerResult, unstable_AgnosticPatchRoutesOnMissFunction } from "@remix-run/router";
1
+ import type { ActionFunction, ActionFunctionArgs, Blocker, BlockerFunction, unstable_DataStrategyFunction, unstable_DataStrategyFunctionArgs, unstable_DataStrategyMatch, ErrorResponse, Fetcher, HydrationState, InitialEntry, JsonFunction, LazyRouteFunction, LoaderFunction, LoaderFunctionArgs, Location, Navigation, ParamParseKey, Params, Path, PathMatch, PathParam, PathPattern, RedirectFunction, RelativeRoutingType, Router as RemixRouter, FutureConfig as RouterFutureConfig, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, To, UIMatch, unstable_HandlerResult, unstable_AgnosticPatchRoutesOnNavigationFunction } from "@remix-run/router";
2
2
  import { AbortedDeferredError, Action as NavigationType, createPath, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, replace, resolvePath } from "@remix-run/router";
3
3
  import type { AwaitProps, FutureConfig, IndexRouteProps, LayoutRouteProps, MemoryRouterProps, NavigateProps, OutletProps, PathRouteProps, RouteProps, RouterProps, RouterProviderProps, RoutesProps } from "./lib/components";
4
4
  import { Await, MemoryRouter, Navigate, Outlet, Route, Router, RouterProvider, Routes, createRoutesFromChildren, renderMatches } from "./lib/components";
@@ -14,7 +14,7 @@ export { AbortedDeferredError, Await, MemoryRouter, Navigate, NavigationType, Ou
14
14
  declare function mapRouteProperties(route: RouteObject): Partial<RouteObject> & {
15
15
  hasErrorBoundary: boolean;
16
16
  };
17
- export interface unstable_PatchRoutesOnMissFunction extends unstable_AgnosticPatchRoutesOnMissFunction<RouteMatch> {
17
+ export interface unstable_PatchRoutesOnNavigationFunction extends unstable_AgnosticPatchRoutesOnNavigationFunction<RouteMatch> {
18
18
  }
19
19
  export declare function createMemoryRouter(routes: RouteObject[], opts?: {
20
20
  basename?: string;
@@ -23,7 +23,7 @@ export declare function createMemoryRouter(routes: RouteObject[], opts?: {
23
23
  initialEntries?: InitialEntry[];
24
24
  initialIndex?: number;
25
25
  unstable_dataStrategy?: unstable_DataStrategyFunction;
26
- unstable_patchRoutesOnMiss?: unstable_PatchRoutesOnMissFunction;
26
+ unstable_patchRoutesOnNavigation?: unstable_PatchRoutesOnNavigationFunction;
27
27
  }): RemixRouter;
28
28
  /** @internal */
29
29
  export { DataRouterContext as UNSAFE_DataRouterContext, DataRouterStateContext as UNSAFE_DataRouterStateContext, LocationContext as UNSAFE_LocationContext, NavigationContext as UNSAFE_NavigationContext, RouteContext as UNSAFE_RouteContext, mapRouteProperties as UNSAFE_mapRouteProperties, useRouteId as UNSAFE_useRouteId, useRoutesImpl as UNSAFE_useRoutesImpl, };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * React Router v6.26.0-pre.1
2
+ * React Router v6.26.1-pre.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -551,7 +551,7 @@ function _renderMatches(matches, parentMatches, dataRouterState, future) {
551
551
  matches = dataRouterState.matches;
552
552
  } else if ((_future = future) != null && _future.v7_partialHydration && parentMatches.length === 0 && !dataRouterState.initialized && dataRouterState.matches.length > 0) {
553
553
  // Don't bail if we're initializing with partial hydration and we have
554
- // router matches. That means we're actively running `patchRoutesOnMiss`
554
+ // router matches. That means we're actively running `patchRoutesOnNavigation`
555
555
  // so we should render down the partial matches to the appropriate
556
556
  // `HydrateFallback`. We only do this if `parentMatches` is empty so it
557
557
  // only impacts the root matches for `RouterProvider` and no descendant
@@ -1459,7 +1459,7 @@ function createMemoryRouter(routes, opts) {
1459
1459
  routes,
1460
1460
  mapRouteProperties,
1461
1461
  unstable_dataStrategy: opts == null ? void 0 : opts.unstable_dataStrategy,
1462
- unstable_patchRoutesOnMiss: opts == null ? void 0 : opts.unstable_patchRoutesOnMiss
1462
+ unstable_patchRoutesOnNavigation: opts == null ? void 0 : opts.unstable_patchRoutesOnNavigation
1463
1463
  }).initialize();
1464
1464
  }
1465
1465