@remix-run/router 1.13.0 → 1.13.1

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/dist/utils.d.ts CHANGED
@@ -399,7 +399,6 @@ export declare function resolvePath(to: To, fromPathname?: string): Path;
399
399
  * </Route>
400
400
  */
401
401
  export declare function getPathContributingMatches<T extends AgnosticRouteMatch = AgnosticRouteMatch>(matches: T[]): T[];
402
- export declare function getResolveToMatches<T extends AgnosticRouteMatch = AgnosticRouteMatch>(matches: T[]): string[];
403
402
  /**
404
403
  * @private
405
404
  */
package/index.ts CHANGED
@@ -87,7 +87,7 @@ export {
87
87
  ErrorResponseImpl as UNSAFE_ErrorResponseImpl,
88
88
  convertRoutesToDataRoutes as UNSAFE_convertRoutesToDataRoutes,
89
89
  convertRouteMatchToUiMatch as UNSAFE_convertRouteMatchToUiMatch,
90
- getResolveToMatches as UNSAFE_getResolveToMatches,
90
+ getPathContributingMatches as UNSAFE_getPathContributingMatches,
91
91
  } from "./utils";
92
92
 
93
93
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remix-run/router",
3
- "version": "1.13.0",
3
+ "version": "1.13.1",
4
4
  "description": "Nested/Data-driven/Framework-agnostic Routing",
5
5
  "keywords": [
6
6
  "remix",
package/router.ts CHANGED
@@ -40,7 +40,6 @@ import {
40
40
  convertRouteMatchToUiMatch,
41
41
  convertRoutesToDataRoutes,
42
42
  getPathContributingMatches,
43
- getResolveToMatches,
44
43
  immutableRouteKeys,
45
44
  isRouteErrorResponse,
46
45
  joinPaths,
@@ -3341,7 +3340,7 @@ function normalizeTo(
3341
3340
  // Resolve the relative path
3342
3341
  let path = resolveTo(
3343
3342
  to ? to : ".",
3344
- getResolveToMatches(contextualMatches),
3343
+ getPathContributingMatches(contextualMatches).map((m) => m.pathnameBase),
3345
3344
  stripBasename(location.pathname, basename) || location.pathname,
3346
3345
  relative === "path"
3347
3346
  );
package/utils.ts CHANGED
@@ -1145,17 +1145,6 @@ export function getPathContributingMatches<
1145
1145
  );
1146
1146
  }
1147
1147
 
1148
- // Return the array of pathnames for the current route matches - used to
1149
- // generate the routePathnames input for resolveTo()
1150
- export function getResolveToMatches<
1151
- T extends AgnosticRouteMatch = AgnosticRouteMatch
1152
- >(matches: T[]) {
1153
- // Use the full pathname for the leaf match so we include splat values for "." links
1154
- return getPathContributingMatches(matches).map((match, idx) =>
1155
- idx === matches.length - 1 ? match.pathname : match.pathnameBase
1156
- );
1157
- }
1158
-
1159
1148
  /**
1160
1149
  * @private
1161
1150
  */