@jsenv/test 3.3.9 → 3.3.11
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
CHANGED
|
@@ -1676,18 +1676,26 @@ const pathnameToExtension = (pathname) => {
|
|
|
1676
1676
|
};
|
|
1677
1677
|
|
|
1678
1678
|
const ensurePathnameTrailingSlash = (url) => {
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1679
|
+
if (typeof url === "string") {
|
|
1680
|
+
const urlObject = new URL(url);
|
|
1681
|
+
const { pathname } = urlObject;
|
|
1682
|
+
if (pathname.endsWith("/")) {
|
|
1683
|
+
return url;
|
|
1684
|
+
}
|
|
1685
|
+
let { origin } = urlObject;
|
|
1686
|
+
// origin is "null" for "file://" urls with Node.js
|
|
1687
|
+
if (origin === "null" && urlObject.href.startsWith("file:")) {
|
|
1688
|
+
origin = "file://";
|
|
1689
|
+
}
|
|
1690
|
+
const { search, hash } = urlObject;
|
|
1691
|
+
const urlWithTrailingSlash = `${origin}${pathname}/${search}${hash}`;
|
|
1692
|
+
return urlWithTrailingSlash;
|
|
1693
|
+
}
|
|
1694
|
+
if (url.pathname.endsWith("/")) {
|
|
1682
1695
|
return url;
|
|
1683
1696
|
}
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
if (origin === "null" && urlObject.href.startsWith("file:")) {
|
|
1687
|
-
origin = "file://";
|
|
1688
|
-
}
|
|
1689
|
-
const { search, hash } = urlObject;
|
|
1690
|
-
return `${origin}${pathname}/${search}${hash}`;
|
|
1697
|
+
url.pathname += "/";
|
|
1698
|
+
return url;
|
|
1691
1699
|
};
|
|
1692
1700
|
|
|
1693
1701
|
const isFileSystemPath = (value) => {
|
|
@@ -4891,9 +4899,9 @@ const reporterList = ({
|
|
|
4891
4899
|
infos.push(ANSI.color(duration, ANSI.GREY));
|
|
4892
4900
|
let memoryUsageColor = ANSI.GREY;
|
|
4893
4901
|
const memoryHeapUsed = memoryUsage().heapUsed;
|
|
4894
|
-
if (memoryHeapUsed >
|
|
4902
|
+
if (memoryHeapUsed > 2.5 * memoryHeapUsedAtStart) {
|
|
4895
4903
|
memoryUsageColor = ANSI.YELLOW;
|
|
4896
|
-
} else if (memoryHeapUsed > 1.
|
|
4904
|
+
} else if (memoryHeapUsed > 1.5 * memoryHeapUsedAtStart) {
|
|
4897
4905
|
memoryUsageColor = null;
|
|
4898
4906
|
}
|
|
4899
4907
|
const memoryHeapUsedFormatted = humanizeMemory(memoryHeapUsed, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/test",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.11",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@c88/v8-coverage": "0.1.1",
|
|
40
40
|
"@jsenv/abort": "4.3.0",
|
|
41
|
-
"@jsenv/ast": "6.2.
|
|
42
|
-
"@jsenv/filesystem": "4.8.
|
|
43
|
-
"@jsenv/github-check-run": "0.1.
|
|
41
|
+
"@jsenv/ast": "6.2.3",
|
|
42
|
+
"@jsenv/filesystem": "4.8.1",
|
|
43
|
+
"@jsenv/github-check-run": "0.1.22",
|
|
44
44
|
"@jsenv/humanize": "1.2.4",
|
|
45
|
-
"@jsenv/plugin-supervisor": "1.5.
|
|
46
|
-
"@jsenv/sourcemap": "1.2.
|
|
45
|
+
"@jsenv/plugin-supervisor": "1.5.4",
|
|
46
|
+
"@jsenv/sourcemap": "1.2.15",
|
|
47
47
|
"@jsenv/url-meta": "8.4.2",
|
|
48
|
-
"@jsenv/urls": "2.
|
|
48
|
+
"@jsenv/urls": "2.3.0",
|
|
49
49
|
"@jsenv/utils": "2.1.1",
|
|
50
50
|
"errorstacks": "2.4.1",
|
|
51
51
|
"he": "1.2.0",
|
|
@@ -136,9 +136,9 @@ export const reporterList = ({
|
|
|
136
136
|
infos.push(ANSI.color(duration, ANSI.GREY));
|
|
137
137
|
let memoryUsageColor = ANSI.GREY;
|
|
138
138
|
const memoryHeapUsed = processMemoryUsage().heapUsed;
|
|
139
|
-
if (memoryHeapUsed >
|
|
139
|
+
if (memoryHeapUsed > 2.5 * memoryHeapUsedAtStart) {
|
|
140
140
|
memoryUsageColor = ANSI.YELLOW;
|
|
141
|
-
} else if (memoryHeapUsed > 1.
|
|
141
|
+
} else if (memoryHeapUsed > 1.5 * memoryHeapUsedAtStart) {
|
|
142
142
|
memoryUsageColor = null;
|
|
143
143
|
}
|
|
144
144
|
const memoryHeapUsedFormatted = humanizeMemory(memoryHeapUsed, {
|