@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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/router v1.13.0
2
+ * @remix-run/router v1.13.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1194,13 +1194,6 @@
1194
1194
  return matches.filter((match, index) => index === 0 || match.route.path && match.route.path.length > 0);
1195
1195
  }
1196
1196
 
1197
- // Return the array of pathnames for the current route matches - used to
1198
- // generate the routePathnames input for resolveTo()
1199
- function getResolveToMatches(matches) {
1200
- // Use the full pathname for the leaf match so we include splat values for "." links
1201
- return getPathContributingMatches(matches).map((match, idx) => idx === matches.length - 1 ? match.pathname : match.pathnameBase);
1202
- }
1203
-
1204
1197
  /**
1205
1198
  * @private
1206
1199
  */
@@ -3652,7 +3645,7 @@
3652
3645
  }
3653
3646
 
3654
3647
  // Resolve the relative path
3655
- let path = resolveTo(to ? to : ".", getResolveToMatches(contextualMatches), stripBasename(location.pathname, basename) || location.pathname, relative === "path");
3648
+ let path = resolveTo(to ? to : ".", getPathContributingMatches(contextualMatches).map(m => m.pathnameBase), stripBasename(location.pathname, basename) || location.pathname, relative === "path");
3656
3649
 
3657
3650
  // When `to` is not specified we inherit search/hash from the current
3658
3651
  // location, unlike when to="." and we just inherit the path.
@@ -4751,7 +4744,7 @@
4751
4744
  exports.UNSAFE_ErrorResponseImpl = ErrorResponseImpl;
4752
4745
  exports.UNSAFE_convertRouteMatchToUiMatch = convertRouteMatchToUiMatch;
4753
4746
  exports.UNSAFE_convertRoutesToDataRoutes = convertRoutesToDataRoutes;
4754
- exports.UNSAFE_getResolveToMatches = getResolveToMatches;
4747
+ exports.UNSAFE_getPathContributingMatches = getPathContributingMatches;
4755
4748
  exports.UNSAFE_invariant = invariant;
4756
4749
  exports.UNSAFE_warning = warning;
4757
4750
  exports.createBrowserHistory = createBrowserHistory;