v11y-check 0.14.2 → 0.15.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/.readyup/kits/default.js +6 -10
- package/.readyup/manifest.json +3 -3
- package/bin/v11y.js +1 -1
- package/dist/esm/format-check.js +1 -1
- package/dist/esm/format-verbose.js +1 -1
- package/dist/esm/sync.js +10 -13
- package/dist/esm/types.js +1 -1
- package/package.json +3 -3
package/.readyup/kits/default.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @noformat — @generated. Do not edit. Compiled by rdy. */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export const __readyupVersion = "0.
|
|
3
|
+
export const __readyupVersion = "0.26.0";
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
// .readyup/kits/default.ts
|
|
@@ -39,7 +39,7 @@ var default_default = defineRdyKit({
|
|
|
39
39
|
{
|
|
40
40
|
name: "audit-ci configs are under .config/audit-ci/",
|
|
41
41
|
severity: "warn",
|
|
42
|
-
|
|
42
|
+
quiet: true,
|
|
43
43
|
check: noLegacyAuditCiDirectory,
|
|
44
44
|
fix: "Move audit-ci configs from .audit-ci/ to .config/audit-ci/ and update references"
|
|
45
45
|
},
|
|
@@ -63,21 +63,17 @@ var default_default = defineRdyKit({
|
|
|
63
63
|
]
|
|
64
64
|
});
|
|
65
65
|
function getMinVersion() {
|
|
66
|
-
const picked = { "version": "0.
|
|
67
|
-
if (typeof picked
|
|
66
|
+
const picked = { "version": "0.15.1" };
|
|
67
|
+
if (typeof picked["version"] !== "string") {
|
|
68
68
|
throw new TypeError("v11y-check/package.json: 'version' must be a string");
|
|
69
69
|
}
|
|
70
|
-
return picked
|
|
70
|
+
return picked["version"];
|
|
71
71
|
}
|
|
72
72
|
function noLegacyAuditCiDirectory() {
|
|
73
73
|
return !existsSync(join(process.cwd(), ".audit-ci"));
|
|
74
74
|
}
|
|
75
|
-
function skipLegacyAuditCiCheck() {
|
|
76
|
-
return !existsSync(join(process.cwd(), ".audit-ci")) ? "no legacy .audit-ci/ directory" : false;
|
|
77
|
-
}
|
|
78
75
|
export {
|
|
79
76
|
AUDIT_WORKFLOW_HASH,
|
|
80
77
|
default_default as default,
|
|
81
|
-
noLegacyAuditCiDirectory
|
|
82
|
-
skipLegacyAuditCiCheck
|
|
78
|
+
noLegacyAuditCiDirectory
|
|
83
79
|
};
|
package/.readyup/manifest.json
CHANGED
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
],
|
|
8
8
|
"name": "default",
|
|
9
9
|
"path": "kits/default.js",
|
|
10
|
-
"readyupVersion": "0.
|
|
10
|
+
"readyupVersion": "0.26.0",
|
|
11
11
|
"source": "kits/default.ts",
|
|
12
|
-
"sourceHash": "
|
|
13
|
-
"targetHash": "
|
|
12
|
+
"sourceHash": "52754bbb",
|
|
13
|
+
"targetHash": "53522eed"
|
|
14
14
|
}
|
|
15
15
|
]
|
|
16
16
|
}
|
package/bin/v11y.js
CHANGED
|
@@ -3,7 +3,7 @@ try {
|
|
|
3
3
|
await import('../dist/esm/bin/v11y.js');
|
|
4
4
|
} catch (error) {
|
|
5
5
|
if (error.code === 'ERR_MODULE_NOT_FOUND') {
|
|
6
|
-
process.stderr.write('v11y: build output not found — run `
|
|
6
|
+
process.stderr.write('v11y: build output not found — run `nmr build` first\n');
|
|
7
7
|
} else {
|
|
8
8
|
process.stderr.write(`v11y: failed to load: ${error.message}\n`);
|
|
9
9
|
}
|
package/dist/esm/format-check.js
CHANGED
|
@@ -127,6 +127,6 @@ export function formatCheckJson(result, scopes) {
|
|
|
127
127
|
for (const scope of scopes) {
|
|
128
128
|
output[scope] = result[scope];
|
|
129
129
|
}
|
|
130
|
-
output
|
|
130
|
+
output['summary'] = deriveSummary(result, scopes);
|
|
131
131
|
return JSON.stringify(output, null, 2) + '\n';
|
|
132
132
|
}
|
package/dist/esm/sync.js
CHANGED
|
@@ -16,12 +16,10 @@ function serializeEntry(entry) {
|
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
function serializeScopeConfig(scopeConfig) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
result.allowlist = scopeConfig.allowlist.map(serializeEntry);
|
|
24
|
-
return result;
|
|
19
|
+
return {
|
|
20
|
+
...(scopeConfig.severityThreshold !== undefined && { severityThreshold: scopeConfig.severityThreshold }),
|
|
21
|
+
allowlist: scopeConfig.allowlist.map(serializeEntry),
|
|
22
|
+
};
|
|
25
23
|
}
|
|
26
24
|
export function computeSyncDiff(currentAllowlist, auditResults, date) {
|
|
27
25
|
const now = date ?? new Date();
|
|
@@ -64,12 +62,11 @@ export function buildUpdatedConfig(config, scope, newAllowlist) {
|
|
|
64
62
|
};
|
|
65
63
|
}
|
|
66
64
|
export function serializeConfig(config) {
|
|
67
|
-
const serializable = {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
serializable.prod = serializeScopeConfig(config.prod);
|
|
65
|
+
const serializable = {
|
|
66
|
+
...(config.$schema !== undefined && { $schema: config.$schema }),
|
|
67
|
+
dev: serializeScopeConfig(config.dev),
|
|
68
|
+
prod: serializeScopeConfig(config.prod),
|
|
69
|
+
};
|
|
73
70
|
return JSON.stringify(serializable, null, 2) + '\n';
|
|
74
71
|
}
|
|
75
72
|
export async function syncAllowlist(config, scope, auditResults, configFilePath, date) {
|
|
@@ -80,7 +77,7 @@ export async function syncAllowlist(config, scope, auditResults, configFilePath,
|
|
|
80
77
|
}
|
|
81
78
|
catch (error) {
|
|
82
79
|
const message = error instanceof Error ? error.message : String(error);
|
|
83
|
-
throw new Error(`Failed to write config file '${configFilePath}': ${message}
|
|
80
|
+
throw new Error(`Failed to write config file '${configFilePath}': ${message}`, { cause: error });
|
|
84
81
|
}
|
|
85
82
|
return {
|
|
86
83
|
syncResult: { added, kept, removed, scope },
|
package/dist/esm/types.js
CHANGED
|
@@ -30,8 +30,8 @@ export function isSeverityAtOrAbove(severity, threshold) {
|
|
|
30
30
|
return true;
|
|
31
31
|
const levels = SEVERITY_THRESHOLDS;
|
|
32
32
|
const severityIndex = levels.indexOf(severity);
|
|
33
|
-
const thresholdIndex = SEVERITY_THRESHOLDS.indexOf(threshold);
|
|
34
33
|
if (severityIndex === -1)
|
|
35
34
|
return true;
|
|
35
|
+
const thresholdIndex = SEVERITY_THRESHOLDS.indexOf(threshold);
|
|
36
36
|
return severityIndex >= thresholdIndex;
|
|
37
37
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "v11y-check",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.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": [
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"audit-ci": "7.1.0",
|
|
44
44
|
"zod": "4.4.3",
|
|
45
|
-
"@williamthorsen/nmr-core": "0.9.
|
|
45
|
+
"@williamthorsen/nmr-core": "0.9.3"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"readyup": "0.
|
|
48
|
+
"readyup": "0.26.0"
|
|
49
49
|
},
|
|
50
50
|
"engines": {
|
|
51
51
|
"node": ">=24"
|