qunitx-cli 0.23.6 → 0.23.7
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/cli.js +17 -9
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -374,7 +374,7 @@ var init_package = __esm({
|
|
|
374
374
|
package_default = {
|
|
375
375
|
name: "qunitx-cli",
|
|
376
376
|
type: "module",
|
|
377
|
-
version: "0.23.
|
|
377
|
+
version: "0.23.7",
|
|
378
378
|
description: "Browser runner for QUnitx: run your qunitx tests in google-chrome",
|
|
379
379
|
author: "Izel Nakri",
|
|
380
380
|
license: "MIT",
|
|
@@ -892,9 +892,9 @@ async function pingDaemon() {
|
|
|
892
892
|
socket.end();
|
|
893
893
|
return pong;
|
|
894
894
|
}
|
|
895
|
-
async function shutdownDaemon() {
|
|
896
|
-
const pid = await readDaemonPid();
|
|
897
|
-
const socket = await tryConnect();
|
|
895
|
+
async function shutdownDaemon(cwd = process.cwd()) {
|
|
896
|
+
const pid = await readDaemonPid(cwd);
|
|
897
|
+
const socket = await tryConnect(cwd);
|
|
898
898
|
if (!socket) return false;
|
|
899
899
|
attachLineParser(socket, () => {
|
|
900
900
|
});
|
|
@@ -903,9 +903,9 @@ async function shutdownDaemon() {
|
|
|
903
903
|
if (pid !== null) await waitForPidExit(pid, SHUTDOWN_PID_WAIT_MS);
|
|
904
904
|
return true;
|
|
905
905
|
}
|
|
906
|
-
async function readDaemonPid() {
|
|
906
|
+
async function readDaemonPid(cwd = process.cwd()) {
|
|
907
907
|
try {
|
|
908
|
-
const info = JSON.parse(await fs6.readFile(daemonInfoPath(), "utf8"));
|
|
908
|
+
const info = JSON.parse(await fs6.readFile(daemonInfoPath(cwd), "utf8"));
|
|
909
909
|
return typeof info.pid === "number" ? info.pid : null;
|
|
910
910
|
} catch {
|
|
911
911
|
return null;
|
|
@@ -1137,7 +1137,7 @@ function parseCliFlags(projectRoot) {
|
|
|
1137
1137
|
return result2;
|
|
1138
1138
|
}
|
|
1139
1139
|
result2.inputs.add(
|
|
1140
|
-
arg.startsWith(projectRoot) ||
|
|
1140
|
+
arg.startsWith(projectRoot) || path5.isAbsolute(arg) ? arg : path5.join(process.cwd(), arg)
|
|
1141
1141
|
);
|
|
1142
1142
|
return result2;
|
|
1143
1143
|
},
|
|
@@ -3546,7 +3546,15 @@ function setupFileWatchers(testFileLookupPaths, config, onEventFunc, onFinishFun
|
|
|
3546
3546
|
}
|
|
3547
3547
|
} else if ((process.platform === "win32" || process.platform === "darwin") && curr.mtimeMs !== prev.mtimeMs) {
|
|
3548
3548
|
if (filePath in config.fsTree) {
|
|
3549
|
-
|
|
3549
|
+
const existing = pendingChangeTimers.get(filePath);
|
|
3550
|
+
if (existing) clearTimeout(existing);
|
|
3551
|
+
pendingChangeTimers.set(
|
|
3552
|
+
filePath,
|
|
3553
|
+
setTimeout(() => {
|
|
3554
|
+
pendingChangeTimers.delete(filePath);
|
|
3555
|
+
handleWatchEvent(config, extensions, "change", filePath, onEventFunc, onFinishFunc);
|
|
3556
|
+
}, CHANGE_COALESCE_MS)
|
|
3557
|
+
);
|
|
3550
3558
|
}
|
|
3551
3559
|
}
|
|
3552
3560
|
};
|
|
@@ -4393,7 +4401,7 @@ var init_run = __esm({
|
|
|
4393
4401
|
init_close_with_grace();
|
|
4394
4402
|
init_daemon_hint();
|
|
4395
4403
|
WATCH_NAV_TIMEOUT_MS = 5e3;
|
|
4396
|
-
STDOUT_FLUSH_GRACE_MS =
|
|
4404
|
+
STDOUT_FLUSH_GRACE_MS = 3e4;
|
|
4397
4405
|
KEEP_ALIVE_INTERVAL_MS = 1e4;
|
|
4398
4406
|
EXIT_CODE_SIGTERM = 128 + 15;
|
|
4399
4407
|
}
|