@zgeoff/chex 0.1.10 → 0.2.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.
Files changed (3) hide show
  1. package/README.md +2 -3
  2. package/lefthook.yml +15 -13
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -94,7 +94,6 @@ extends:
94
94
  - node_modules/@zgeoff/chex/lefthook.yml
95
95
  ```
96
96
 
97
- The baseline's jobs call `chex <check>` for the repo checks, `bun run check:docs` for the docs
98
- checks the repo names, `rig related` for the tests beside the changed files, and the repo's own
99
- `format:check` and `typecheck` scripts.
97
+ The baseline's jobs call `chex <check>`, `bun run check:docs`, `rig related` and the repo's own
98
+ `format:check` and `typecheck` scripts. Each job's name starts with `chex-`.
100
99
  [The pre-push baseline](../../docs/architecture/pre-push-baseline.md) describes each job.
package/lefthook.yml CHANGED
@@ -8,6 +8,8 @@
8
8
  # also runs typecheck before a commit that changes code or config, after the
9
9
  # repo's own pre-commit fixers. A repo adds its own jobs under
10
10
  # pre-commit.jobs and pre-push.jobs in lefthook.yml; they run before these.
11
+ # lefthook 2.2.2 lets a job of an extended file replace the job of the same
12
+ # name in lefthook.yml, so each job name here starts with chex-.
11
13
  # Each job runs under diet's memory cap, so a run that outgrows the host fails
12
14
  # alone, with its peak memory in the output. bun x --no-install runs the
13
15
  # repo's own install of chex, diet and rig, and fails when one is missing
@@ -28,7 +30,7 @@ pre-commit:
28
30
  piped: true
29
31
  jobs:
30
32
  # lefthook skips the job when no staged file matches the glob.
31
- - name: typecheck
33
+ - name: chex-typecheck
32
34
  glob: '*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,json,jsonc}'
33
35
  run: '{clear-git-env} bun x --no-install diet -- bun run typecheck'
34
36
 
@@ -39,13 +41,13 @@ pre-push:
39
41
  # The jobs after this one read the files on disk, so this one fails the
40
42
  # push when a file the branch changes or deletes holds a change that is
41
43
  # not committed, and names each such file.
42
- - name: uncommitted
44
+ - name: chex-uncommitted
43
45
  run: '{clear-git-env} bun x --no-install diet -- bun x --no-install chex uncommitted'
44
- - name: format:check
46
+ - name: chex-format:check
45
47
  run: '{clear-git-env} bun x --no-install diet -- bun run format:check'
46
48
  # Plain oxlint, without the unused-directive check: a directive for a
47
49
  # type-aware rule reads as unused in plain mode.
48
- - name: lint
50
+ - name: chex-lint
49
51
  files:
50
52
  unset $(git rev-parse --local-env-vars); bun
51
53
  node_modules/@zgeoff/chex/src/read-branch-files.ts
@@ -57,7 +59,7 @@ pre-push:
57
59
  # glob, so a file the branch leaves unchanged never fails a push. A check
58
60
  # whose program the machine lacks prints a notice and passes: CI installs
59
61
  # the program and runs the check on every pull request.
60
- - name: shell
62
+ - name: chex-shell
61
63
  files:
62
64
  unset $(git rev-parse --local-env-vars); bun
63
65
  node_modules/@zgeoff/chex/src/read-branch-files.ts
@@ -77,7 +79,7 @@ pre-push:
77
79
  # The docs checks pick the docs they read themselves, so the glob only
78
80
  # decides whether the job runs. The repo's check:docs script names the
79
81
  # checks it takes, such as chex prose length links.
80
- - name: docs
82
+ - name: chex-docs
81
83
  files:
82
84
  unset $(git rev-parse --local-env-vars); bun
83
85
  node_modules/@zgeoff/chex/src/read-branch-files.ts
@@ -89,7 +91,7 @@ pre-push:
89
91
  # rhysd/actionlint#654 ships; the ignore lapses on the same date as in CI.
90
92
  # The workflow lint runs after actionlint, even when actionlint is missing
91
93
  # or fails.
92
- - name: workflows
94
+ - name: chex-workflows
93
95
  files:
94
96
  unset $(git rev-parse --local-env-vars); bun
95
97
  node_modules/@zgeoff/chex/src/read-branch-files.ts
@@ -116,28 +118,28 @@ pre-push:
116
118
  # each job lists package.json for {files}, inside a shell comment the
117
119
  # check never sees: every repo that takes the baseline has the file, as
118
120
  # it installs chex, and lefthook drops a listed path that does not exist.
119
- - name: commits
121
+ - name: chex-commits
120
122
  files: echo package.json
121
123
  use_stdin: true
122
124
  run:
123
125
  '{clear-git-env} bun x --no-install diet -- bun x --no-install chex commits --pushed-refs #
124
126
  {files}'
125
127
  # package.json keeps this job from the same lefthook skip.
126
- - name: local-paths
128
+ - name: chex-local-paths
127
129
  files: echo package.json
128
130
  use_stdin: true
129
131
  run:
130
132
  '{clear-git-env} bun x --no-install diet -- bun x --no-install chex local-paths
131
133
  --pushed-refs # {files}'
132
- - name: test-timeouts
134
+ - name: chex-test-timeouts
133
135
  run: '{clear-git-env} bun x --no-install diet -- bun x --no-install chex test-timeouts'
134
- - name: dependency-gates
136
+ - name: chex-dependency-gates
135
137
  run: '{clear-git-env} bun x --no-install diet -- bun x --no-install chex dependency-gates'
136
- - name: typecheck
138
+ - name: chex-typecheck
137
139
  run: '{clear-git-env} bun x --no-install diet -- bun run typecheck'
138
140
  # A bunfig.toml reaches the job too, because a change to it skips the
139
141
  # related tests.
140
- - name: test
142
+ - name: chex-test
141
143
  files:
142
144
  unset $(git rev-parse --local-env-vars); bun
143
145
  node_modules/@zgeoff/chex/src/read-branch-files.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgeoff/chex",
3
- "version": "0.1.10",
3
+ "version": "0.2.0",
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",
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/bun": "1.4.4",
44
- "@zgeoff/rig": "0.1.6",
44
+ "@zgeoff/rig": "0.2.0",
45
45
  "@zgeoff/std": "0.4.2",
46
46
  "@zgeoff/testing": "0.2.1",
47
47
  "tiny-invariant": "1.3.3",