@nodeve/checks 0.1.0 → 0.1.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/lefthook.checks.yml +39 -26
- package/package.json +1 -1
package/lefthook.checks.yml
CHANGED
|
@@ -1,44 +1,57 @@
|
|
|
1
|
-
# Shared nodeve commit-gate checks, consumed
|
|
1
|
+
# Shared nodeve commit-gate checks, consumed with a single line from a consumer's
|
|
2
|
+
# lefthook.yml:
|
|
2
3
|
#
|
|
3
4
|
# # lefthook.yml (consumer repo)
|
|
4
5
|
# extends:
|
|
5
6
|
# - node_modules/@nodeve/checks/lefthook.checks.yml
|
|
6
7
|
#
|
|
8
|
+
# The checks live inside a pre-commit job named `checks` (a parallel group). That
|
|
9
|
+
# name is the integration seam: lefthook merges same-named group jobs, so a repo
|
|
10
|
+
# that already has its own `checks` group (e.g. to add a typecheck or test job, or
|
|
11
|
+
# to run after index-mutating fixers) gets the shared bins merged INTO that group
|
|
12
|
+
# rather than appended at the top level. A repo with no `checks` group just gets
|
|
13
|
+
# this one as-is. Either way it's one `extends` line and all the standard checks
|
|
14
|
+
# come along together.
|
|
15
|
+
#
|
|
7
16
|
# Each job shells a published bin via its node_modules/.bin path — portable across
|
|
8
17
|
# pnpm and bun, and resolvable since lefthook runs from the repo root (lefthook
|
|
9
18
|
# does NOT add node_modules/.bin to PATH). Bins read the repo's optional
|
|
10
19
|
# `nodeve.checks.js` for budgets/globs/allowlists and derive the repo root from
|
|
11
20
|
# git, so they behave the same whatever cwd lefthook uses.
|
|
12
21
|
#
|
|
13
|
-
# `{staged_files}` scopes path-aware checks to what's being committed; the dup
|
|
14
|
-
#
|
|
15
|
-
# whole tree, not one file. Bypass with
|
|
16
|
-
# check by hand any time, e.g.
|
|
22
|
+
# `{staged_files}` scopes path-aware checks to what's being committed; the dup and
|
|
23
|
+
# catalog jobs scan their full configured scope because a duplicate (or an
|
|
24
|
+
# un-cataloged pin) is a property of the whole tree, not one file. Bypass with
|
|
25
|
+
# `git commit --no-verify`. Run a single check by hand any time, e.g.
|
|
26
|
+
# `node_modules/.bin/nodeve-check-doc-tokens --report`.
|
|
17
27
|
pre-commit:
|
|
18
|
-
parallel: true
|
|
19
28
|
jobs:
|
|
20
|
-
- name:
|
|
21
|
-
|
|
22
|
-
|
|
29
|
+
- name: checks
|
|
30
|
+
group:
|
|
31
|
+
parallel: true
|
|
32
|
+
jobs:
|
|
33
|
+
- name: doc-tokens
|
|
34
|
+
glob: "*.md"
|
|
35
|
+
run: node_modules/.bin/nodeve-check-doc-tokens {staged_files}
|
|
23
36
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
37
|
+
- name: reshape
|
|
38
|
+
glob: "*.ts"
|
|
39
|
+
run: node_modules/.bin/nodeve-check-reshape {staged_files}
|
|
27
40
|
|
|
28
|
-
|
|
29
|
-
|
|
41
|
+
- name: page-size
|
|
42
|
+
run: node_modules/.bin/nodeve-check-page-size {staged_files}
|
|
30
43
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
44
|
+
# Whole-tree property — every manifest's deps must single-source from a
|
|
45
|
+
# catalog. No-ops on repos without one, so it's safe to always run.
|
|
46
|
+
- name: catalog
|
|
47
|
+
glob: "**/package.json"
|
|
48
|
+
run: node_modules/.bin/nodeve-check-catalog
|
|
36
49
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
50
|
+
# Whole-tree relationships — scan the full configured scope, not just staged.
|
|
51
|
+
- name: inline-dupes
|
|
52
|
+
glob: "*.ts"
|
|
53
|
+
run: node_modules/.bin/nodeve-check-inline-dupes
|
|
41
54
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
55
|
+
- name: helper-collisions
|
|
56
|
+
glob: "*.ts"
|
|
57
|
+
run: node_modules/.bin/nodeve-check-helper-collisions {staged_files}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nodeve/checks",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Org-wide commit-gate checks (doc budgets, reshape/dup/helper smells, page size) and helper-index generators, driven by a per-repo config file and wired through lefthook.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|