@cspell/url 9.6.1 → 9.6.3
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/index.js +6 -6
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -306,16 +306,16 @@ var FileUrlBuilder = class {
|
|
|
306
306
|
relativeTo ??= this.cwd;
|
|
307
307
|
isWindows && (filenameOrUrl = filenameOrUrl.replaceAll("\\", "/"));
|
|
308
308
|
if (this.isAbsolute(filenameOrUrl) && isFileURL(relativeTo)) {
|
|
309
|
-
const pathname
|
|
310
|
-
if (isWindowsFileUrl(relativeTo) && !isWindowsPathnameWithDriveLatter(pathname
|
|
309
|
+
const pathname = this.normalizeFilePathForUrl(filenameOrUrl);
|
|
310
|
+
if (isWindowsFileUrl(relativeTo) && !isWindowsPathnameWithDriveLatter(pathname)) {
|
|
311
311
|
const relFilePrefix = relativeTo.toString().slice(0, 10);
|
|
312
|
-
return normalizeWindowsUrl(new URL(relFilePrefix + pathname
|
|
312
|
+
return normalizeWindowsUrl(new URL(relFilePrefix + pathname));
|
|
313
313
|
}
|
|
314
|
-
return normalizeWindowsUrl(new URL("file://" + pathname
|
|
314
|
+
return normalizeWindowsUrl(new URL("file://" + pathname));
|
|
315
315
|
}
|
|
316
316
|
if (isUrlLike(relativeTo)) {
|
|
317
|
-
const pathname
|
|
318
|
-
return normalizeWindowsUrl(new URL(pathname
|
|
317
|
+
const pathname = this.normalizeFilePathForUrl(filenameOrUrl);
|
|
318
|
+
return normalizeWindowsUrl(new URL(pathname, relativeTo));
|
|
319
319
|
}
|
|
320
320
|
const appendSlash = filenameOrUrl.endsWith("/") ? "/" : "";
|
|
321
321
|
const pathname = this.normalizeFilePathForUrl(this.path.resolve(relativeTo.toString(), filenameOrUrl)) + appendSlash;
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public",
|
|
5
5
|
"provenance": true
|
|
6
6
|
},
|
|
7
|
-
"version": "9.6.
|
|
7
|
+
"version": "9.6.3",
|
|
8
8
|
"description": "URL parsing and manipulation utilities for cspell",
|
|
9
9
|
"keywords": [
|
|
10
10
|
"cspell",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"engines": {
|
|
58
58
|
"node": ">=20"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "500b996b6c0a6ff025c42ef98db44776f43a9e72"
|
|
61
61
|
}
|