@zgeoff/chex 0.4.4 → 0.4.6
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/lefthook.yml
CHANGED
|
@@ -45,16 +45,22 @@ pre-push:
|
|
|
45
45
|
run: '{clear-git-env} bun x --no-install diet -- bun x --no-install chex uncommitted'
|
|
46
46
|
- name: chex-format:check
|
|
47
47
|
run: '{clear-git-env} bun x --no-install diet -- bun run format:check'
|
|
48
|
-
#
|
|
49
|
-
#
|
|
48
|
+
# Type-aware oxlint on the files the branch changes only. Two threads keep
|
|
49
|
+
# its peak near 730 MB, which fits beside an agent in a 1.4 GB imp; the
|
|
50
|
+
# whole repo peaks near 1.2 GB, so CI runs lint:full on the whole tree.
|
|
50
51
|
- name: chex-lint
|
|
51
52
|
files:
|
|
52
53
|
unset $(git rev-parse --local-env-vars); bun
|
|
53
54
|
node_modules/@zgeoff/chex/src/branch/read-branch-files.ts
|
|
54
55
|
glob: '*.{js,mjs,cjs,jsx,ts,mts,cts,tsx}'
|
|
55
56
|
run:
|
|
56
|
-
'{clear-git-env} bun x --no-install diet -- bun x --no-install oxlint
|
|
57
|
-
--no-error-on-unmatched-pattern {files}'
|
|
57
|
+
'{clear-git-env} bun x --no-install diet -- bun x --no-install oxlint --type-aware
|
|
58
|
+
--type-check --threads=2 --no-error-on-unmatched-pattern {files}'
|
|
59
|
+
# A repo without the script passes: bun run --if-present exits 0.
|
|
60
|
+
- name: chex-deadcode
|
|
61
|
+
run: '{clear-git-env} bun x --no-install diet -- bun run --if-present deadcode'
|
|
62
|
+
- name: chex-verify-lint
|
|
63
|
+
run: '{clear-git-env} bun x --no-install diet -- bun run --if-present verify lint'
|
|
58
64
|
# Each file check reads only the files the branch changes that match its
|
|
59
65
|
# glob, so a file the branch leaves unchanged never fails a push. A check
|
|
60
66
|
# whose program the machine lacks prints a notice and passes: CI installs
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgeoff/chex",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6",
|
|
4
4
|
"description": "Run each shared docs and repo check as one subcommand, with the lefthook pre-push baseline that calls them",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"checks",
|
|
@@ -83,9 +83,9 @@
|
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@types/bun": "1.4.4",
|
|
86
|
-
"@zgeoff/rig": "0.3.
|
|
86
|
+
"@zgeoff/rig": "0.3.2",
|
|
87
87
|
"@zgeoff/std": "0.4.5",
|
|
88
|
-
"@zgeoff/testing": "0.4.
|
|
88
|
+
"@zgeoff/testing": "0.4.2",
|
|
89
89
|
"@zgeoff/tools-scripts": "0.0.0",
|
|
90
90
|
"msw": "3.0.4",
|
|
91
91
|
"tiny-invariant": "1.3.3",
|
|
@@ -269,7 +269,9 @@ function collectShaErrors(name: string, sha: string, facts: BranchFacts): string
|
|
|
269
269
|
];
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
-
|
|
272
|
+
// A cold read runs on a budget and never comes back empty, so a later doc commit leaves its sha
|
|
273
|
+
// standing; deslop runs on every doc commit, so its sha must be current.
|
|
274
|
+
if (state === 'old' && name === 'Deslop' && facts.newestDocChange !== undefined) {
|
|
273
275
|
return [
|
|
274
276
|
`Checks: ${name} (${sha}) is older than commit ${facts.newestDocChange.commit.slice(0, 7)}, which changes ${facts.newestDocChange.files.join(', ')}; re-run that check and update the sha.`,
|
|
275
277
|
];
|