supercov 4.5.0 → 4.6.0

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.
Files changed (2) hide show
  1. package/docs/cli.md +48 -10
  2. package/package.json +10 -10
package/docs/cli.md CHANGED
@@ -511,8 +511,12 @@ pass in the run is listed regardless.
511
511
  per line, for a runner's filter. A Vitest, Playwright or node:test test inside
512
512
  `describe` blocks is printed as the blocks and the test joined by spaces
513
513
  (`small charges`), which is what `vitest -t`, `--grep` and
514
- `--test-name-pattern` match. A dependency, lockfile, configuration or
515
- toolchain change affects every test and is reported as such. A source file
514
+ `--test-name-pattern` match. A helper beside the tests that changed affects
515
+ the tests whose files import it (a helper that only gained functions affects
516
+ none), and every test where Supercov cannot read the imports. A dependency,
517
+ lockfile, configuration or toolchain change affects every test and is reported
518
+ as such; a test runner's settings affect only the runs that used that runner.
519
+ A source file
516
520
  added since the run is outside every test's record; the working-tree check
517
521
  says so, and the suite should run in full.
518
522
 
@@ -595,19 +599,53 @@ A test that is in two of the runs is one test in the merge. If it failed in
595
599
  either, it is failed, which is why a command run again replaces its earlier
596
600
  run and is not merged with it.
597
601
 
598
- The runs may differ in their tests when the later ones have only gained test
599
- files. Measuring a new test alone and adding it to the runs before it is
600
- then the whole suite's figure, without the whole suite's time:
602
+ The runs may differ in their tests, the helpers beside them, and the test
603
+ runners' settings, as long as nothing that changed reaches what an earlier
604
+ run's tests did. Measuring a new test alone and adding it to the runs before it
605
+ is then the whole suite's figure, without the whole suite's time:
601
606
 
602
607
  ```sh supercov-example
603
- npx supercov -- npm test # the suite, once
604
- npx supercov -- npx vitest run test/new.test.ts # a test added since, alone
608
+ npx supercov -- npm test # the suite, once
609
+ npx supercov -- <the new test alone> # a test added since
605
610
  npx supercov merge
606
611
  ```
607
612
 
608
- A run is left out, and named, when a file of its own tests has changed since
609
- it ran, or a file tests load that is not itself a test's: what it recorded is
610
- then of other tests. Measure those again to count them.
613
+ Each file that differs from what an earlier run was recorded with is judged by
614
+ what that run's tests did with it:
615
+
616
+ - Another run's test file: it was not in this run. A file of the run's own
617
+ tests: what it recorded is of other tests, and the run is left out.
618
+ - A helper, fixture or support file: left out of a run only when that run's
619
+ test files import it, directly or through other files. For JavaScript and
620
+ TypeScript tests Supercov reads the imports; a computed import path, or tests
621
+ in another language, count every helper as loaded. A helper that only gained
622
+ functions, which code written before cannot have called, leaves every run
623
+ in.
624
+ - A test runner's settings: `playwright.config.*`, `vitest.config.*`,
625
+ `jest.config.*` and `ava.config.*` belong to their runner, and a run that
626
+ did not use that runner keeps. Of Playwright's settings, only those that
627
+ decide what a test does count: `use`, `testDir`, `webServer`,
628
+ `globalSetup`, `globalTeardown`, and a project's `dependencies` and
629
+ `teardown`. Timeouts, retries, workers, reporters, which files and names to
630
+ run, and projects added since schedule tests and change nothing an earlier
631
+ test reached. This needs the newer run to have measured Playwright.
632
+ - Any other configuration, such as `tsconfig.json`, `vite.config.*` or a
633
+ Babel file, may set how any test runs, and leaves the run out.
634
+
635
+ A run left out is named with the files and the functions that changed. The
636
+ merged run lists what differed and why it does not reach the earlier runs:
637
+ `merged across:` in `runs <id>`, and `mergedAcross` in JSON.
638
+
639
+ When you know a change Supercov counts does not alter what the earlier tests
640
+ ran, say so:
641
+
642
+ ```sh supercov-example
643
+ npx supercov merge --allow-changed
644
+ ```
645
+
646
+ The product code, the dependencies, and what is measured must still be the
647
+ same, and a run whose own test files changed is still left out. What was
648
+ accepted is listed in `merged across:` as accepted.
611
649
 
612
650
  `assertions assess` assesses a merged run across every suite merged into it,
613
651
  reusing the answers saved when its parts were assessed. `tests affected` is
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "supercov",
3
- "version": "4.5.0",
3
+ "version": "4.6.0",
4
4
  "description": "Coverage, security and code quality for coding agents",
5
5
  "keywords": [
6
6
  "coverage",
@@ -83,7 +83,7 @@
83
83
  "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",
84
84
  "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",
85
85
  "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",
86
- "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/rust-direct-playwright-integration.mjs && node scripts/rust-custom-browser-playwright-integration.mjs && node scripts/rust-classic-browser-integration.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",
86
+ "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/rust-direct-playwright-integration.mjs && node scripts/rust-custom-browser-playwright-integration.mjs && node scripts/rust-classic-browser-integration.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",
87
87
  "test:platform": "cargo test --workspace && cargo build -p supercov && node scripts/rust-process-supervision.mjs && node scripts/workspace-crash-integration.mjs",
88
88
  "test:native-package": "cargo build --release -p supercov && node scripts/native-package-integration.mjs && node scripts/native-release-set-integration.mjs",
89
89
  "test:pypi-wheel": "node scripts/pypi-wheel-integration.mjs",
@@ -120,14 +120,14 @@
120
120
  "test:windows-tls": "node scripts/windows-tls-test.mjs"
121
121
  },
122
122
  "optionalDependencies": {
123
- "@supercov/cli-darwin-arm64": "4.5.0",
124
- "@supercov/cli-darwin-x64": "4.5.0",
125
- "@supercov/cli-linux-arm64-gnu": "4.5.0",
126
- "@supercov/cli-linux-arm64-musl": "4.5.0",
127
- "@supercov/cli-linux-x64-gnu": "4.5.0",
128
- "@supercov/cli-linux-x64-musl": "4.5.0",
129
- "@supercov/cli-win32-arm64": "4.5.0",
130
- "@supercov/cli-win32-x64": "4.5.0"
123
+ "@supercov/cli-darwin-arm64": "4.6.0",
124
+ "@supercov/cli-darwin-x64": "4.6.0",
125
+ "@supercov/cli-linux-arm64-gnu": "4.6.0",
126
+ "@supercov/cli-linux-arm64-musl": "4.6.0",
127
+ "@supercov/cli-linux-x64-gnu": "4.6.0",
128
+ "@supercov/cli-linux-x64-musl": "4.6.0",
129
+ "@supercov/cli-win32-arm64": "4.6.0",
130
+ "@supercov/cli-win32-x64": "4.6.0"
131
131
  },
132
132
  "peerDependencies": {
133
133
  "@playwright/test": ">=1.55.0",