@jsenv/test 1.3.1 → 1.4.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/controllable_child_process.mjs +1 -1
- package/dist/controllable_worker_thread.mjs +1 -1
- package/dist/js/execute_using_dynamic_import.js +2 -2
- package/dist/js/v8_coverage.js +1 -1
- package/dist/jsenv_test.js +9 -8
- package/package.json +5 -5
- package/src/execution/execute_steps.js +5 -4
- package/src/runtime_browsers/using_playwright.js +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parentPort } from "node:worker_threads";
|
|
2
|
-
import { uneval, executeUsingDynamicImport } from "./js/execute_using_dynamic_import.js";
|
|
2
|
+
import { u as uneval, e as executeUsingDynamicImport } from "./js/execute_using_dynamic_import.js";
|
|
3
3
|
import "node:fs";
|
|
4
4
|
import "node:inspector";
|
|
5
5
|
import "node:perf_hooks";
|
|
@@ -927,7 +927,7 @@ const executeUsingDynamicImport = async ({
|
|
|
927
927
|
const result = {};
|
|
928
928
|
const afterImportCallbacks = [];
|
|
929
929
|
if (coverageEnabled && coverageMethodForNodeJs === "Profiler") {
|
|
930
|
-
const { filterV8Coverage } = await import("./v8_coverage.js").then(n => n.
|
|
930
|
+
const { filterV8Coverage } = await import("./v8_coverage.js").then(n => n.v);
|
|
931
931
|
const { stopJsCoverage } = await startJsCoverage();
|
|
932
932
|
afterImportCallbacks.push(async () => {
|
|
933
933
|
const coverage = await stopJsCoverage();
|
|
@@ -964,4 +964,4 @@ const executeUsingDynamicImport = async ({
|
|
|
964
964
|
return result;
|
|
965
965
|
};
|
|
966
966
|
|
|
967
|
-
export { executeUsingDynamicImport, uneval };
|
|
967
|
+
export { executeUsingDynamicImport as e, uneval as u };
|
package/dist/js/v8_coverage.js
CHANGED
|
@@ -499,4 +499,4 @@ const v8_coverage = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.definePropert
|
|
|
499
499
|
filterV8Coverage
|
|
500
500
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
501
501
|
|
|
502
|
-
export { URL_META, filterV8Coverage, v8_coverage };
|
|
502
|
+
export { URL_META as U, filterV8Coverage as f, v8_coverage as v };
|
package/dist/jsenv_test.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { chmod, stat, lstat, readdir, promises, unlink, openSync, closeSync, rmdir, readFile as readFile$1, writeFile as writeFile$1, writeFileSync as writeFileSync$1, mkdirSync, readFileSync, readdirSync, existsSync } from "node:fs";
|
|
2
|
-
import { URL_META, filterV8Coverage } from "./js/v8_coverage.js";
|
|
2
|
+
import { U as URL_META, f as filterV8Coverage } from "./js/v8_coverage.js";
|
|
3
3
|
import { pathToFileURL, fileURLToPath } from "node:url";
|
|
4
4
|
import "node:crypto";
|
|
5
5
|
import { dirname } from "node:path";
|
|
@@ -1919,7 +1919,7 @@ function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
|
|
|
1919
1919
|
}
|
|
1920
1920
|
|
|
1921
1921
|
if ('CI' in env) {
|
|
1922
|
-
if ('GITHUB_ACTIONS' in env) {
|
|
1922
|
+
if ('GITHUB_ACTIONS' in env || 'GITEA_ACTIONS' in env) {
|
|
1923
1923
|
return 3;
|
|
1924
1924
|
}
|
|
1925
1925
|
|
|
@@ -4384,6 +4384,10 @@ const executeSteps = async (
|
|
|
4384
4384
|
status: "executing",
|
|
4385
4385
|
},
|
|
4386
4386
|
};
|
|
4387
|
+
if (typeof executionParams.allocatedMs === "function") {
|
|
4388
|
+
executionParams.allocatedMs =
|
|
4389
|
+
executionParams.allocatedMs(beforeExecutionInfo);
|
|
4390
|
+
}
|
|
4387
4391
|
let spinner;
|
|
4388
4392
|
if (executionSpinner) {
|
|
4389
4393
|
spinner = startSpinner({
|
|
@@ -4413,10 +4417,7 @@ const executeSteps = async (
|
|
|
4413
4417
|
executionResult = await run({
|
|
4414
4418
|
signal: multipleExecutionsOperation.signal,
|
|
4415
4419
|
logger,
|
|
4416
|
-
allocatedMs:
|
|
4417
|
-
typeof executionParams.allocatedMs === "function"
|
|
4418
|
-
? executionParams.allocatedMs(beforeExecutionInfo)
|
|
4419
|
-
: executionParams.allocatedMs,
|
|
4420
|
+
allocatedMs: executionParams.allocatedMs,
|
|
4420
4421
|
keepRunning,
|
|
4421
4422
|
mirrorConsole: false, // file are executed in parallel, log would be a mess to read
|
|
4422
4423
|
collectConsole: executionParams.collectConsole,
|
|
@@ -5274,9 +5275,9 @@ const createRuntimeUsingPlaywright = ({
|
|
|
5274
5275
|
browser.on("disconnected", disconnectedCallback);
|
|
5275
5276
|
})
|
|
5276
5277
|
: Promise.resolve();
|
|
5277
|
-
// for some reason without this
|
|
5278
|
+
// for some reason without this timeout
|
|
5278
5279
|
// browser.close() never resolves (playwright does not like something)
|
|
5279
|
-
await new Promise((resolve) => setTimeout(resolve,
|
|
5280
|
+
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
5280
5281
|
try {
|
|
5281
5282
|
await browser.close();
|
|
5282
5283
|
} catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/test",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@jsenv/abort": "4.2.4",
|
|
37
|
-
"@jsenv/ast": "
|
|
38
|
-
"@jsenv/filesystem": "4.2.
|
|
37
|
+
"@jsenv/ast": "5.0.1",
|
|
38
|
+
"@jsenv/filesystem": "4.2.4",
|
|
39
39
|
"@jsenv/log": "3.4.0",
|
|
40
|
-
"@jsenv/plugin-supervisor": "1.
|
|
41
|
-
"@jsenv/urls": "2.
|
|
40
|
+
"@jsenv/plugin-supervisor": "1.2.1",
|
|
41
|
+
"@jsenv/urls": "2.1.0",
|
|
42
42
|
"@jsenv/url-meta": "8.1.0",
|
|
43
43
|
"@jsenv/uneval": "1.6.0",
|
|
44
44
|
"@jsenv/utils": "2.0.1",
|
|
@@ -191,6 +191,10 @@ export const executeSteps = async (
|
|
|
191
191
|
status: "executing",
|
|
192
192
|
},
|
|
193
193
|
};
|
|
194
|
+
if (typeof executionParams.allocatedMs === "function") {
|
|
195
|
+
executionParams.allocatedMs =
|
|
196
|
+
executionParams.allocatedMs(beforeExecutionInfo);
|
|
197
|
+
}
|
|
194
198
|
let spinner;
|
|
195
199
|
if (executionSpinner) {
|
|
196
200
|
spinner = startSpinner({
|
|
@@ -220,10 +224,7 @@ export const executeSteps = async (
|
|
|
220
224
|
executionResult = await run({
|
|
221
225
|
signal: multipleExecutionsOperation.signal,
|
|
222
226
|
logger,
|
|
223
|
-
allocatedMs:
|
|
224
|
-
typeof executionParams.allocatedMs === "function"
|
|
225
|
-
? executionParams.allocatedMs(beforeExecutionInfo)
|
|
226
|
-
: executionParams.allocatedMs,
|
|
227
|
+
allocatedMs: executionParams.allocatedMs,
|
|
227
228
|
keepRunning,
|
|
228
229
|
mirrorConsole: false, // file are executed in parallel, log would be a mess to read
|
|
229
230
|
collectConsole: executionParams.collectConsole,
|
|
@@ -110,9 +110,9 @@ export const createRuntimeUsingPlaywright = ({
|
|
|
110
110
|
browser.on("disconnected", disconnectedCallback);
|
|
111
111
|
})
|
|
112
112
|
: Promise.resolve();
|
|
113
|
-
// for some reason without this
|
|
113
|
+
// for some reason without this timeout
|
|
114
114
|
// browser.close() never resolves (playwright does not like something)
|
|
115
|
-
await new Promise((resolve) => setTimeout(resolve,
|
|
115
|
+
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
116
116
|
try {
|
|
117
117
|
await browser.close();
|
|
118
118
|
} catch (e) {
|