@jsenv/test 3.5.27 → 3.5.29
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/jsenv_test.js +14 -8
- package/package.json +7 -7
package/dist/jsenv_test.js
CHANGED
|
@@ -1871,14 +1871,20 @@ const urlIsInsideOf = (url, otherUrl) => {
|
|
|
1871
1871
|
|
|
1872
1872
|
const urlToFileSystemPath = (url) => {
|
|
1873
1873
|
const urlObject = new URL(url);
|
|
1874
|
-
let
|
|
1875
|
-
if (urlObject.
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1874
|
+
let { origin, pathname, hash } = urlObject;
|
|
1875
|
+
if (urlObject.protocol === "file:") {
|
|
1876
|
+
origin = "file://";
|
|
1877
|
+
}
|
|
1878
|
+
pathname = pathname
|
|
1879
|
+
.split("/")
|
|
1880
|
+
.map((part) => {
|
|
1881
|
+
return part.replace(/%(?![0-9A-F][0-9A-F])/g, "%25");
|
|
1882
|
+
})
|
|
1883
|
+
.join("/");
|
|
1884
|
+
if (hash) {
|
|
1885
|
+
pathname += `%23${encodeURIComponent(hash.slice(1))}`;
|
|
1886
|
+
}
|
|
1887
|
+
const urlString = `${origin}${pathname}`;
|
|
1882
1888
|
const fileSystemPath = fileURLToPath(urlString);
|
|
1883
1889
|
if (fileSystemPath[fileSystemPath.length - 1] === "/") {
|
|
1884
1890
|
// remove trailing / so that nodejs path becomes predictable otherwise it logs
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/test",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.29",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@c88/v8-coverage": "0.1.1",
|
|
39
39
|
"@jsenv/abort": "4.3.0",
|
|
40
|
-
"@jsenv/ast": "6.
|
|
40
|
+
"@jsenv/ast": "6.4.0",
|
|
41
41
|
"@jsenv/exception": "1.1.3",
|
|
42
|
-
"@jsenv/filesystem": "4.10.
|
|
43
|
-
"@jsenv/github-check-run": "0.2.
|
|
42
|
+
"@jsenv/filesystem": "4.10.13",
|
|
43
|
+
"@jsenv/github-check-run": "0.2.5",
|
|
44
44
|
"@jsenv/node-esm-resolution": "1.0.6",
|
|
45
45
|
"@jsenv/humanize": "1.2.8",
|
|
46
|
-
"@jsenv/plugin-supervisor": "1.5.
|
|
47
|
-
"@jsenv/sourcemap": "1.2.
|
|
46
|
+
"@jsenv/plugin-supervisor": "1.5.31",
|
|
47
|
+
"@jsenv/sourcemap": "1.2.27",
|
|
48
48
|
"@jsenv/url-meta": "8.5.2",
|
|
49
|
-
"@jsenv/urls": "2.5.
|
|
49
|
+
"@jsenv/urls": "2.5.4",
|
|
50
50
|
"@jsenv/utils": "2.1.2",
|
|
51
51
|
"he": "1.2.0",
|
|
52
52
|
"istanbul-lib-coverage": "3.2.2",
|