@code-pushup/coverage-plugin 0.53.0 → 0.54.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/bin.js +4 -4
- package/index.js +3 -4
- package/package.json +41 -24
package/bin.js
CHANGED
|
@@ -17,7 +17,7 @@ var MAX_ISSUE_MESSAGE_LENGTH = 1024;
|
|
|
17
17
|
var slugRegex = /^[a-z\d]+(?:-[a-z\d]+)*$/;
|
|
18
18
|
var filenameRegex = /^(?!.*[ \\/:*?"<>|]).+$/;
|
|
19
19
|
function hasDuplicateStrings(strings) {
|
|
20
|
-
const sortedStrings =
|
|
20
|
+
const sortedStrings = strings.toSorted();
|
|
21
21
|
const duplStrings = sortedStrings.filter(
|
|
22
22
|
(item, index) => index !== 0 && item === sortedStrings[index - 1]
|
|
23
23
|
);
|
|
@@ -111,7 +111,6 @@ var fileNameSchema = z.string().trim().regex(filenameRegex, {
|
|
|
111
111
|
message: `The filename has to be valid`
|
|
112
112
|
}).min(1, { message: "file name is invalid" });
|
|
113
113
|
var positiveIntSchema = z.number().int().positive();
|
|
114
|
-
var nonnegativeIntSchema = z.number().int().nonnegative();
|
|
115
114
|
var nonnegativeNumberSchema = z.number().nonnegative();
|
|
116
115
|
function packageVersionSchema(options) {
|
|
117
116
|
const { versionDescription = "NPM version of the package", required } = options ?? {};
|
|
@@ -655,7 +654,7 @@ var auditDiffSchema = scorableWithPluginDiffSchema.merge(
|
|
|
655
654
|
z16.object({
|
|
656
655
|
values: makeComparisonSchema(auditValueSchema).merge(
|
|
657
656
|
z16.object({
|
|
658
|
-
diff: z16.number().
|
|
657
|
+
diff: z16.number().describe("Value change (`values.after - values.before`)")
|
|
659
658
|
})
|
|
660
659
|
).describe("Audit `value` comparison"),
|
|
661
660
|
displayValues: makeComparisonSchema(auditDisplayValueSchema).describe(
|
|
@@ -740,6 +739,7 @@ function executeProcess(cfg) {
|
|
|
740
739
|
return new Promise((resolve, reject) => {
|
|
741
740
|
const spawnedProcess = spawn(command, args ?? [], {
|
|
742
741
|
shell: true,
|
|
742
|
+
windowsHide: true,
|
|
743
743
|
...options
|
|
744
744
|
});
|
|
745
745
|
let stdout = "";
|
|
@@ -1035,7 +1035,7 @@ function calculateCoverage(hit, found) {
|
|
|
1035
1035
|
return found > 0 ? hit / found : 1;
|
|
1036
1036
|
}
|
|
1037
1037
|
function mergeConsecutiveNumbers(numberArr) {
|
|
1038
|
-
return
|
|
1038
|
+
return numberArr.toSorted((a, b) => a - b).reduce((acc, currValue) => {
|
|
1039
1039
|
const prevValue = acc.at(-1);
|
|
1040
1040
|
if (prevValue != null && (prevValue.start === currValue - 1 || prevValue.end === currValue - 1)) {
|
|
1041
1041
|
return [
|
package/index.js
CHANGED
|
@@ -16,7 +16,7 @@ var MAX_ISSUE_MESSAGE_LENGTH = 1024;
|
|
|
16
16
|
var slugRegex = /^[a-z\d]+(?:-[a-z\d]+)*$/;
|
|
17
17
|
var filenameRegex = /^(?!.*[ \\/:*?"<>|]).+$/;
|
|
18
18
|
function hasDuplicateStrings(strings) {
|
|
19
|
-
const sortedStrings =
|
|
19
|
+
const sortedStrings = strings.toSorted();
|
|
20
20
|
const duplStrings = sortedStrings.filter(
|
|
21
21
|
(item, index) => index !== 0 && item === sortedStrings[index - 1]
|
|
22
22
|
);
|
|
@@ -110,7 +110,6 @@ var fileNameSchema = z.string().trim().regex(filenameRegex, {
|
|
|
110
110
|
message: `The filename has to be valid`
|
|
111
111
|
}).min(1, { message: "file name is invalid" });
|
|
112
112
|
var positiveIntSchema = z.number().int().positive();
|
|
113
|
-
var nonnegativeIntSchema = z.number().int().nonnegative();
|
|
114
113
|
var nonnegativeNumberSchema = z.number().nonnegative();
|
|
115
114
|
function packageVersionSchema(options) {
|
|
116
115
|
const { versionDescription = "NPM version of the package", required } = options ?? {};
|
|
@@ -654,7 +653,7 @@ var auditDiffSchema = scorableWithPluginDiffSchema.merge(
|
|
|
654
653
|
z16.object({
|
|
655
654
|
values: makeComparisonSchema(auditValueSchema).merge(
|
|
656
655
|
z16.object({
|
|
657
|
-
diff: z16.number().
|
|
656
|
+
diff: z16.number().describe("Value change (`values.after - values.before`)")
|
|
658
657
|
})
|
|
659
658
|
).describe("Audit `value` comparison"),
|
|
660
659
|
displayValues: makeComparisonSchema(auditDisplayValueSchema).describe(
|
|
@@ -814,7 +813,7 @@ import { bold as bold4, cyan, cyanBright, green as green2, red } from "ansis";
|
|
|
814
813
|
|
|
815
814
|
// packages/plugin-coverage/package.json
|
|
816
815
|
var name = "@code-pushup/coverage-plugin";
|
|
817
|
-
var version = "0.
|
|
816
|
+
var version = "0.54.0";
|
|
818
817
|
|
|
819
818
|
// packages/plugin-coverage/src/lib/config.ts
|
|
820
819
|
import { z as z17 } from "zod";
|
package/package.json
CHANGED
|
@@ -1,18 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code-pushup/coverage-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.54.0",
|
|
4
4
|
"description": "Code PushUp plugin for tracking code coverage ☂",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://github.com/code-pushup/cli/tree/main/packages/plugin-coverage#readme",
|
|
7
|
+
"bugs": {
|
|
8
|
+
"url": "https://github.com/code-pushup/cli/issues?q=is%3Aissue%20state%3Aopen%20type%3ABug%20label%3A\"🧩%20coverage-plugin\""
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/code-pushup/cli.git",
|
|
13
|
+
"directory": "packages/plugin-coverage"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"CLI",
|
|
17
|
+
"Code PushUp",
|
|
18
|
+
"plugin",
|
|
19
|
+
"automation",
|
|
20
|
+
"developer tools",
|
|
21
|
+
"conformance",
|
|
22
|
+
"code coverage",
|
|
23
|
+
"unit tests",
|
|
24
|
+
"testing",
|
|
25
|
+
"KPI tracking",
|
|
26
|
+
"automated feedback",
|
|
27
|
+
"regression guard",
|
|
28
|
+
"actionable feedback",
|
|
29
|
+
"audit",
|
|
30
|
+
"score monitoring"
|
|
31
|
+
],
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public"
|
|
34
|
+
},
|
|
35
|
+
"type": "module",
|
|
36
|
+
"main": "./index.js",
|
|
37
|
+
"types": "./src/index.d.ts",
|
|
5
38
|
"dependencies": {
|
|
6
|
-
"@code-pushup/models": "0.
|
|
7
|
-
"@code-pushup/utils": "0.
|
|
39
|
+
"@code-pushup/models": "0.54.0",
|
|
40
|
+
"@code-pushup/utils": "0.54.0",
|
|
8
41
|
"ansis": "^3.3.0",
|
|
9
42
|
"parse-lcov": "^1.0.4",
|
|
10
43
|
"zod": "^3.22.4"
|
|
11
44
|
},
|
|
12
45
|
"peerDependencies": {
|
|
13
|
-
"@nx/devkit": "
|
|
14
|
-
"@nx/jest": "
|
|
15
|
-
"@nx/vite": "
|
|
46
|
+
"@nx/devkit": ">=17.0.0",
|
|
47
|
+
"@nx/jest": ">=17.0.0",
|
|
48
|
+
"@nx/vite": ">=17.0.0"
|
|
16
49
|
},
|
|
17
50
|
"peerDependenciesMeta": {
|
|
18
51
|
"@nx/devkit": {
|
|
@@ -24,21 +57,5 @@
|
|
|
24
57
|
"@nx/vite": {
|
|
25
58
|
"optional": true
|
|
26
59
|
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
"homepage": "https://github.com/code-pushup/cli/tree/main/packages/plugin-coverage#readme",
|
|
30
|
-
"bugs": {
|
|
31
|
-
"url": "https://github.com/code-pushup/cli/issues"
|
|
32
|
-
},
|
|
33
|
-
"repository": {
|
|
34
|
-
"type": "git",
|
|
35
|
-
"url": "git+https://github.com/code-pushup/cli.git",
|
|
36
|
-
"directory": "packages/plugin-coverage"
|
|
37
|
-
},
|
|
38
|
-
"publishConfig": {
|
|
39
|
-
"access": "public"
|
|
40
|
-
},
|
|
41
|
-
"type": "module",
|
|
42
|
-
"main": "./index.js",
|
|
43
|
-
"types": "./src/index.d.ts"
|
|
44
|
-
}
|
|
60
|
+
}
|
|
61
|
+
}
|