supercov 4.24.4 → 4.24.6

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.
@@ -65,7 +65,8 @@ one run and preserves runner identity wherever the runner exposes it.
65
65
  ### Bun
66
66
 
67
67
  Run `supercov -- bun test` or the package script that launches it. Supercov
68
- loads a native Bun adapter through `BUN_OPTIONS`, preserving existing Bun
68
+ loads a native Bun adapter before configured preloads in the isolated copy,
69
+ and through `BUN_OPTIONS` for commands without them, preserving existing Bun
69
70
  options, configured preloads, and the project's files. Named ESM imports,
70
71
  namespace imports, and CommonJS `require('bun:test')` are supported. Bun ignores
71
72
  Node's preload settings, so the Node adapter alone cannot attribute its tests.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "supercov",
3
- "version": "4.24.4",
3
+ "version": "4.24.6",
4
4
  "description": "Coverage, security and code quality for coding agents",
5
5
  "keywords": [
6
6
  "coverage",
@@ -82,7 +82,7 @@
82
82
  "eval:skill": "claude plugin eval plugins/supercov --scaffold --trust-plugin --no-publish --model claude-sonnet-5 --judge-model claude-haiku-4-5 --threshold 0.66 --tag behavior trigger --allow-tools Bash Edit Write --max-cost-usd 15",
83
83
  "eval:skill-triggers": "claude plugin eval plugins/supercov --scaffold --trust-plugin --no-publish --model claude-sonnet-5 --judge-model claude-haiku-4-5 --threshold 0.66 --tag trigger --ablation none --max-cost-usd 5",
84
84
  "test:engine": "cargo fmt --all -- --check && cargo clippy --workspace --all-targets -- -D warnings && cargo test --workspace && npm run test:runtime && npm run test:rust-assets && npm run test:engine-integrations",
85
- "test:engine-integrations": "cargo build -p supercov && node scripts/html-report-integration.mjs && node scripts/rust-process-supervision.mjs && node scripts/rust-direct-node-integration.mjs && node scripts/rust-public-run-integration.mjs && node scripts/rust-embedded-runtime-integration.mjs && node scripts/rust-direct-vitest-integration.mjs && node scripts/rust-direct-jest-integration.mjs && node scripts/mocha-failure-output.mjs && node scripts/failure-output.mjs node ava tap && node scripts/side-by-side.mjs node && node scripts/merge-across.mjs && node scripts/import-line-evidence.mjs && node scripts/mock-reach.mjs && node scripts/rust-direct-playwright-integration.mjs && node scripts/rust-custom-browser-playwright-integration.mjs && node scripts/cross-origin-requests.mjs && node scripts/leaving-page.mjs && node scripts/shared-page.mjs && node scripts/context-headers.mjs && node scripts/context-cookies.mjs && node scripts/hidden-request-emit.mjs && node scripts/js-syntax-zoo.mjs && node scripts/ruby-syntax-zoo.mjs && node scripts/rust-syntax-zoo.mjs && node scripts/python-syntax-zoo.mjs && node scripts/go-syntax-zoo.mjs && node scripts/java-syntax-zoo.mjs && node scripts/background-by-time.mjs && node scripts/python-server-playwright.mjs && node scripts/ruby-server-playwright.mjs && node scripts/go-server-playwright.mjs && node scripts/jvm-server-playwright.mjs && node scripts/docker-server-playwright.mjs && node scripts/docker-clients-playwright.mjs && node scripts/docker-exec-playwright.mjs && node scripts/rust-classic-browser-integration.mjs && node scripts/exec-handover.mjs && node scripts/rust-region-container.mjs && node scripts/rust-top-packages-integration.mjs && node scripts/rust-generic-esbuild-integration.mjs && node scripts/rust-generic-tsc-integration.mjs && node scripts/rust-generic-build-matrix.mjs && node scripts/rust-vite-playwright-integration.mjs && node scripts/workspace-crash-integration.mjs",
85
+ "test:engine-integrations": "cargo build -p supercov && node scripts/html-report-integration.mjs && node scripts/rust-process-supervision.mjs && node scripts/rust-direct-node-integration.mjs && node scripts/rust-public-run-integration.mjs && node scripts/rust-embedded-runtime-integration.mjs && node scripts/rust-direct-vitest-integration.mjs && node scripts/rust-nested-vitest-integration.mjs && node scripts/rust-direct-jest-integration.mjs && node scripts/mocha-failure-output.mjs && node scripts/failure-output.mjs node ava tap && node scripts/side-by-side.mjs node && node scripts/merge-across.mjs && node scripts/import-line-evidence.mjs && node scripts/mock-reach.mjs && node scripts/rust-direct-playwright-integration.mjs && node scripts/rust-custom-browser-playwright-integration.mjs && node scripts/cross-origin-requests.mjs && node scripts/leaving-page.mjs && node scripts/shared-page.mjs && node scripts/context-headers.mjs && node scripts/context-cookies.mjs && node scripts/hidden-request-emit.mjs && node scripts/js-syntax-zoo.mjs && node scripts/ruby-syntax-zoo.mjs && node scripts/rust-syntax-zoo.mjs && node scripts/python-syntax-zoo.mjs && node scripts/go-syntax-zoo.mjs && node scripts/java-syntax-zoo.mjs && node scripts/background-by-time.mjs && node scripts/python-server-playwright.mjs && node scripts/ruby-server-playwright.mjs && node scripts/go-server-playwright.mjs && node scripts/jvm-server-playwright.mjs && node scripts/docker-server-playwright.mjs && node scripts/docker-clients-playwright.mjs && node scripts/docker-exec-playwright.mjs && node scripts/rust-classic-browser-integration.mjs && node scripts/exec-handover.mjs && node scripts/rust-region-container.mjs && node scripts/rust-top-packages-integration.mjs && node scripts/rust-generic-esbuild-integration.mjs && node scripts/rust-generic-tsc-integration.mjs && node scripts/rust-generic-build-matrix.mjs && node scripts/rust-vite-playwright-integration.mjs && node scripts/workspace-crash-integration.mjs",
86
86
  "test:platform": "cargo test --workspace && cargo build -p supercov && node scripts/rust-process-supervision.mjs && node scripts/workspace-crash-integration.mjs",
87
87
  "test:native-package": "cargo build --release -p supercov && node scripts/native-package-integration.mjs && node scripts/native-release-set-integration.mjs",
88
88
  "test:pypi-wheel": "node scripts/pypi-wheel-integration.mjs",
@@ -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.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"
126
+ "@supercov/cli-darwin-arm64": "4.24.6",
127
+ "@supercov/cli-darwin-x64": "4.24.6",
128
+ "@supercov/cli-linux-arm64-gnu": "4.24.6",
129
+ "@supercov/cli-linux-arm64-musl": "4.24.6",
130
+ "@supercov/cli-linux-x64-gnu": "4.24.6",
131
+ "@supercov/cli-linux-x64-musl": "4.24.6",
132
+ "@supercov/cli-win32-arm64": "4.24.6",
133
+ "@supercov/cli-win32-x64": "4.24.6"
134
134
  },
135
135
  "peerDependencies": {
136
136
  "@playwright/test": ">=1.55.0",
@@ -1,5 +1,6 @@
1
- // Bun does not load the Node --import preload. BUN_OPTIONS loads this before
2
- // its test files and their configured preloads. Older Bun versions create a
1
+ // Bun does not load the Node --import preload. The isolated configuration
2
+ // loads this before configured preloads; BUN_OPTIONS covers other commands.
3
+ // Older Bun versions create a
3
4
  // native API per file; newer versions share one. Adapt the factory and the
4
5
  // existing API so both keep native test registration and execution semantics.
5
6
  import * as runtime from "./runtime.mjs";
@@ -38,7 +39,9 @@ function adapt(api) {
38
39
  const index = callbackIndex(args);
39
40
  const callback = index < 0 ? undefined : args[index];
40
41
  const name = row.name ?? (typeof args[0] === "string" ? args[0] : callback?.name || "anonymous test");
41
- const location = row.location ?? callerLocation(supercovBunRegistration);
42
+ // Bun gives a Proxy call an `unknown` frame when the target is the
43
+ // boundary. Pass the invoked Proxy itself to omit that frame.
44
+ const location = row.location ?? callerLocation(registration);
42
45
  if (kind === "suite") {
43
46
  if (!callback) return Reflect.apply(original, this, args);
44
47
  const next = [...args];
@@ -115,7 +118,7 @@ function adapt(api) {
115
118
  }
116
119
  return result;
117
120
  }
118
- return new Proxy(supercovBunRegistration, {
121
+ const registration = new Proxy(supercovBunRegistration, {
119
122
  get(target, property) {
120
123
  if (["call", "apply", "bind"].includes(property)) return Reflect.get(target, property);
121
124
 
@@ -165,6 +168,7 @@ function adapt(api) {
165
168
  return member.bind(original);
166
169
  },
167
170
  });
171
+ return registration;
168
172
  }
169
173
 
170
174
  api.test = api.it = wrap(originals.test, "test");
@@ -68,6 +68,11 @@ export function runnerExecutionScope(identity) {
68
68
  attemptId: `${testKey}-${retry}-${processInstanceToken()}`,
69
69
  };
70
70
  }
71
+ // A frame's location: a path, then `:line:column`. Bun 1.2 writes a module's
72
+ // top-level frame with a line and no column; the column is tried first, as a
73
+ // greedy path would otherwise take `file.ts:2:5` for the file `file.ts:2`.
74
+ const FRAME_WITH_COLUMN = /(?:^at (?:async )?| \()((?:file:\/\/|\/|[A-Za-z]:[\\/]|\\\\).*):(\d+):(\d+)\)?$/;
75
+ const FRAME_WITH_LINE = /(?:^at (?:async )?| \()((?:file:\/\/|\/|[A-Za-z]:[\\/]|\\\\).*):(\d+)\)?$/;
71
76
  export function callerLocation(boundary = callerLocation) {
72
77
  // Omit the registration wrapper by identity. A user file may have the same
73
78
  // basename as a runtime adapter. Parse the location suffix, not individual
@@ -78,13 +83,13 @@ export function callerLocation(boundary = callerLocation) {
78
83
  if (typeof error.stack !== "string")
79
84
  return {};
80
85
  const entry = error.stack.split("\n")[1]?.trim();
81
- const match = entry && /(?:^at (?:async )?| \()((?:file:\/\/|\/|[A-Za-z]:[\\/]|\\\\).*):(\d+):(\d+)\)?$/.exec(entry);
86
+ const match = entry && (FRAME_WITH_COLUMN.exec(entry) ?? FRAME_WITH_LINE.exec(entry));
82
87
  if (!match)
83
88
  return {};
84
89
  return {
85
90
  file: match[1],
86
91
  line: Number(match[2]),
87
- column: Number(match[3]),
92
+ ...(match[3] === undefined ? {} : { column: Number(match[3]) }),
88
93
  };
89
94
  }
90
95
  catch {