supercov 4.17.1 → 4.17.2
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 +1 -1
- package/package.json +9 -9
- package/runtime/javascript/jest.config.mjs +30 -3
package/docs/cli.md
CHANGED
|
@@ -471,7 +471,7 @@ one as a public artifact.
|
|
|
471
471
|
| `--title <text>` | Restrict to tests whose name contains this text |
|
|
472
472
|
| `--test-file <path>` | Restrict to tests in this file, or in this directory |
|
|
473
473
|
| `--metric all \| lines \| statements \| functions \| branches \| mcdc` | Choose a metric for `files`, `gaps`, `diff`, or `minimize` |
|
|
474
|
-
| `--limit N`, `--offset N` | Page through a collection |
|
|
474
|
+
| `--limit N`, `--offset N` | Page through a collection; `--limit 0` lists every entry |
|
|
475
475
|
| `--json` | Return the machine-readable form |
|
|
476
476
|
|
|
477
477
|
Collection output includes a copyable command for the next page.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "supercov",
|
|
3
|
-
"version": "4.17.
|
|
3
|
+
"version": "4.17.2",
|
|
4
4
|
"description": "Coverage, security and code quality for coding agents",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"coverage",
|
|
@@ -119,14 +119,14 @@
|
|
|
119
119
|
"test:windows-tls": "node scripts/windows-tls-test.mjs"
|
|
120
120
|
},
|
|
121
121
|
"optionalDependencies": {
|
|
122
|
-
"@supercov/cli-darwin-arm64": "4.17.
|
|
123
|
-
"@supercov/cli-darwin-x64": "4.17.
|
|
124
|
-
"@supercov/cli-linux-arm64-gnu": "4.17.
|
|
125
|
-
"@supercov/cli-linux-arm64-musl": "4.17.
|
|
126
|
-
"@supercov/cli-linux-x64-gnu": "4.17.
|
|
127
|
-
"@supercov/cli-linux-x64-musl": "4.17.
|
|
128
|
-
"@supercov/cli-win32-arm64": "4.17.
|
|
129
|
-
"@supercov/cli-win32-x64": "4.17.
|
|
122
|
+
"@supercov/cli-darwin-arm64": "4.17.2",
|
|
123
|
+
"@supercov/cli-darwin-x64": "4.17.2",
|
|
124
|
+
"@supercov/cli-linux-arm64-gnu": "4.17.2",
|
|
125
|
+
"@supercov/cli-linux-arm64-musl": "4.17.2",
|
|
126
|
+
"@supercov/cli-linux-x64-gnu": "4.17.2",
|
|
127
|
+
"@supercov/cli-linux-x64-musl": "4.17.2",
|
|
128
|
+
"@supercov/cli-win32-arm64": "4.17.2",
|
|
129
|
+
"@supercov/cli-win32-x64": "4.17.2"
|
|
130
130
|
},
|
|
131
131
|
"peerDependencies": {
|
|
132
132
|
"@playwright/test": ">=1.55.0",
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
// Jest accepts, or the "jest" key of package.json -- and adds the adapter
|
|
5
5
|
// (jest.cjs) and the reporter (jestReporter.mjs). Nothing of the user's is
|
|
6
6
|
// replaced: their setup files and reporters keep running.
|
|
7
|
+
import { realpathSync } from "node:fs";
|
|
7
8
|
import { createRequire } from "node:module";
|
|
8
9
|
import { dirname, resolve } from "node:path";
|
|
9
10
|
import { fileURLToPath } from "node:url";
|
|
@@ -11,12 +12,38 @@ import { fileURLToPath } from "node:url";
|
|
|
11
12
|
const here = (name) => fileURLToPath(new URL(`./${name}`, import.meta.url));
|
|
12
13
|
const asList = (value) => (value === undefined ? [] : Array.isArray(value) ? value : [value]);
|
|
13
14
|
|
|
15
|
+
// The jest-config of the Jest that is running, so version and resolution
|
|
16
|
+
// match Jest's. npm may leave it only under jest-cli or @jest/core
|
|
17
|
+
// (node_modules/jest-cli/node_modules/jest-config), where the project root
|
|
18
|
+
// does not see it: from the root, then from the running Jest's own packages.
|
|
19
|
+
function jestConfig() {
|
|
20
|
+
const fromRoot = createRequire(resolve(process.cwd(), "package.json"));
|
|
21
|
+
const bases = [fromRoot];
|
|
22
|
+
try {
|
|
23
|
+
bases.push(createRequire(realpathSync(process.argv[1])));
|
|
24
|
+
} catch {}
|
|
25
|
+
for (const base of [...bases]) {
|
|
26
|
+
for (const owner of ["jest-cli/package.json", "@jest/core/package.json", "jest/package.json"]) {
|
|
27
|
+
try {
|
|
28
|
+
bases.push(createRequire(base.resolve(owner)));
|
|
29
|
+
} catch {}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
let first;
|
|
33
|
+
for (const base of bases) {
|
|
34
|
+
try {
|
|
35
|
+
return base("jest-config");
|
|
36
|
+
} catch (error) {
|
|
37
|
+
first ??= error;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
throw first;
|
|
41
|
+
}
|
|
42
|
+
|
|
14
43
|
export default async function supercovJestConfig() {
|
|
15
44
|
let config = { rootDir: process.cwd() };
|
|
16
45
|
try {
|
|
17
|
-
|
|
18
|
-
const projectRequire = createRequire(resolve(process.cwd(), "package.json"));
|
|
19
|
-
const { readInitialOptions } = projectRequire("jest-config");
|
|
46
|
+
const { readInitialOptions } = jestConfig();
|
|
20
47
|
const original = process.env["SUPERCOV_ORIGINAL_JEST_CONFIG"] || undefined;
|
|
21
48
|
const read = await readInitialOptions(original, { skipMultipleConfigError: true });
|
|
22
49
|
config = read.config ?? config;
|