supercov 4.27.0 → 4.28.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.
- package/docs/cli.md +35 -6
- package/package.json +9 -9
package/docs/cli.md
CHANGED
|
@@ -431,10 +431,25 @@ one pass instead of a page at a time.
|
|
|
431
431
|
```sh supercov-example
|
|
432
432
|
npx supercov runs report --format lcov --output coverage/lcov.info
|
|
433
433
|
npx supercov runs report --format cobertura --output coverage/cobertura.xml
|
|
434
|
+
npx supercov runs report --format istanbul --output coverage/coverage-final.json
|
|
435
|
+
npx supercov runs report --format istanbul-summary --output coverage/coverage-summary.json
|
|
436
|
+
npx supercov runs report --format clover --output coverage/clover.xml
|
|
437
|
+
npx supercov runs report --format jacoco --output coverage/jacoco.xml
|
|
438
|
+
npx supercov runs report --format sonar --output coverage/sonar.xml
|
|
434
439
|
npx supercov runs report --format html --output coverage/report
|
|
435
440
|
```
|
|
436
441
|
|
|
437
|
-
|
|
442
|
+
| Format | Written as | Read by, for example |
|
|
443
|
+
| --- | --- | --- |
|
|
444
|
+
| `lcov` | an LCOV tracefile | Codecov, Coveralls, Qlty, `genhtml`, editors |
|
|
445
|
+
| `cobertura` | Cobertura XML | GitLab merge requests, Azure DevOps, ReportGenerator |
|
|
446
|
+
| `istanbul` | Istanbul's `coverage-final.json` | tools that read JavaScript coverage by range, such as CRAP gates, and Istanbul's own reporters |
|
|
447
|
+
| `istanbul-summary` | Istanbul's `coverage-summary.json` | pull-request comment Actions for Vitest and Jest, badge generators |
|
|
448
|
+
| `clover` | Clover XML | Qlty, Codecov, Atlassian tools |
|
|
449
|
+
| `jacoco` | JaCoCo XML | GitLab merge requests, SonarQube's Java analysis, Qlty |
|
|
450
|
+
| `sonar` | SonarQube's generic coverage XML | SonarQube and SonarCloud, for any language (`sonar.coverageReportPaths`) |
|
|
451
|
+
|
|
452
|
+
All are written from the same view `check` and `patch` read, so a viewer,
|
|
438
453
|
hosted service or CI integration sees the totals Supercov enforced. `--kind`,
|
|
439
454
|
`--runner`, `--tag`, `--title` and `--test-file` write the coverage of only
|
|
440
455
|
those tests, from the same run:
|
|
@@ -448,9 +463,23 @@ written atomically; an existing file is kept unless you pass `--force`. Without
|
|
|
448
463
|
`--output` the report goes to stdout and diagnostics to stderr, so a redirect
|
|
449
464
|
captures only the report.
|
|
450
465
|
|
|
451
|
-
Supercov records that a line ran, not how many times, so `DA
|
|
452
|
-
`1` or `0`. They are not execution
|
|
453
|
-
one to fill a field.
|
|
466
|
+
Supercov records that a line ran, not how many times, so `DA:`, `hits`,
|
|
467
|
+
Istanbul's counts and Clover's `count` state `1` or `0`. They are not execution
|
|
468
|
+
frequencies, and Supercov will not invent one to fill a field. JaCoCo counts
|
|
469
|
+
bytecode instructions, which Supercov does not measure, so the `jacoco` export
|
|
470
|
+
states each measured line as one instruction, missed or covered. Cobertura,
|
|
471
|
+
Clover, JaCoCo and SonarQube state branches by line; a branch on a line that is
|
|
472
|
+
not itself measured, such as a later line of a statement written across
|
|
473
|
+
several, is stated on the measured line its statement starts on, so their
|
|
474
|
+
branch totals are Supercov's.
|
|
475
|
+
|
|
476
|
+
The `istanbul` export places every statement, function and branch by its range
|
|
477
|
+
in the source, found in this checkout; its keys are absolute paths, as Istanbul
|
|
478
|
+
writes them. A file changed since the run no longer holds what the run recorded
|
|
479
|
+
there, and the export stops and names it rather than guess where it moved: run
|
|
480
|
+
the tests again. Istanbul records no place for each alternative of a branch, so
|
|
481
|
+
each is placed at its branch. The summary states Supercov's own counts, its
|
|
482
|
+
lines included.
|
|
454
483
|
|
|
455
484
|
MC/DC conditions are not exported as ordinary branches. A consumer would then
|
|
456
485
|
show condition obligations as branch coverage, which is a different
|
|
@@ -459,8 +488,8 @@ each condition with `MCF:` and `MCH:` for a file, so `lcov --mcdc-coverage` and
|
|
|
459
488
|
`genhtml --mcdc-coverage` show a per-file MC/DC figure from the export alone.
|
|
460
489
|
LCOV counts a condition twice, once for each way it can turn the outcome, and
|
|
461
490
|
Supercov's covered condition is both: hit over found is the run's MC/DC. A
|
|
462
|
-
reader of the older format passes the records over.
|
|
463
|
-
record; there the evidence stays in the JSON view and the HTML report. A report
|
|
491
|
+
reader of the older format passes the records over. The other formats have no
|
|
492
|
+
such record; there the evidence stays in the JSON view and the HTML report. A report
|
|
464
493
|
from a failed or stale run is still written, with a warning on stderr — only
|
|
465
494
|
`check` refuses to pass on one.
|
|
466
495
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "supercov",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.28.0",
|
|
4
4
|
"description": "Coverage, security and code quality for coding agents",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"coverage",
|
|
@@ -124,14 +124,14 @@
|
|
|
124
124
|
"test:windows-tls": "node scripts/windows-tls-test.mjs"
|
|
125
125
|
},
|
|
126
126
|
"optionalDependencies": {
|
|
127
|
-
"@supercov/cli-darwin-arm64": "4.
|
|
128
|
-
"@supercov/cli-darwin-x64": "4.
|
|
129
|
-
"@supercov/cli-linux-arm64-gnu": "4.
|
|
130
|
-
"@supercov/cli-linux-arm64-musl": "4.
|
|
131
|
-
"@supercov/cli-linux-x64-gnu": "4.
|
|
132
|
-
"@supercov/cli-linux-x64-musl": "4.
|
|
133
|
-
"@supercov/cli-win32-arm64": "4.
|
|
134
|
-
"@supercov/cli-win32-x64": "4.
|
|
127
|
+
"@supercov/cli-darwin-arm64": "4.28.0",
|
|
128
|
+
"@supercov/cli-darwin-x64": "4.28.0",
|
|
129
|
+
"@supercov/cli-linux-arm64-gnu": "4.28.0",
|
|
130
|
+
"@supercov/cli-linux-arm64-musl": "4.28.0",
|
|
131
|
+
"@supercov/cli-linux-x64-gnu": "4.28.0",
|
|
132
|
+
"@supercov/cli-linux-x64-musl": "4.28.0",
|
|
133
|
+
"@supercov/cli-win32-arm64": "4.28.0",
|
|
134
|
+
"@supercov/cli-win32-x64": "4.28.0"
|
|
135
135
|
},
|
|
136
136
|
"peerDependencies": {
|
|
137
137
|
"@playwright/test": ">=1.55.0",
|