@remix-run/router 1.23.3 → 1.23.4
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 +9 -0
- package/dist/router.cjs.js +5 -15
- package/dist/router.cjs.js.map +1 -1
- package/dist/router.js +5 -15
- package/dist/router.js.map +1 -1
- package/dist/router.umd.js +5 -15
- 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/package.json +1 -1
- package/utils.ts +4 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# `@remix-run/router`
|
|
2
2
|
|
|
3
|
+
## v1.23.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix double slash normalization for `useNavigate` colon urls ([3ed85d5](https://github.com/remix-run/react-router/commit/3ed85d5))
|
|
8
|
+
|
|
9
|
+
- As a reminder, `navigate()` is only intended for navigations within the React Router application and not for external navigations to other domains
|
|
10
|
+
- This change may be a breaking bug fix if you are using `navigate` for external navigations
|
|
11
|
+
|
|
3
12
|
## v1.23.3
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/router.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @remix-run/router v1.23.
|
|
2
|
+
* @remix-run/router v1.23.4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -1177,8 +1177,6 @@ function stripBasename(pathname, basename) {
|
|
|
1177
1177
|
}
|
|
1178
1178
|
return pathname.slice(startIndex) || "/";
|
|
1179
1179
|
}
|
|
1180
|
-
const ABSOLUTE_URL_REGEX$1 = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
1181
|
-
const isAbsoluteUrl = url => ABSOLUTE_URL_REGEX$1.test(url);
|
|
1182
1180
|
|
|
1183
1181
|
/**
|
|
1184
1182
|
* Returns a resolved path object relative to the given pathname.
|
|
@@ -1196,19 +1194,11 @@ function resolvePath(to, fromPathname) {
|
|
|
1196
1194
|
} = typeof to === "string" ? parsePath(to) : to;
|
|
1197
1195
|
let pathname;
|
|
1198
1196
|
if (toPathname) {
|
|
1199
|
-
|
|
1200
|
-
|
|
1197
|
+
toPathname = removeDoubleSlashes(toPathname);
|
|
1198
|
+
if (toPathname.startsWith("/")) {
|
|
1199
|
+
pathname = resolvePathname(toPathname.substring(1), "/");
|
|
1201
1200
|
} else {
|
|
1202
|
-
|
|
1203
|
-
let oldPathname = toPathname;
|
|
1204
|
-
toPathname = removeDoubleSlashes(toPathname);
|
|
1205
|
-
warning(false, "Pathnames cannot have embedded double slashes - normalizing " + (oldPathname + " -> " + toPathname));
|
|
1206
|
-
}
|
|
1207
|
-
if (toPathname.startsWith("/")) {
|
|
1208
|
-
pathname = resolvePathname(toPathname.substring(1), "/");
|
|
1209
|
-
} else {
|
|
1210
|
-
pathname = resolvePathname(toPathname, fromPathname);
|
|
1211
|
-
}
|
|
1201
|
+
pathname = resolvePathname(toPathname, fromPathname);
|
|
1212
1202
|
}
|
|
1213
1203
|
} else {
|
|
1214
1204
|
pathname = fromPathname;
|