supercov 0.0.9 → 0.0.12
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/README.md +28 -23
- package/bin/native.js +87 -0
- package/bin/supercov.js +10 -4
- package/package.json +39 -25
- package/{dist → runtime/javascript}/atomic.js +0 -1
- package/{dist → runtime/javascript}/launchSupervisor.js +3 -1
- package/{dist → runtime/javascript}/nodeAssert.js +0 -1
- package/{dist → runtime/javascript}/nodeAssertAdapter.js +0 -1
- package/{dist → runtime/javascript}/nodeAssertStrict.js +0 -1
- package/{dist → runtime/javascript}/nodeTest.js +13 -5
- package/{dist → runtime/javascript}/playwright.js +177 -90
- package/{dist → runtime/javascript}/playwrightReporter.js +0 -1
- package/{dist → runtime/javascript}/provenance.js +0 -1
- package/{dist → runtime/javascript}/register.mjs +52 -1
- package/{dist → runtime/javascript}/resolve-loader.mjs +0 -36
- package/{dist → runtime/javascript}/runnerEvidence.js +6 -5
- package/{dist → runtime/javascript}/runtime.js +308 -27
- package/{dist → runtime/javascript}/transport.js +2 -3
- package/{dist → runtime/javascript}/vitest.js +38 -8
- package/{dist → runtime/javascript}/vitestReporter.js +0 -1
- package/dist/agentJson.d.ts +0 -44
- package/dist/agentJson.d.ts.map +0 -1
- package/dist/agentJson.js +0 -84
- package/dist/agentJson.js.map +0 -1
- package/dist/analyze.d.ts +0 -12
- package/dist/analyze.d.ts.map +0 -1
- package/dist/analyze.js +0 -699
- package/dist/analyze.js.map +0 -1
- package/dist/atomic.d.ts +0 -6
- package/dist/atomic.d.ts.map +0 -1
- package/dist/atomic.js.map +0 -1
- package/dist/buildCache.d.ts +0 -14
- package/dist/buildCache.d.ts.map +0 -1
- package/dist/buildCache.js +0 -84
- package/dist/buildCache.js.map +0 -1
- package/dist/cli.d.ts +0 -2
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -706
- package/dist/cli.js.map +0 -1
- package/dist/directInstrumenter.d.ts +0 -8
- package/dist/directInstrumenter.d.ts.map +0 -1
- package/dist/directInstrumenter.js +0 -92
- package/dist/directInstrumenter.js.map +0 -1
- package/dist/esmInterceptor.d.ts +0 -6
- package/dist/esmInterceptor.d.ts.map +0 -1
- package/dist/esmInterceptor.js +0 -63
- package/dist/esmInterceptor.js.map +0 -1
- package/dist/evidenceArchive.d.ts +0 -37
- package/dist/evidenceArchive.d.ts.map +0 -1
- package/dist/evidenceArchive.js +0 -110
- package/dist/evidenceArchive.js.map +0 -1
- package/dist/instrumenter.d.ts +0 -11
- package/dist/instrumenter.d.ts.map +0 -1
- package/dist/instrumenter.js +0 -1246
- package/dist/instrumenter.js.map +0 -1
- package/dist/integrity.d.ts +0 -10
- package/dist/integrity.d.ts.map +0 -1
- package/dist/integrity.js +0 -205
- package/dist/integrity.js.map +0 -1
- package/dist/launchSupervisor.d.ts +0 -38
- package/dist/launchSupervisor.d.ts.map +0 -1
- package/dist/launchSupervisor.js.map +0 -1
- package/dist/merge.d.ts +0 -2
- package/dist/merge.d.ts.map +0 -1
- package/dist/merge.js +0 -116
- package/dist/merge.js.map +0 -1
- package/dist/nodeAssert.d.ts +0 -31
- package/dist/nodeAssert.d.ts.map +0 -1
- package/dist/nodeAssert.js.map +0 -1
- package/dist/nodeAssertAdapter.d.ts +0 -6
- package/dist/nodeAssertAdapter.d.ts.map +0 -1
- package/dist/nodeAssertAdapter.js.map +0 -1
- package/dist/nodeAssertStrict.d.ts +0 -31
- package/dist/nodeAssertStrict.d.ts.map +0 -1
- package/dist/nodeAssertStrict.js.map +0 -1
- package/dist/nodeAssertionInstrumenter.d.ts +0 -8
- package/dist/nodeAssertionInstrumenter.d.ts.map +0 -1
- package/dist/nodeAssertionInstrumenter.js +0 -263
- package/dist/nodeAssertionInstrumenter.js.map +0 -1
- package/dist/nodeTest.d.ts +0 -15
- package/dist/nodeTest.d.ts.map +0 -1
- package/dist/nodeTest.js.map +0 -1
- package/dist/playwright.d.ts +0 -9
- package/dist/playwright.d.ts.map +0 -1
- package/dist/playwright.js.map +0 -1
- package/dist/playwrightReporter.d.ts +0 -6
- package/dist/playwrightReporter.d.ts.map +0 -1
- package/dist/playwrightReporter.js.map +0 -1
- package/dist/project.d.ts +0 -20
- package/dist/project.d.ts.map +0 -1
- package/dist/project.js +0 -296
- package/dist/project.js.map +0 -1
- package/dist/provenance.d.ts +0 -9
- package/dist/provenance.d.ts.map +0 -1
- package/dist/provenance.js.map +0 -1
- package/dist/query.d.ts +0 -70
- package/dist/query.d.ts.map +0 -1
- package/dist/query.js +0 -1443
- package/dist/query.js.map +0 -1
- package/dist/queryCache.d.ts +0 -15
- package/dist/queryCache.d.ts.map +0 -1
- package/dist/queryCache.js +0 -95
- package/dist/queryCache.js.map +0 -1
- package/dist/queueAdapters.d.ts +0 -15
- package/dist/queueAdapters.d.ts.map +0 -1
- package/dist/queueAdapters.js +0 -55
- package/dist/queueAdapters.js.map +0 -1
- package/dist/register.d.mts +0 -2
- package/dist/register.d.mts.map +0 -1
- package/dist/register.mjs.map +0 -1
- package/dist/reporter.d.ts +0 -13
- package/dist/reporter.d.ts.map +0 -1
- package/dist/reporter.js +0 -252
- package/dist/reporter.js.map +0 -1
- package/dist/resolve-loader.d.mts +0 -3
- package/dist/resolve-loader.d.mts.map +0 -1
- package/dist/resolve-loader.mjs.map +0 -1
- package/dist/runAnalysis.d.ts +0 -19
- package/dist/runAnalysis.d.ts.map +0 -1
- package/dist/runAnalysis.js +0 -169
- package/dist/runAnalysis.js.map +0 -1
- package/dist/runnerEvidence.d.ts +0 -19
- package/dist/runnerEvidence.d.ts.map +0 -1
- package/dist/runnerEvidence.js.map +0 -1
- package/dist/runtime.d.ts +0 -88
- package/dist/runtime.d.ts.map +0 -1
- package/dist/runtime.js.map +0 -1
- package/dist/runtimeIsolation.d.ts +0 -3
- package/dist/runtimeIsolation.d.ts.map +0 -1
- package/dist/runtimeIsolation.js +0 -9
- package/dist/runtimeIsolation.js.map +0 -1
- package/dist/sourceDiscovery.d.ts +0 -9
- package/dist/sourceDiscovery.d.ts.map +0 -1
- package/dist/sourceDiscovery.js +0 -238
- package/dist/sourceDiscovery.js.map +0 -1
- package/dist/transport.d.ts +0 -17
- package/dist/transport.d.ts.map +0 -1
- package/dist/transport.js.map +0 -1
- package/dist/types.d.ts +0 -378
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/vitePlugin.d.ts +0 -13
- package/dist/vitePlugin.d.ts.map +0 -1
- package/dist/vitePlugin.js +0 -125
- package/dist/vitePlugin.js.map +0 -1
- package/dist/vitest.d.ts +0 -2
- package/dist/vitest.d.ts.map +0 -1
- package/dist/vitest.js.map +0 -1
- package/dist/vitestReporter.d.ts +0 -43
- package/dist/vitestReporter.d.ts.map +0 -1
- package/dist/vitestReporter.js.map +0 -1
- package/dist/workspace.d.ts +0 -81
- package/dist/workspace.d.ts.map +0 -1
- package/dist/workspace.js +0 -504
- package/dist/workspace.js.map +0 -1
package/README.md
CHANGED
|
@@ -18,26 +18,30 @@ npm link
|
|
|
18
18
|
|
|
19
19
|
## Verifying the instrumenter
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
Supercov has one coverage engine, implemented in Rust. JavaScript files under
|
|
22
|
+
`runtime/javascript/` are target-runtime shims for Node, browsers and test
|
|
23
|
+
runners; they do not contain a second analyzer or instrumenter.
|
|
24
|
+
|
|
25
|
+
The coverage engine has independent correctness gates:
|
|
26
|
+
|
|
27
|
+
- Rust unit and golden tests cover transformation semantics, complete
|
|
28
|
+
obligation manifests, evidence validation, attribution, MC/DC witnesses,
|
|
29
|
+
storage, lifecycle recovery and agent JSON contracts;
|
|
30
|
+
- syntax and behavior matrices execute original and instrumented modern
|
|
31
|
+
JavaScript, JSX, TypeScript and TSX under Node, Chromium, Firefox and WebKit;
|
|
32
|
+
- coverage oracles assert exact decision vectors, MC/DC witnesses and branch
|
|
32
33
|
alternatives independently of program behavior;
|
|
33
34
|
- the same three-condition masking-MC/DC golden cases must report 100% for a
|
|
34
35
|
complete witness set and 33.33% for an incomplete one under both Supercov
|
|
35
36
|
and Clang/LLVM source-based MC/DC;
|
|
36
|
-
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
|
|
37
|
+
- the pinned TC39 Test262 corpus runs through the official harness before and
|
|
38
|
+
after instrumentation and rejects any originally passing scenario that
|
|
39
|
+
changes behavior;
|
|
40
|
+
- black-box fixtures exercise node:test, Vitest, Playwright, opaque remote
|
|
41
|
+
execution, Vite, Next, Webpack, esbuild, SWC and TypeScript compilation; and
|
|
42
|
+
- checked performance and filesystem gates cover transform latency,
|
|
43
|
+
transactional workspace preparation, output expansion, signal handling,
|
|
44
|
+
crash recovery and runtime probe overhead.
|
|
41
45
|
|
|
42
46
|
```sh
|
|
43
47
|
npm test
|
|
@@ -62,7 +66,7 @@ default with `TEST262_DIR=/path/to/test262` or `--test262 <path>`.
|
|
|
62
66
|
The differential suite includes getters, proxies, optional calls and `this`,
|
|
63
67
|
computed logical assignments, defaults, `try`/`catch`/`finally`, iterator
|
|
64
68
|
closing, switch fallthrough, labeled loops, async functions, and generators.
|
|
65
|
-
The compatibility workflow additionally runs Node 22/24/25, Playwright
|
|
69
|
+
The manually dispatched compatibility workflow additionally runs Node 22/24/25, Playwright
|
|
66
70
|
1.55/current, Vite 5/current, Vitest 2/current, Chromium, Firefox, WebKit, and
|
|
67
71
|
modern JavaScript/JSX/TypeScript/TSX syntax fixtures. Filesystem publication,
|
|
68
72
|
symlink, copy fallback, ENOSPC, failed rename, and forced-termination recovery
|
|
@@ -191,7 +195,7 @@ producing a plausible but invalid aggregate.
|
|
|
191
195
|
For a JavaScript or TypeScript project, the CLI:
|
|
192
196
|
|
|
193
197
|
1. refreshes a stable isolated source namespace under
|
|
194
|
-
|
|
198
|
+
`supercov/workspace/<project>/`, links the existing
|
|
195
199
|
dependency tree, and creates generated runner configuration and build output
|
|
196
200
|
only there; file data uses copy-on-write reflinks where the filesystem
|
|
197
201
|
supports them, and falls back to copying where it does not; the stable path
|
|
@@ -210,7 +214,7 @@ For a JavaScript or TypeScript project, the CLI:
|
|
|
210
214
|
and CommonJS projects use the same disposable direct path;
|
|
211
215
|
4. runs the exact command following `--`, propagating coverage through every
|
|
212
216
|
Node child process it launches. Generated adapters provide exact test,
|
|
213
|
-
worker, retry, and outcome scopes for Playwright, Vitest,
|
|
217
|
+
worker, retry, and outcome scopes for Playwright, Vitest, and
|
|
214
218
|
`node:test` without changing test imports or configs;
|
|
215
219
|
5. attributes source hits and decision vectors to individual tests where an
|
|
216
220
|
exact adapter is active,
|
|
@@ -223,8 +227,10 @@ For a JavaScript or TypeScript project, the CLI:
|
|
|
223
227
|
ordinary application build is never read as an input, overwritten, or
|
|
224
228
|
rebuilt afterward.
|
|
225
229
|
|
|
226
|
-
Only `.supercov/`
|
|
227
|
-
|
|
230
|
+
Only the Supercov-owned `.supercov/` run store and marker-protected
|
|
231
|
+
`supercov/workspace/` cache are modified in the user's checkout. A user-created
|
|
232
|
+
`supercov/` directory without Supercov's ownership marker is never treated as
|
|
233
|
+
storage. A per-project lock rejects overlapping runs before either can build. Run state is durably written
|
|
228
234
|
through preparing/building/testing/publishing phases; SIGINT, SIGTERM,
|
|
229
235
|
and SIGHUP are forwarded to the entire child process group. If the process is
|
|
230
236
|
killed without a cleanup opportunity, the next invocation marks the dead PID's
|
|
@@ -268,8 +274,7 @@ strategy trade-offs, and a measured real-suite reference.
|
|
|
268
274
|
|
|
269
275
|
The automatic exact-attribution adapters support standard Playwright suites
|
|
270
276
|
(ESM and CommonJS specs in arbitrary project directories), project-owned
|
|
271
|
-
Playwright fixture packages, Vitest
|
|
272
|
-
parameterized tests—and `node:test`. A single command can collect several
|
|
277
|
+
Playwright fixture packages, Vitest and `node:test`. A single command can collect several
|
|
273
278
|
runners into one run. Unsupported runners such as AVA or Mocha still receive
|
|
274
279
|
aggregate first-party structural coverage through inherited process
|
|
275
280
|
instrumentation, but their hits remain background/unattributed rather than
|
package/bin/native.js
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
2
|
+
import { createRequire } from "node:module";
|
|
3
|
+
import { dirname, resolve } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
|
|
6
|
+
const require = createRequire(import.meta.url);
|
|
7
|
+
const root = fileURLToPath(new URL("..", import.meta.url));
|
|
8
|
+
const mainPackage = JSON.parse(
|
|
9
|
+
readFileSync(new URL("../package.json", import.meta.url), "utf8"),
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
const packages = new Map([
|
|
13
|
+
["darwin-arm64", ["@supercov/cli-darwin-arm64", "supercov"]],
|
|
14
|
+
["darwin-x64", ["@supercov/cli-darwin-x64", "supercov"]],
|
|
15
|
+
["linux-arm64-gnu", ["@supercov/cli-linux-arm64-gnu", "supercov"]],
|
|
16
|
+
["linux-x64-gnu", ["@supercov/cli-linux-x64-gnu", "supercov"]],
|
|
17
|
+
["linux-arm64-musl", ["@supercov/cli-linux-arm64-musl", "supercov"]],
|
|
18
|
+
["linux-x64-musl", ["@supercov/cli-linux-x64-musl", "supercov"]],
|
|
19
|
+
["win32-arm64", ["@supercov/cli-win32-arm64", "supercov.exe"]],
|
|
20
|
+
["win32-x64", ["@supercov/cli-win32-x64", "supercov.exe"]],
|
|
21
|
+
]);
|
|
22
|
+
|
|
23
|
+
function linuxLibc() {
|
|
24
|
+
const report = process.report?.getReport?.();
|
|
25
|
+
return report?.header?.glibcVersionRuntime ? "gnu" : "musl";
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function nativePackageFor(
|
|
29
|
+
platform = process.platform,
|
|
30
|
+
arch = process.arch,
|
|
31
|
+
libc = platform === "linux" ? linuxLibc() : undefined,
|
|
32
|
+
) {
|
|
33
|
+
const key = [platform, arch, ...(libc ? [libc] : [])].join("-");
|
|
34
|
+
const selected = packages.get(key);
|
|
35
|
+
if (!selected) {
|
|
36
|
+
throw new Error(
|
|
37
|
+
`no native Supercov binary is published for platform=${platform} arch=${arch}${libc ? ` libc=${libc}` : ""}`,
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
return { packageName: selected[0], executable: selected[1] };
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function checkedExecutable(path, source) {
|
|
44
|
+
if (!existsSync(path) || !statSync(path).isFile()) {
|
|
45
|
+
throw new Error(`${source} does not contain a regular Supercov executable at ${path}`);
|
|
46
|
+
}
|
|
47
|
+
return path;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function resolveNativeBinary({ allowLocalDevelopment = true } = {}) {
|
|
51
|
+
if (process.env.SUPERCOV_RUST_BINARY) {
|
|
52
|
+
const override = resolve(process.env.SUPERCOV_RUST_BINARY);
|
|
53
|
+
return checkedExecutable(override, "SUPERCOV_RUST_BINARY");
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const { packageName, executable } = nativePackageFor();
|
|
57
|
+
try {
|
|
58
|
+
const packagePath = require.resolve(`${packageName}/package.json`);
|
|
59
|
+
const platformPackage = JSON.parse(readFileSync(packagePath, "utf8"));
|
|
60
|
+
if (platformPackage.name !== packageName) {
|
|
61
|
+
throw new Error(
|
|
62
|
+
`resolved ${packageName} but its manifest declares ${String(platformPackage.name)}`,
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
if (platformPackage.version !== mainPackage.version) {
|
|
66
|
+
throw new Error(
|
|
67
|
+
`native package version mismatch: supercov is ${mainPackage.version} but ${packageName} is ${String(platformPackage.version)}`,
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
return checkedExecutable(
|
|
71
|
+
resolve(dirname(packagePath), "bin", executable),
|
|
72
|
+
packageName,
|
|
73
|
+
);
|
|
74
|
+
} catch (error) {
|
|
75
|
+
if (!(error && typeof error === "object" && "code" in error && error.code === "MODULE_NOT_FOUND")) {
|
|
76
|
+
throw error;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const local = resolve(root, "target", "debug", executable);
|
|
81
|
+
if (allowLocalDevelopment && existsSync(resolve(root, "Cargo.toml")) && existsSync(local)) {
|
|
82
|
+
return checkedExecutable(local, "local Rust development build");
|
|
83
|
+
}
|
|
84
|
+
throw new Error(
|
|
85
|
+
`the optional native package ${packageName}@${mainPackage.version} is missing; reinstall supercov with optional dependencies enabled`,
|
|
86
|
+
);
|
|
87
|
+
}
|
package/bin/supercov.js
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { spawn } from "node:child_process";
|
|
4
|
-
import {
|
|
4
|
+
import { resolveNativeBinary } from "./native.js";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
let rustBinary;
|
|
7
|
+
try {
|
|
8
|
+
rustBinary = resolveNativeBinary();
|
|
9
|
+
} catch (error) {
|
|
10
|
+
console.error(`[supercov] ${error instanceof Error ? error.message : String(error)}`);
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
7
13
|
const child = spawn(
|
|
8
|
-
|
|
9
|
-
|
|
14
|
+
rustBinary,
|
|
15
|
+
process.argv.slice(2),
|
|
10
16
|
{
|
|
11
17
|
stdio: "inherit",
|
|
12
18
|
env: process.env,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "supercov",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"description": "Zero-edit, runner-aware coverage completeness for JavaScript test suites",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"type": "module",
|
|
15
15
|
"files": [
|
|
16
16
|
"bin",
|
|
17
|
-
"
|
|
17
|
+
"runtime/javascript",
|
|
18
18
|
"docs",
|
|
19
19
|
"README.md"
|
|
20
20
|
],
|
|
@@ -28,32 +28,47 @@
|
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
30
|
"exports": {
|
|
31
|
-
"./playwright": "./
|
|
32
|
-
"./register": "./
|
|
33
|
-
"./
|
|
34
|
-
"./vitest": "./dist/vitest.js"
|
|
31
|
+
"./playwright": "./runtime/javascript/playwright.js",
|
|
32
|
+
"./register": "./runtime/javascript/register.mjs",
|
|
33
|
+
"./vitest": "./runtime/javascript/vitest.js"
|
|
35
34
|
},
|
|
36
35
|
"scripts": {
|
|
37
|
-
"build": "
|
|
38
|
-
"
|
|
39
|
-
"test:
|
|
40
|
-
"test
|
|
41
|
-
"test:
|
|
42
|
-
"test:
|
|
43
|
-
"test:
|
|
36
|
+
"build": "cargo build -p supercov",
|
|
37
|
+
"sync:rust-assets": "node scripts/sync-rust-package-assets.mjs",
|
|
38
|
+
"test:rust-assets": "node scripts/sync-rust-package-assets.mjs --check",
|
|
39
|
+
"test": "cargo test --workspace",
|
|
40
|
+
"test:runtime": "node --test tests/runtime/*.test.mjs",
|
|
41
|
+
"test:fixture": "cargo build -p supercov && node scripts/rust-fixture-matrix.mjs",
|
|
42
|
+
"test:packed-npx": "cargo build --release -p supercov && node scripts/packed-npx-integration.mjs",
|
|
43
|
+
"test:isolation": "cargo build -p supercov && node scripts/isolation-integration.mjs",
|
|
44
|
+
"test:filesystem": "cargo test --workspace && cargo build -p supercov && node scripts/workspace-crash-integration.mjs",
|
|
45
|
+
"test:watchdog": "cargo build -p supercov && node scripts/watchdog-integration.mjs",
|
|
46
|
+
"test:engine-contract": "cargo build -p supercov && node scripts/engine-contract.mjs",
|
|
47
|
+
"test:agent": "cargo build -p supercov && node scripts/agent-query-eval.mjs",
|
|
48
|
+
"test:engine": "cargo fmt --all -- --check && cargo clippy --workspace --all-targets -- -D warnings && cargo test --workspace && cargo build -p supercov && npm run test:runtime && npm run test:rust-assets && 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-playwright-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",
|
|
49
|
+
"test:platform": "cargo test --workspace && cargo build -p supercov && node scripts/rust-process-supervision.mjs && node scripts/workspace-crash-integration.mjs",
|
|
50
|
+
"test:native-package": "cargo build --release -p supercov && node scripts/native-package-integration.mjs && node scripts/native-release-set-integration.mjs",
|
|
51
|
+
"test:pypi-wheel": "node scripts/pypi-wheel-integration.mjs",
|
|
52
|
+
"test:pypi-registry": "node scripts/pypi-registry-integration.mjs",
|
|
53
|
+
"build:rubygem": "cargo build --release -p supercov && node scripts/build-rubygem.mjs",
|
|
54
|
+
"test:rubygem": "node scripts/rubygem-integration.mjs",
|
|
55
|
+
"test:rubygem-registry": "node scripts/rubygem-registry-integration.mjs",
|
|
56
|
+
"test:syntax": "cargo build -p supercov && node scripts/rust-syntax-matrix.mjs",
|
|
44
57
|
"test:clang-mcdc": "node scripts/clang-mcdc-oracle.mjs",
|
|
45
|
-
"test:test262": "
|
|
46
|
-
"benchmark:check": "
|
|
47
|
-
"check": "npm run test && npm run test:
|
|
48
|
-
"release:check": "npm run check && npm run
|
|
49
|
-
"prepack": "
|
|
58
|
+
"test:test262": "cargo build --release -p supercov && node scripts/test262-equivalence.mjs",
|
|
59
|
+
"benchmark:check": "cargo build --release -p supercov && node scripts/rust-transform-benchmark.mjs",
|
|
60
|
+
"check": "cargo fmt --all -- --check && cargo clippy --workspace --all-targets -- -D warnings && npm run test && npm run test:runtime && npm run test:rust-assets && node scripts/package-preflight.mjs",
|
|
61
|
+
"release:check": "npm run check && npm run test:engine && npm run test:fixture && npm run test:watchdog && npm run test:engine-contract && npm run test:agent && npm run test:packed-npx && npm run test:clang-mcdc && npm run benchmark:check",
|
|
62
|
+
"prepack": "node scripts/package-preflight.mjs",
|
|
50
63
|
"prepublishOnly": "npm run release:check"
|
|
51
64
|
},
|
|
52
|
-
"
|
|
53
|
-
"@
|
|
54
|
-
"@
|
|
55
|
-
"@
|
|
56
|
-
"@
|
|
65
|
+
"optionalDependencies": {
|
|
66
|
+
"@supercov/cli-darwin-arm64": "0.0.12",
|
|
67
|
+
"@supercov/cli-darwin-x64": "0.0.12",
|
|
68
|
+
"@supercov/cli-linux-arm64-gnu": "0.0.12",
|
|
69
|
+
"@supercov/cli-linux-arm64-musl": "0.0.12",
|
|
70
|
+
"@supercov/cli-linux-x64-gnu": "0.0.12",
|
|
71
|
+
"@supercov/cli-linux-x64-musl": "0.0.12"
|
|
57
72
|
},
|
|
58
73
|
"peerDependencies": {
|
|
59
74
|
"@playwright/test": ">=1.55.0",
|
|
@@ -76,8 +91,7 @@
|
|
|
76
91
|
"@swc/core": "^1.16.1",
|
|
77
92
|
"@types/node": "^24.0.0",
|
|
78
93
|
"esbuild": "^0.28.2",
|
|
79
|
-
"
|
|
80
|
-
"jest": "^30.4.2",
|
|
94
|
+
"expect": "30.4.1",
|
|
81
95
|
"next": "^16.3.2",
|
|
82
96
|
"react": "^19.2.4",
|
|
83
97
|
"react-dom": "^19.2.4",
|
|
@@ -465,6 +465,9 @@ function injectChildEnvironment(method, args) {
|
|
|
465
465
|
const existingEnvironment = options.env && typeof options.env === "object"
|
|
466
466
|
? options.env
|
|
467
467
|
: undefined;
|
|
468
|
+
if (existingEnvironment?.["SUPERCOV_INTERNAL_ENGINE"] === "1" ||
|
|
469
|
+
existingEnvironment?.["SUPERCOV_INTERNAL_INSTRUMENTER"] === "1")
|
|
470
|
+
return args;
|
|
468
471
|
const environment = existingEnvironment
|
|
469
472
|
? { ...existingEnvironment, ...inherited }
|
|
470
473
|
: { ...process.env, ...inherited };
|
|
@@ -519,4 +522,3 @@ export function installLaunchSupervisor() {
|
|
|
519
522
|
entrypoint: process.argv[1],
|
|
520
523
|
});
|
|
521
524
|
}
|
|
522
|
-
//# sourceMappingURL=launchSupervisor.js.map
|
|
@@ -25,6 +25,12 @@ function wrappedRegistration(original) {
|
|
|
25
25
|
runner: "node:test",
|
|
26
26
|
name: testName(args, callback),
|
|
27
27
|
...location,
|
|
28
|
+
// Source-map producers disagree about whether a call expression maps to
|
|
29
|
+
// its first token or the first token on its source line. The line and
|
|
30
|
+
// dynamic test name are stable across ahead-of-run and build-tool
|
|
31
|
+
// transforms; the mapped column is not. Canonicalize it so the same test
|
|
32
|
+
// keeps one identity when esbuild, Babel, SWC, or TypeScript rewrites it.
|
|
33
|
+
...(location.line === undefined ? {} : { column: 1 }),
|
|
28
34
|
};
|
|
29
35
|
const scope = runnerExecutionScope(identity);
|
|
30
36
|
const options = testOptions(args, index);
|
|
@@ -39,8 +45,11 @@ function wrappedRegistration(original) {
|
|
|
39
45
|
? "skipped"
|
|
40
46
|
: "passed";
|
|
41
47
|
const contextProxy = new Proxy(context, {
|
|
42
|
-
get(target, property
|
|
43
|
-
|
|
48
|
+
get(target, property) {
|
|
49
|
+
// Read with the real context as receiver: TestContext accessors
|
|
50
|
+
// (t.assert, t.mock, ...) touch private fields that only exist on
|
|
51
|
+
// the target, never on the proxy.
|
|
52
|
+
const value = Reflect.get(target, property, target);
|
|
44
53
|
if ((property === "skip" || property === "todo") && typeof value === "function") {
|
|
45
54
|
return (...callArgs) => {
|
|
46
55
|
status = "skipped";
|
|
@@ -57,8 +66,8 @@ function wrappedRegistration(original) {
|
|
|
57
66
|
if (emitted)
|
|
58
67
|
return;
|
|
59
68
|
emitted = true;
|
|
60
|
-
flushBufferedServerEvidence(scope);
|
|
61
|
-
writeRunnerEvidence(identity, nextStatus, scope, evidenceDirectory, takeNodeAssertionPhases(scope));
|
|
69
|
+
const flushedServerEvidence = flushBufferedServerEvidence(scope);
|
|
70
|
+
writeRunnerEvidence(identity, nextStatus, scope, evidenceDirectory, takeNodeAssertionPhases(scope), flushedServerEvidence);
|
|
62
71
|
};
|
|
63
72
|
try {
|
|
64
73
|
if (callback.length >= 2) {
|
|
@@ -124,4 +133,3 @@ export const snapshot = native.snapshot;
|
|
|
124
133
|
export const run = native.run;
|
|
125
134
|
export const assert = native.assert;
|
|
126
135
|
export default test;
|
|
127
|
-
//# sourceMappingURL=nodeTest.js.map
|