v11y-check 0.11.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 CHANGED
@@ -2,20 +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.11.0 (2026-07-13)
7
-
8
- ### 🎉 Features
9
-
10
- - 🚨 **Breaking:** Fail a package that declares types but ships none (#467)
11
-
12
- `nmr attw` now fails a package that claims to ship type declarations but ships none. Such a package used to pass, leaving every TypeScript consumer of it silently typed as `any`.
13
-
14
- A package that ships working declarations found only by sitting beside its JavaScript entry point escapes the check, since it declares nothing. Add a `types` entry to bring it under the check.
15
- <!-- /section:release-notes -->
5
+ <!-- section:release-notes --><!-- /section:release-notes -->
16
6
 
17
7
  ## Installation
18
8
 
9
+ Requires Node.js 24 or later.
10
+
19
11
  ```shell
20
12
  pnpm add -D v11y-check
21
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 (!allResults.some((existing) => existing.id === r.id)) {
45
+ if (allResults.every((existing) => existing.id !== r.id)) {
46
46
  allResults.push(r);
47
47
  }
48
48
  }
@@ -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
  }
@@ -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 (!seen.has(pathValue)) {
96
- seen.add(pathValue);
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.11.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": [
@@ -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.7.0"
43
+ "@williamthorsen/nmr-core": "0.7.1"
44
44
  },
45
45
  "engines": {
46
- "node": ">=18.17.0"
46
+ "node": ">=24"
47
47
  },
48
48
  "scripts": {}
49
49
  }