supercov 4.24.3 → 4.24.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "supercov",
3
- "version": "4.24.3",
3
+ "version": "4.24.4",
4
4
  "description": "Coverage, security and code quality for coding agents",
5
5
  "keywords": [
6
6
  "coverage",
@@ -123,14 +123,14 @@
123
123
  "test:windows-tls": "node scripts/windows-tls-test.mjs"
124
124
  },
125
125
  "optionalDependencies": {
126
- "@supercov/cli-darwin-arm64": "4.24.3",
127
- "@supercov/cli-darwin-x64": "4.24.3",
128
- "@supercov/cli-linux-arm64-gnu": "4.24.3",
129
- "@supercov/cli-linux-arm64-musl": "4.24.3",
130
- "@supercov/cli-linux-x64-gnu": "4.24.3",
131
- "@supercov/cli-linux-x64-musl": "4.24.3",
132
- "@supercov/cli-win32-arm64": "4.24.3",
133
- "@supercov/cli-win32-x64": "4.24.3"
126
+ "@supercov/cli-darwin-arm64": "4.24.4",
127
+ "@supercov/cli-darwin-x64": "4.24.4",
128
+ "@supercov/cli-linux-arm64-gnu": "4.24.4",
129
+ "@supercov/cli-linux-arm64-musl": "4.24.4",
130
+ "@supercov/cli-linux-x64-gnu": "4.24.4",
131
+ "@supercov/cli-linux-x64-musl": "4.24.4",
132
+ "@supercov/cli-win32-arm64": "4.24.4",
133
+ "@supercov/cli-win32-x64": "4.24.4"
134
134
  },
135
135
  "peerDependencies": {
136
136
  "@playwright/test": ">=1.55.0",
@@ -314,7 +314,7 @@ function wrapResult(value, mapping) {
314
314
  // non-writable own data property (and `undefined` for a non-configurable
315
315
  // accessor without a getter). Constructors commonly expose `prototype` this
316
316
  // way. Returning another capability proxy is a TypeError before user code can
317
- // run, as seen with PrismaSessionStorage during an Essential Apps VM bake.
317
+ // run, as seen with PrismaSessionStorage during a VM bake.
318
318
  function fixedProxyValue(target, property) {
319
319
  const descriptor = Reflect.getOwnPropertyDescriptor(target, property);
320
320
  if (!descriptor || descriptor.configurable)
@@ -734,14 +734,24 @@ function injectChildEnvironment(method, args) {
734
734
  // right after it listened read as one that never became ready, and a
735
735
  // Playwright worker as one that "exited unexpectedly".
736
736
  const CRASH_SIGNALS = new Set(["SIGSEGV", "SIGBUS", "SIGILL", "SIGFPE", "SIGABRT", "SIGTRAP", "SIGSYS"]);
737
- function noteCrash(signal, child, command, started) {
738
- if (!CRASH_SIGNALS.has(signal))
737
+ // The command a child ran, its arguments too: `spawn("npm", ["run",
738
+ // "build"])` names its build only with them.
739
+ function commandLine(args) {
740
+ const words = Array.isArray(args[1]) ? args[1] : [];
741
+ return [args[0], ...words].map((word) => String(word ?? "")).join(" ");
742
+ }
743
+ // A child that a crash signal ended, or that exited non-zero: a build the
744
+ // command started from its own code, which the command's words do not
745
+ // name, is told apart from one it never ran by this.
746
+ function noteExit(signal, code, child, args, started) {
747
+ const crashed = CRASH_SIGNALS.has(signal);
748
+ if (!crashed && !(signal == null && typeof code === "number" && code !== 0))
739
749
  return;
740
750
  record({
741
751
  event: "child-exit",
742
752
  ...(typeof child === "number" ? { child } : {}),
743
- signal,
744
- command: safeArgument(String(command ?? "")),
753
+ ...(crashed ? { signal } : { code }),
754
+ command: safeArgument(commandLine(args)),
745
755
  ranMs: Date.now() - started,
746
756
  });
747
757
  }
@@ -752,14 +762,14 @@ function watchChild(method, args, run) {
752
762
  launched = run();
753
763
  }
754
764
  catch (error) {
755
- // execSync and execFileSync throw for a child a signal ended.
756
- noteCrash(error?.signal, error?.pid, args[0], started);
765
+ // execSync and execFileSync throw for a child that failed.
766
+ noteExit(error?.signal, error?.status, error?.pid, args, started);
757
767
  throw error;
758
768
  }
759
769
  if (method === "spawnSync")
760
- noteCrash(launched?.signal, launched?.pid, args[0], started);
770
+ noteExit(launched?.signal, launched?.status, launched?.pid, args, started);
761
771
  else if (typeof launched?.once === "function")
762
- launched.once("exit", (_code, signal) => noteCrash(signal, launched.pid, args[0], started));
772
+ launched.once("exit", (code, signal) => noteExit(signal, code, launched.pid, args, started));
763
773
  return launched;
764
774
  }
765
775
  function patchChildProcesses() {