v11y-check 0.10.0 → 0.11.1
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 +3 -9
- package/dist/esm/cli.js +1 -1
- package/dist/esm/format-check.js +1 -4
- package/dist/esm/format-verbose.js +3 -9
- package/dist/esm/run-audit.js +4 -3
- package/package.json +5 -5
- package/dist/esm/.cache +0 -1
package/README.md
CHANGED
|
@@ -2,18 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Wraps [audit-ci](https://github.com/IBM/audit-ci) with a richer config model, typed JSON source of truth, and a sync workflow that automates allowlist management.
|
|
4
4
|
|
|
5
|
-
<!-- section:release-notes -->
|
|
6
|
-
## Release notes — v0.10.0 (2026-07-01)
|
|
7
|
-
|
|
8
|
-
### 🎉 Features
|
|
9
|
-
|
|
10
|
-
- 🚨 **Breaking:** Rebuild nmr-compile on a unified tsc emit (#455)
|
|
11
|
-
|
|
12
|
-
`nmr` now compiles a package's JavaScript and type declarations in one step, rewriting every import form — static, re-export, dynamic `import()`, bare side-effect, and tsconfig `paths` aliases — to runnable `.js` in both outputs. It now requires TypeScript 5.7 or newer as a peer dependency.
|
|
13
|
-
<!-- /section:release-notes -->
|
|
5
|
+
<!-- section:release-notes --><!-- /section:release-notes -->
|
|
14
6
|
|
|
15
7
|
## Installation
|
|
16
8
|
|
|
9
|
+
Requires Node.js 24 or later.
|
|
10
|
+
|
|
17
11
|
```shell
|
|
18
12
|
pnpm add -D v11y-check
|
|
19
13
|
```
|
package/dist/esm/cli.js
CHANGED
|
@@ -42,7 +42,7 @@ export async function auditCommand(options) {
|
|
|
42
42
|
process.stderr.write(`warning: ${warning}\n`);
|
|
43
43
|
}
|
|
44
44
|
for (const r of parsed.results) {
|
|
45
|
-
if (
|
|
45
|
+
if (allResults.every((existing) => existing.id !== r.id)) {
|
|
46
46
|
allResults.push(r);
|
|
47
47
|
}
|
|
48
48
|
}
|
package/dist/esm/format-check.js
CHANGED
|
@@ -72,10 +72,7 @@ function hasFindings(result) {
|
|
|
72
72
|
result.belowThreshold.length > 0);
|
|
73
73
|
}
|
|
74
74
|
function formatScopeFindings(result, now) {
|
|
75
|
-
const lines =
|
|
76
|
-
for (const vuln of result.unallowed) {
|
|
77
|
-
lines.push(formatUnallowedLine(vuln));
|
|
78
|
-
}
|
|
75
|
+
const lines = Array.from(result.unallowed, (vuln) => formatUnallowedLine(vuln));
|
|
79
76
|
for (const vuln of result.allowed) {
|
|
80
77
|
lines.push(formatAllowedLine(vuln, now));
|
|
81
78
|
}
|
|
@@ -9,14 +9,11 @@ const SCOPE_HEADERS = {
|
|
|
9
9
|
prod: '-- \u{1F4E6} prod --',
|
|
10
10
|
dev: '-- \u{1F527} dev --',
|
|
11
11
|
};
|
|
12
|
-
const DETAIL_INDENT = '
|
|
12
|
+
const DETAIL_INDENT = ' '.repeat(5);
|
|
13
13
|
const WRAP_COLUMNS = 72;
|
|
14
14
|
export function formatCheckVerboseText(result, scopes, now, thresholds) {
|
|
15
15
|
const effectiveNow = now ?? new Date();
|
|
16
|
-
const sections = [];
|
|
17
|
-
for (const scope of scopes) {
|
|
18
|
-
sections.push(formatScopeVerbose(scope, result[scope], effectiveNow, thresholds?.[scope]));
|
|
19
|
-
}
|
|
16
|
+
const sections = Array.from(scopes, (scope) => formatScopeVerbose(scope, result[scope], effectiveNow, thresholds?.[scope]));
|
|
20
17
|
const actions = formatActionHints(result, scopes);
|
|
21
18
|
const body = sections.join('\n\n') + '\n';
|
|
22
19
|
if (actions.length === 0)
|
|
@@ -41,10 +38,7 @@ function formatScopeVerbose(scope, result, now, threshold) {
|
|
|
41
38
|
lines.push(' (none)');
|
|
42
39
|
return lines.join('\n');
|
|
43
40
|
}
|
|
44
|
-
const blocks =
|
|
45
|
-
for (const vuln of result.unallowed) {
|
|
46
|
-
blocks.push(formatUnallowedBlock(vuln));
|
|
47
|
-
}
|
|
41
|
+
const blocks = Array.from(result.unallowed, (vuln) => formatUnallowedBlock(vuln));
|
|
48
42
|
for (const vuln of result.allowed) {
|
|
49
43
|
blocks.push(formatAllowedBlock(vuln, now));
|
|
50
44
|
}
|
package/dist/esm/run-audit.js
CHANGED
|
@@ -92,10 +92,11 @@ function extractPaths(advisory) {
|
|
|
92
92
|
const ordered = [];
|
|
93
93
|
for (const finding of advisory.findings) {
|
|
94
94
|
for (const pathValue of finding.paths) {
|
|
95
|
-
if (
|
|
96
|
-
|
|
97
|
-
ordered.push(pathValue);
|
|
95
|
+
if (seen.has(pathValue)) {
|
|
96
|
+
continue;
|
|
98
97
|
}
|
|
98
|
+
seen.add(pathValue);
|
|
99
|
+
ordered.push(pathValue);
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
102
|
return ordered;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "v11y-check",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Wrap audit-ci with a richer config model, typed JSON source of truth, and sync workflow",
|
|
6
6
|
"keywords": [
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"type": "module",
|
|
25
25
|
"exports": {
|
|
26
26
|
".": {
|
|
27
|
-
"
|
|
28
|
-
"
|
|
27
|
+
"types": "./dist/esm/index.d.ts",
|
|
28
|
+
"import": "./dist/esm/index.js"
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"bin": {
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"audit-ci": "7.1.0",
|
|
42
42
|
"zod": "4.4.3",
|
|
43
|
-
"@williamthorsen/nmr-core": "0.
|
|
43
|
+
"@williamthorsen/nmr-core": "0.7.1"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
46
|
-
"node": ">=
|
|
46
|
+
"node": ">=24"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {}
|
|
49
49
|
}
|
package/dist/esm/.cache
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
d32d9586bf4dd951e3fa117d2712ec09488bb0d025fa16d5daf7c659b885db79
|