@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/router.js CHANGED
@@ -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
  *
@@ -938,12 +938,6 @@ function getInvalidPathError(char, field, dest, path) {
938
938
  function getPathContributingMatches(matches) {
939
939
  return matches.filter((match, index) => index === 0 || match.route.path && match.route.path.length > 0);
940
940
  }
941
- // Return the array of pathnames for the current route matches - used to
942
- // generate the routePathnames input for resolveTo()
943
- function getResolveToMatches(matches) {
944
- // Use the full pathname for the leaf match so we include splat values for "." links
945
- return getPathContributingMatches(matches).map((match, idx) => idx === matches.length - 1 ? match.pathname : match.pathnameBase);
946
- }
947
941
  /**
948
942
  * @private
949
943
  */
@@ -3187,7 +3181,7 @@ function normalizeTo(location, matches, basename, prependBasename, to, fromRoute
3187
3181
  activeRouteMatch = matches[matches.length - 1];
3188
3182
  }
3189
3183
  // Resolve the relative path
3190
- let path = resolveTo(to ? to : ".", getResolveToMatches(contextualMatches), stripBasename(location.pathname, basename) || location.pathname, relative === "path");
3184
+ let path = resolveTo(to ? to : ".", getPathContributingMatches(contextualMatches).map(m => m.pathnameBase), stripBasename(location.pathname, basename) || location.pathname, relative === "path");
3191
3185
  // When `to` is not specified we inherit search/hash from the current
3192
3186
  // location, unlike when to="." and we just inherit the path.
3193
3187
  // See https://github.com/remix-run/remix/issues/927
@@ -4239,5 +4233,5 @@ function persistAppliedTransitions(_window, transitions) {
4239
4233
  }
4240
4234
  //#endregion
4241
4235
 
4242
- export { AbortedDeferredError, Action, IDLE_BLOCKER, IDLE_FETCHER, IDLE_NAVIGATION, UNSAFE_DEFERRED_SYMBOL, DeferredData as UNSAFE_DeferredData, ErrorResponseImpl as UNSAFE_ErrorResponseImpl, convertRouteMatchToUiMatch as UNSAFE_convertRouteMatchToUiMatch, convertRoutesToDataRoutes as UNSAFE_convertRoutesToDataRoutes, getResolveToMatches as UNSAFE_getResolveToMatches, invariant as UNSAFE_invariant, warning as UNSAFE_warning, createBrowserHistory, createHashHistory, createMemoryHistory, createPath, createRouter, createStaticHandler, defer, generatePath, getStaticContextFromError, getToPathname, isDeferredData, isRouteErrorResponse, joinPaths, json, matchPath, matchRoutes, normalizePathname, parsePath, redirect, redirectDocument, resolvePath, resolveTo, stripBasename };
4236
+ export { AbortedDeferredError, Action, IDLE_BLOCKER, IDLE_FETCHER, IDLE_NAVIGATION, UNSAFE_DEFERRED_SYMBOL, DeferredData as UNSAFE_DeferredData, ErrorResponseImpl as UNSAFE_ErrorResponseImpl, convertRouteMatchToUiMatch as UNSAFE_convertRouteMatchToUiMatch, convertRoutesToDataRoutes as UNSAFE_convertRoutesToDataRoutes, getPathContributingMatches as UNSAFE_getPathContributingMatches, invariant as UNSAFE_invariant, warning as UNSAFE_warning, createBrowserHistory, createHashHistory, createMemoryHistory, createPath, createRouter, createStaticHandler, defer, generatePath, getStaticContextFromError, getToPathname, isDeferredData, isRouteErrorResponse, joinPaths, json, matchPath, matchRoutes, normalizePathname, parsePath, redirect, redirectDocument, resolvePath, resolveTo, stripBasename };
4243
4237
  //# sourceMappingURL=router.js.map