@nielspeter/eess 0.2.2 → 0.5.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.
- package/README.md +97 -4
- package/dist/assertion-advice.d.ts +26 -0
- package/dist/assertion-advice.d.ts.map +1 -0
- package/dist/assertion-advice.js +29 -0
- package/dist/assertion-advice.js.map +1 -0
- package/dist/baseline-generator.d.ts +9 -0
- package/dist/baseline-generator.d.ts.map +1 -1
- package/dist/baseline-generator.js +9 -0
- package/dist/baseline-generator.js.map +1 -1
- package/dist/baseline.d.ts +69 -4
- package/dist/baseline.d.ts.map +1 -1
- package/dist/baseline.js +119 -13
- package/dist/baseline.js.map +1 -1
- package/dist/cache-registry.d.ts +14 -0
- package/dist/cache-registry.d.ts.map +1 -0
- package/dist/cache-registry.js +37 -0
- package/dist/cache-registry.js.map +1 -0
- package/dist/cardinality.d.ts +35 -0
- package/dist/cardinality.d.ts.map +1 -0
- package/dist/cardinality.js +80 -0
- package/dist/cardinality.js.map +1 -0
- package/dist/check-options.d.ts +14 -0
- package/dist/check-options.d.ts.map +1 -1
- package/dist/cli-config.d.ts +59 -0
- package/dist/cli-config.d.ts.map +1 -0
- package/dist/cli-config.js +84 -0
- package/dist/cli-config.js.map +1 -0
- package/dist/collect-result.d.ts +94 -0
- package/dist/collect-result.d.ts.map +1 -0
- package/dist/collect-result.js +142 -0
- package/dist/collect-result.js.map +1 -0
- package/dist/combinators.d.ts +14 -0
- package/dist/combinators.d.ts.map +1 -1
- package/dist/combinators.js +53 -16
- package/dist/combinators.js.map +1 -1
- package/dist/comment-suppression.d.ts +60 -0
- package/dist/comment-suppression.d.ts.map +1 -0
- package/dist/comment-suppression.js +89 -0
- package/dist/comment-suppression.js.map +1 -0
- package/dist/condition.d.ts +43 -0
- package/dist/condition.d.ts.map +1 -1
- package/dist/condition.js +48 -1
- package/dist/condition.js.map +1 -1
- package/dist/correspondence-core.d.ts +35 -0
- package/dist/correspondence-core.d.ts.map +1 -0
- package/dist/correspondence-core.js +38 -0
- package/dist/correspondence-core.js.map +1 -0
- package/dist/correspondence.d.ts +57 -5
- package/dist/correspondence.d.ts.map +1 -1
- package/dist/correspondence.js +74 -5
- package/dist/correspondence.js.map +1 -1
- package/dist/dedupe-config-findings.d.ts +56 -0
- package/dist/dedupe-config-findings.d.ts.map +1 -0
- package/dist/dedupe-config-findings.js +101 -0
- package/dist/dedupe-config-findings.js.map +1 -0
- package/dist/define.d.ts +44 -2
- package/dist/define.d.ts.map +1 -1
- package/dist/define.js +45 -4
- package/dist/define.js.map +1 -1
- package/dist/diff-aware.d.ts +8 -1
- package/dist/diff-aware.d.ts.map +1 -1
- package/dist/diff-aware.js +39 -9
- package/dist/diff-aware.js.map +1 -1
- package/dist/diff-disclosure.d.ts +72 -0
- package/dist/diff-disclosure.d.ts.map +1 -0
- package/dist/diff-disclosure.js +110 -0
- package/dist/diff-disclosure.js.map +1 -0
- package/dist/disk-set.d.ts +27 -0
- package/dist/disk-set.d.ts.map +1 -0
- package/dist/disk-set.js +12 -0
- package/dist/disk-set.js.map +1 -0
- package/dist/edge-coverage.d.ts +96 -0
- package/dist/edge-coverage.d.ts.map +1 -0
- package/dist/edge-coverage.js +108 -0
- package/dist/edge-coverage.js.map +1 -0
- package/dist/emitter-findings.d.ts +167 -0
- package/dist/emitter-findings.d.ts.map +1 -0
- package/dist/emitter-findings.js +237 -0
- package/dist/emitter-findings.js.map +1 -0
- package/dist/errors.d.ts +73 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +93 -0
- package/dist/errors.js.map +1 -1
- package/dist/exclusion-comments.d.ts +36 -1
- package/dist/exclusion-comments.d.ts.map +1 -1
- package/dist/exclusion-comments.js +185 -37
- package/dist/exclusion-comments.js.map +1 -1
- package/dist/execute-rule.d.ts +11 -1
- package/dist/execute-rule.d.ts.map +1 -1
- package/dist/execute-rule.js +220 -11
- package/dist/execute-rule.js.map +1 -1
- package/dist/file-walk.d.ts +22 -0
- package/dist/file-walk.d.ts.map +1 -0
- package/dist/file-walk.js +51 -0
- package/dist/file-walk.js.map +1 -0
- package/dist/format-github.d.ts.map +1 -1
- package/dist/format-github.js +37 -5
- package/dist/format-github.js.map +1 -1
- package/dist/format-json.d.ts +96 -1
- package/dist/format-json.d.ts.map +1 -1
- package/dist/format-json.js +94 -9
- package/dist/format-json.js.map +1 -1
- package/dist/format.d.ts +4 -2
- package/dist/format.d.ts.map +1 -1
- package/dist/format.js +41 -19
- package/dist/format.js.map +1 -1
- package/dist/glob-site.d.ts +232 -0
- package/dist/glob-site.d.ts.map +1 -0
- package/dist/glob-site.js +156 -0
- package/dist/glob-site.js.map +1 -0
- package/dist/identity-root.d.ts +55 -0
- package/dist/identity-root.d.ts.map +1 -0
- package/dist/identity-root.js +170 -0
- package/dist/identity-root.js.map +1 -0
- package/dist/index.d.ts +18 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -10
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +55 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +92 -0
- package/dist/internal.js.map +1 -0
- package/dist/mask-non-comment.d.ts +49 -0
- package/dist/mask-non-comment.d.ts.map +1 -0
- package/dist/mask-non-comment.js +261 -0
- package/dist/mask-non-comment.js.map +1 -0
- package/dist/owns-empty-discovery.d.ts +5 -0
- package/dist/owns-empty-discovery.d.ts.map +1 -0
- package/dist/owns-empty-discovery.js +85 -0
- package/dist/owns-empty-discovery.js.map +1 -0
- package/dist/path-suffix.d.ts +57 -0
- package/dist/path-suffix.d.ts.map +1 -0
- package/dist/path-suffix.js +73 -0
- package/dist/path-suffix.js.map +1 -0
- package/dist/path-universe.d.ts +44 -0
- package/dist/path-universe.d.ts.map +1 -0
- package/dist/path-universe.js +21 -0
- package/dist/path-universe.js.map +1 -0
- package/dist/predicate.d.ts +45 -0
- package/dist/predicate.d.ts.map +1 -1
- package/dist/predicate.js +20 -1
- package/dist/predicate.js.map +1 -1
- package/dist/preset-dispatch.d.ts +6 -15
- package/dist/preset-dispatch.d.ts.map +1 -1
- package/dist/preset-dispatch.js +35 -17
- package/dist/preset-dispatch.js.map +1 -1
- package/dist/project-relative.d.ts +25 -0
- package/dist/project-relative.d.ts.map +1 -0
- package/dist/project-relative.js +54 -0
- package/dist/project-relative.js.map +1 -0
- package/dist/report.d.ts +42 -12
- package/dist/report.d.ts.map +1 -1
- package/dist/report.js +190 -14
- package/dist/report.js.map +1 -1
- package/dist/rule-builder-like.d.ts +17 -0
- package/dist/rule-builder-like.d.ts.map +1 -0
- package/dist/rule-builder-like.js +2 -0
- package/dist/rule-builder-like.js.map +1 -0
- package/dist/rule-builder.d.ts +124 -84
- package/dist/rule-builder.d.ts.map +1 -1
- package/dist/rule-builder.js +230 -181
- package/dist/rule-builder.js.map +1 -1
- package/dist/rule-description.d.ts +83 -1
- package/dist/rule-description.d.ts.map +1 -1
- package/dist/rule-description.js +75 -1
- package/dist/rule-description.js.map +1 -1
- package/dist/rule-metadata.d.ts +20 -3
- package/dist/rule-metadata.d.ts.map +1 -1
- package/dist/selection-memo.d.ts +45 -0
- package/dist/selection-memo.d.ts.map +1 -0
- package/dist/selection-memo.js +66 -0
- package/dist/selection-memo.js.map +1 -0
- package/dist/shallow-clone.d.ts +20 -0
- package/dist/shallow-clone.d.ts.map +1 -0
- package/dist/shallow-clone.js +27 -0
- package/dist/shallow-clone.js.map +1 -0
- package/dist/silent-exclusion.d.ts +12 -0
- package/dist/silent-exclusion.d.ts.map +1 -1
- package/dist/silent-exclusion.js +22 -0
- package/dist/silent-exclusion.js.map +1 -1
- package/dist/stderr.d.ts +16 -0
- package/dist/stderr.d.ts.map +1 -0
- package/dist/stderr.js +73 -0
- package/dist/stderr.js.map +1 -0
- package/dist/terminal-builder.d.ts +224 -10
- package/dist/terminal-builder.d.ts.map +1 -1
- package/dist/terminal-builder.js +336 -46
- package/dist/terminal-builder.js.map +1 -1
- package/dist/type-guards.d.ts +38 -0
- package/dist/type-guards.d.ts.map +1 -0
- package/dist/type-guards.js +42 -0
- package/dist/type-guards.js.map +1 -0
- package/dist/unsuppressable.d.ts +54 -0
- package/dist/unsuppressable.d.ts.map +1 -0
- package/dist/unsuppressable.js +76 -0
- package/dist/unsuppressable.js.map +1 -0
- package/dist/vacuity-findings.d.ts +49 -0
- package/dist/vacuity-findings.d.ts.map +1 -0
- package/dist/vacuity-findings.js +94 -0
- package/dist/vacuity-findings.js.map +1 -0
- package/dist/violation.d.ts +173 -4
- package/dist/violation.d.ts.map +1 -1
- package/dist/violation.js +262 -1
- package/dist/violation.js.map +1 -1
- package/dist/watch.d.ts +71 -0
- package/dist/watch.d.ts.map +1 -0
- package/dist/watch.js +129 -0
- package/dist/watch.js.map +1 -0
- package/package.json +6 -1
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The declaration side of plan 0069: what a glob is, and how a set of globs
|
|
3
|
+
* combines, so that "this rule can never match anything" is answerable without
|
|
4
|
+
* running the rule.
|
|
5
|
+
*
|
|
6
|
+
* Nothing here evaluates. Evaluation lives in `glob-diagnosis.ts`, against the
|
|
7
|
+
* path universe; this module only describes.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Is a dead glob at this position a **fault**?
|
|
11
|
+
*
|
|
12
|
+
* One owner for a decision that was written twice, inversely, and disagreed —
|
|
13
|
+
* [ts-archunit plan 0080](https://github.com/nielspeter/ts-archunit/blob/main/plans/completed/0080-admit-discovery-globs-to-the-dead-glob-gate.md).
|
|
14
|
+
*
|
|
15
|
+
* | site | said | i.e. |
|
|
16
|
+
* | --- | --- | --- |
|
|
17
|
+
* | `diagnose.ts` | skip `exclusion` and `condition` | selector **and discovery** are faults |
|
|
18
|
+
* | `terminal-builder.ts` | skip anything but `selector` | only selector is |
|
|
19
|
+
*
|
|
20
|
+
* So `doctor` reported a dead `discovery` glob and the check that gates the build
|
|
21
|
+
* did not — the divergence bug 0040's silence half is made of. Two hand-maintained
|
|
22
|
+
* inverse lists that must agree is the shape ADR-009 rule 5 keeps charging this
|
|
23
|
+
* project for; a shared predicate is the whole fix.
|
|
24
|
+
*
|
|
25
|
+
* **`selector` and `discovery` are faults.** Both name what a rule will judge, so
|
|
26
|
+
* a dead one means the rule judges nothing.
|
|
27
|
+
*
|
|
28
|
+
* **`condition` and `exclusion` are not.** A condition glob is an assertion
|
|
29
|
+
* *about* the subjects — `onlyImportFrom('**\/domain/**')` matching nothing is a
|
|
30
|
+
* satisfied rule, not a broken one (bug 0014) — and an exclusion glob matching
|
|
31
|
+
* nothing is an unused exemption, which `.excluding()` reports on its own terms.
|
|
32
|
+
*
|
|
33
|
+
* ## A `switch`, not an `||`, and that is the point
|
|
34
|
+
*
|
|
35
|
+
* It shipped as `position === 'selector' || position === 'discovery'` — an
|
|
36
|
+
* allow-list with no exhaustiveness check. Review measured the consequence: a
|
|
37
|
+
* **fifth** `GlobPosition` added to the union above compiles clean and leaves the
|
|
38
|
+
* whole suite green, silently a non-fault in all three consumers. A dead glob
|
|
39
|
+
* written at it would be invisible in `doctor` *and* in the build — which is the
|
|
40
|
+
* original divergence's failure direction, one level up, in the predicate that
|
|
41
|
+
* exists to remove it.
|
|
42
|
+
*
|
|
43
|
+
* The predicate's own test enumerates the four known values, which is a
|
|
44
|
+
* restatement of the implementation and structurally cannot cover a fifth. The
|
|
45
|
+
* `never` assignment below can, and it fails at compile time rather than at
|
|
46
|
+
* review time.
|
|
47
|
+
*/
|
|
48
|
+
export function isFaultPosition(position) {
|
|
49
|
+
switch (position) {
|
|
50
|
+
case 'selector':
|
|
51
|
+
case 'discovery':
|
|
52
|
+
return true;
|
|
53
|
+
case 'condition':
|
|
54
|
+
case 'exclusion':
|
|
55
|
+
return false;
|
|
56
|
+
default: {
|
|
57
|
+
// A new position must say which it is. Deciding by default is how the two
|
|
58
|
+
// inverse lists came to disagree in the first place.
|
|
59
|
+
const exhaustive = position;
|
|
60
|
+
return exhaustive;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/** How many real declarations a tree holds. Opaque leaves do not count. */
|
|
65
|
+
export function countDeclaredGlobs(tree) {
|
|
66
|
+
let total = 0;
|
|
67
|
+
for (const child of tree.children) {
|
|
68
|
+
if (isGlobNode(child))
|
|
69
|
+
total += countDeclaredGlobs(child);
|
|
70
|
+
else if (!isOpaqueGlob(child))
|
|
71
|
+
total++;
|
|
72
|
+
}
|
|
73
|
+
return total;
|
|
74
|
+
}
|
|
75
|
+
/** Narrow a tree position to an interior node. */
|
|
76
|
+
export function isGlobNode(value) {
|
|
77
|
+
return 'op' in value;
|
|
78
|
+
}
|
|
79
|
+
/** Narrow a leaf to the opaque case. */
|
|
80
|
+
export function isOpaqueGlob(value) {
|
|
81
|
+
return 'opaque' in value;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* A variadic declaration: any one of these globs matching is enough.
|
|
85
|
+
*
|
|
86
|
+
* `importFrom(...globs)` is `matchers.some`, so the set is dead only when
|
|
87
|
+
* every glob in it is — which is exactly `any`. Getting this wrong in the
|
|
88
|
+
* other direction is what the 0.18.1 withdrawal was.
|
|
89
|
+
*/
|
|
90
|
+
export function globAnyOf(globs, kind, base) {
|
|
91
|
+
return { op: 'any', children: globs.map((glob) => ({ glob, kind, base })) };
|
|
92
|
+
}
|
|
93
|
+
/** A single declaration as a one-element `any` tree. */
|
|
94
|
+
export function globNode(leaf) {
|
|
95
|
+
return { op: 'any', children: [leaf] };
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Stamp a declared tree with what only the builder knows.
|
|
99
|
+
*
|
|
100
|
+
* `origin` is a function of the declaration so each site can name itself —
|
|
101
|
+
* `resideInFolder("**\/src/x/**")` — rather than every site in one predicate
|
|
102
|
+
* sharing a single label.
|
|
103
|
+
*/
|
|
104
|
+
export function stampGlobs(declared, position, origin) {
|
|
105
|
+
return {
|
|
106
|
+
op: declared.op,
|
|
107
|
+
children: declared.children.map((child) => {
|
|
108
|
+
if (isGlobNode(child))
|
|
109
|
+
return stampGlobs(child, position, origin);
|
|
110
|
+
if (isOpaqueGlob(child))
|
|
111
|
+
return child;
|
|
112
|
+
return { ...child, position, origin: origin(child) };
|
|
113
|
+
}),
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Negate a glob tree: invert `op` at every node **and** flip `polarity` at
|
|
118
|
+
* every site.
|
|
119
|
+
*
|
|
120
|
+
* A polarity flip alone is not enough, and the shortfall is not exotic — it is
|
|
121
|
+
* reachable through public exports, since `and()` returns a `Predicate<T>` and
|
|
122
|
+
* `not()` takes one. `not(and(live, not(dead)))` selects a non-empty set and
|
|
123
|
+
* would be reported dead; `not(or(live, not(dead)))` selects nothing and would
|
|
124
|
+
* be missed. Inverting `op` as well is the standard negation-normal-form
|
|
125
|
+
* push-down and fixes both directions, leaving every simpler case unchanged:
|
|
126
|
+
* `not(not(dead))` still faults, `not(and(a, b))` still does not.
|
|
127
|
+
*/
|
|
128
|
+
export function negateGlobs(tree) {
|
|
129
|
+
return {
|
|
130
|
+
op: tree.op === 'all' ? 'any' : 'all',
|
|
131
|
+
children: tree.children.map((child) => isGlobNode(child) ? negateGlobs(child) : negateLeaf(child)),
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
function negateLeaf(leaf) {
|
|
135
|
+
if (isOpaqueGlob(leaf))
|
|
136
|
+
return leaf;
|
|
137
|
+
return {
|
|
138
|
+
...leaf,
|
|
139
|
+
polarity: (leaf.polarity ?? 'positive') === 'positive' ? 'negative' : 'positive',
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Combine inputs into one node, treating a missing declaration as opaque.
|
|
144
|
+
*
|
|
145
|
+
* Every input contributes exactly one child, so the arity of the node always
|
|
146
|
+
* matches the arity of the combinator — which is what keeps `negateGlobs`
|
|
147
|
+
* sound and empty nodes unreachable.
|
|
148
|
+
*/
|
|
149
|
+
export function combineGlobs(op, inputs) {
|
|
150
|
+
return {
|
|
151
|
+
op,
|
|
152
|
+
children: inputs.map((input) => input ?? OPAQUE),
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
const OPAQUE = { opaque: true };
|
|
156
|
+
//# sourceMappingURL=glob-site.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"glob-site.js","sourceRoot":"","sources":["../src/glob-site.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAuCH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,UAAU,eAAe,CAAC,QAAsB;IACpD,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,UAAU,CAAC;QAChB,KAAK,WAAW;YACd,OAAO,IAAI,CAAA;QACb,KAAK,WAAW,CAAC;QACjB,KAAK,WAAW;YACd,OAAO,KAAK,CAAA;QACd,OAAO,CAAC,CAAC,CAAC;YACR,0EAA0E;YAC1E,qDAAqD;YACrD,MAAM,UAAU,GAAU,QAAQ,CAAA;YAClC,OAAO,UAAU,CAAA;QACnB,CAAC;IACH,CAAC;AACH,CAAC;AAiHD,2EAA2E;AAC3E,MAAM,UAAU,kBAAkB,CAAmB,IAAiB;IACpE,IAAI,KAAK,GAAG,CAAC,CAAA;IACb,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;QAClC,IAAI,UAAU,CAAC,KAAK,CAAC;YAAE,KAAK,IAAI,kBAAkB,CAAC,KAAK,CAAC,CAAA;aACpD,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC;YAAE,KAAK,EAAE,CAAA;IACxC,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC;AAED,kDAAkD;AAClD,MAAM,UAAU,UAAU,CACxB,KAAgC;IAEhC,OAAO,IAAI,IAAI,KAAK,CAAA;AACtB,CAAC;AAED,wCAAwC;AACxC,MAAM,UAAU,YAAY,CAC1B,KAAgC;IAEhC,OAAO,QAAQ,IAAI,KAAK,CAAA;AAC1B,CAAC;AAED;;;;;;GA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,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAC3D;KACF,CAAA;AACH,CAAC;AAED,SAAS,UAAU,CAAyB,IAAiB;IAC3D,IAAI,YAAY,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAA;IACnC,OAAO;QACL,GAAG,IAAI;QACP,QAAQ,EAAE,CAAC,IAAI,CAAC,QAAQ,IAAI,UAAU,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU;KACjF,CAAA;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAC1B,EAAiB,EACjB,MAA4C;IAE5C,OAAO;QACL,EAAE;QACF,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,MAAM,CAAC;KACjD,CAAA;AACH,CAAC;AAED,MAAM,MAAM,GAAe,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Find the identity root for a baseline: the repository or workspace root
|
|
3
|
+
* containing `startDir`.
|
|
4
|
+
*
|
|
5
|
+
* Resolution order, all **nearest-first**:
|
|
6
|
+
*
|
|
7
|
+
* 1. `.git` — the definitive repository root. Tested with `existsSync`, not
|
|
8
|
+
* `isDirectory`: in a worktree or submodule it is a *file* holding a gitdir
|
|
9
|
+
* pointer, and a worktree is precisely the "same code, different absolute
|
|
10
|
+
* path" case this module exists to survive.
|
|
11
|
+
* 2. a `package.json` declaring `workspaces` — a monorepo root without git.
|
|
12
|
+
* 3. any `package.json` — a single-package project.
|
|
13
|
+
* 4. `startDir` itself, when nothing is found. That degrades to the previous
|
|
14
|
+
* behaviour for that one path rather than guessing.
|
|
15
|
+
*
|
|
16
|
+
* Nearest, **not** outermost. Outermost is tempting for monorepos, but it is
|
|
17
|
+
* wrong the moment any ancestor is also a repository — a home directory under
|
|
18
|
+
* dotfiles version control is the common case — because the root would then sit
|
|
19
|
+
* above the checkout and the "relative" path would still carry
|
|
20
|
+
* `Documents/Projects/…`, which differs per machine. It reproduces the bug it
|
|
21
|
+
* is meant to fix. The nearest `.git` is the repository root by definition, and
|
|
22
|
+
* in a monorepo that is already the workspace root, so nearest costs nothing.
|
|
23
|
+
*/
|
|
24
|
+
export declare function discoverIdentityRoot(startDir: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* Convert a filesystem path to its portable form: relative to the identity
|
|
27
|
+
* root, with forward slashes.
|
|
28
|
+
*
|
|
29
|
+
* A path outside the root is returned unchanged — relativising it would encode
|
|
30
|
+
* the root's *depth* (`../../..`), which varies by machine and would reproduce
|
|
31
|
+
* the very bug this fixes.
|
|
32
|
+
*/
|
|
33
|
+
export declare function toPortablePath(filePath: string, root: string): string;
|
|
34
|
+
/**
|
|
35
|
+
* Replace every occurrence of the identity root inside free text with a stable
|
|
36
|
+
* token.
|
|
37
|
+
*
|
|
38
|
+
* Rule descriptions, element names and messages are prose: producers
|
|
39
|
+
* interpolate `getFilePath()` into them (`src/smells/duplicate-bodies.ts`,
|
|
40
|
+
* `src/presets/boundaries.ts`, and any user-written `defineCondition`). Since
|
|
41
|
+
* the text is unstructured, this substitutes the known root prefix rather than
|
|
42
|
+
* trying to parse paths out of it — a regex would also rewrite the `/src`
|
|
43
|
+
* inside a doubled-star glob, which is not a path at all, and relativising it
|
|
44
|
+
* would encode the root's depth.
|
|
45
|
+
*
|
|
46
|
+
* Substring replacement is sufficient because the only machine-dependent part
|
|
47
|
+
* of an interpolated path IS the root prefix; everything after it is a property
|
|
48
|
+
* of the repository.
|
|
49
|
+
*
|
|
50
|
+
* Only the *root* is separator-normalized, never the surrounding text: rule
|
|
51
|
+
* descriptions embed regex sources (`/\bparse/`), and rewriting their
|
|
52
|
+
* backslashes would let two distinct rules collide on one identity.
|
|
53
|
+
*/
|
|
54
|
+
export declare function normalizeIdentityText(text: string, root: string): string;
|
|
55
|
+
//# sourceMappingURL=identity-root.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity-root.d.ts","sourceRoot":"","sources":["../src/identity-root.ts"],"names":[],"mappings":"AAsBA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAuB7D;AAmDD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAMrE;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAUxE"}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
/**
|
|
4
|
+
* Where the repository or workspace root is, and how to make a path portable
|
|
5
|
+
* relative to it.
|
|
6
|
+
*
|
|
7
|
+
* Lives in `core/` rather than `helpers/` because two things in `core/` need
|
|
8
|
+
* it — violation identity and the disk set behind `outside-project` — and the
|
|
9
|
+
* `core must not import from helpers` dogfood rule is right: core is the
|
|
10
|
+
* foundation. This module depends on nothing but `node:fs` and `node:path`, so
|
|
11
|
+
* it always belonged here; it was in `helpers/` only because `baseline.ts`
|
|
12
|
+
* happened to need it first. That rule caught the misplacement the same day it
|
|
13
|
+
* was introduced.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Placeholder substituted for the identity root when hashing a violation.
|
|
17
|
+
* Chosen to be something no real path contains.
|
|
18
|
+
*/
|
|
19
|
+
const ROOT_TOKEN = '<root>';
|
|
20
|
+
/**
|
|
21
|
+
* Find the identity root for a baseline: the repository or workspace root
|
|
22
|
+
* containing `startDir`.
|
|
23
|
+
*
|
|
24
|
+
* Resolution order, all **nearest-first**:
|
|
25
|
+
*
|
|
26
|
+
* 1. `.git` — the definitive repository root. Tested with `existsSync`, not
|
|
27
|
+
* `isDirectory`: in a worktree or submodule it is a *file* holding a gitdir
|
|
28
|
+
* pointer, and a worktree is precisely the "same code, different absolute
|
|
29
|
+
* path" case this module exists to survive.
|
|
30
|
+
* 2. a `package.json` declaring `workspaces` — a monorepo root without git.
|
|
31
|
+
* 3. any `package.json` — a single-package project.
|
|
32
|
+
* 4. `startDir` itself, when nothing is found. That degrades to the previous
|
|
33
|
+
* behaviour for that one path rather than guessing.
|
|
34
|
+
*
|
|
35
|
+
* Nearest, **not** outermost. Outermost is tempting for monorepos, but it is
|
|
36
|
+
* wrong the moment any ancestor is also a repository — a home directory under
|
|
37
|
+
* dotfiles version control is the common case — because the root would then sit
|
|
38
|
+
* above the checkout and the "relative" path would still carry
|
|
39
|
+
* `Documents/Projects/…`, which differs per machine. It reproduces the bug it
|
|
40
|
+
* is meant to fix. The nearest `.git` is the repository root by definition, and
|
|
41
|
+
* in a monorepo that is already the workspace root, so nearest costs nothing.
|
|
42
|
+
*/
|
|
43
|
+
export function discoverIdentityRoot(startDir) {
|
|
44
|
+
const resolved = path.resolve(startDir);
|
|
45
|
+
let nearestPackage;
|
|
46
|
+
let current = resolved;
|
|
47
|
+
for (;;) {
|
|
48
|
+
if (fs.existsSync(path.join(current, '.git')))
|
|
49
|
+
return current;
|
|
50
|
+
if (WORKSPACE_MARKERS.some((marker) => fs.existsSync(path.join(current, marker))))
|
|
51
|
+
return current;
|
|
52
|
+
const manifest = path.join(current, 'package.json');
|
|
53
|
+
if (fs.existsSync(manifest)) {
|
|
54
|
+
if (nearestPackage === undefined)
|
|
55
|
+
nearestPackage = current;
|
|
56
|
+
if (declaresWorkspaces(manifest))
|
|
57
|
+
return current;
|
|
58
|
+
}
|
|
59
|
+
const parent = path.dirname(current);
|
|
60
|
+
if (parent === current)
|
|
61
|
+
break;
|
|
62
|
+
current = parent;
|
|
63
|
+
}
|
|
64
|
+
return nearestPackage ?? resolved;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Files that mark a monorepo root for a tool other than npm/yarn/bun.
|
|
68
|
+
*
|
|
69
|
+
* Without these, a pnpm or Nx repo whose `.git` is absent — a Docker build
|
|
70
|
+
* (`.dockerignore` excludes `.git` in essentially every Node guide), a source
|
|
71
|
+
* tarball, `git archive`, a CI provider that ships a source artifact — falls
|
|
72
|
+
* through to the *nearest* `package.json`, i.e. the individual package. The
|
|
73
|
+
* developer machine has `.git` and resolves the workspace root, CI does not
|
|
74
|
+
* and resolves `packages/api`, the two roots disagree, and every hash differs.
|
|
75
|
+
*
|
|
76
|
+
* That is bug 0010's own symptom, reintroduced by the heuristic meant to fix
|
|
77
|
+
* it — and invisible, because both files carry the current hashVersion. Only
|
|
78
|
+
* npm/yarn/bun put workspaces in `package.json`; everyone else uses a file.
|
|
79
|
+
*
|
|
80
|
+
* Deliberately **root-only** files. `turbo.json` and `deno.json` are excluded
|
|
81
|
+
* even though they mark monorepos, because both are legal *inside* a package
|
|
82
|
+
* (Turborepo Package Configurations, per-package Deno config) and would anchor
|
|
83
|
+
* below the workspace root — the exact divergence this list exists to prevent.
|
|
84
|
+
* Turborepo is covered anyway: it runs on top of npm/pnpm/yarn workspaces, so
|
|
85
|
+
* one of the other markers is always present at the real root.
|
|
86
|
+
*/
|
|
87
|
+
const WORKSPACE_MARKERS = [
|
|
88
|
+
'pnpm-workspace.yaml',
|
|
89
|
+
'pnpm-workspace.yml',
|
|
90
|
+
'lerna.json',
|
|
91
|
+
'rush.json',
|
|
92
|
+
'nx.json',
|
|
93
|
+
];
|
|
94
|
+
/**
|
|
95
|
+
* Whether a package.json declares npm/yarn/bun workspaces, marking it as the
|
|
96
|
+
* root of a monorepo. An unreadable or malformed manifest is simply not a
|
|
97
|
+
* workspace root — it must not abort baseline loading.
|
|
98
|
+
*/
|
|
99
|
+
function declaresWorkspaces(manifestPath) {
|
|
100
|
+
try {
|
|
101
|
+
const parsed = JSON.parse(fs.readFileSync(manifestPath, 'utf-8'));
|
|
102
|
+
return parsed !== null && typeof parsed === 'object' && 'workspaces' in parsed;
|
|
103
|
+
}
|
|
104
|
+
catch (error) {
|
|
105
|
+
// A malformed or unreadable package.json is simply not a workspace root —
|
|
106
|
+
// it must not abort identity-root discovery (or baseline loading behind
|
|
107
|
+
// it) over a manifest this function doesn't even need to parse correctly.
|
|
108
|
+
// Deliberately unexamined: every failure mode (bad JSON, permissions, a
|
|
109
|
+
// symlink race) reduces to the same "not a workspace root" answer.
|
|
110
|
+
void error;
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Convert a filesystem path to its portable form: relative to the identity
|
|
116
|
+
* root, with forward slashes.
|
|
117
|
+
*
|
|
118
|
+
* A path outside the root is returned unchanged — relativising it would encode
|
|
119
|
+
* the root's *depth* (`../../..`), which varies by machine and would reproduce
|
|
120
|
+
* the very bug this fixes.
|
|
121
|
+
*/
|
|
122
|
+
export function toPortablePath(filePath, root) {
|
|
123
|
+
const normalizedRoot = normalizeSeparators(root);
|
|
124
|
+
const normalizedPath = normalizeSeparators(filePath);
|
|
125
|
+
const prefix = normalizedRoot.endsWith('/') ? normalizedRoot : normalizedRoot + '/';
|
|
126
|
+
if (!normalizedPath.startsWith(prefix))
|
|
127
|
+
return normalizedPath;
|
|
128
|
+
return normalizedPath.slice(prefix.length);
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Replace every occurrence of the identity root inside free text with a stable
|
|
132
|
+
* token.
|
|
133
|
+
*
|
|
134
|
+
* Rule descriptions, element names and messages are prose: producers
|
|
135
|
+
* interpolate `getFilePath()` into them (`src/smells/duplicate-bodies.ts`,
|
|
136
|
+
* `src/presets/boundaries.ts`, and any user-written `defineCondition`). Since
|
|
137
|
+
* the text is unstructured, this substitutes the known root prefix rather than
|
|
138
|
+
* trying to parse paths out of it — a regex would also rewrite the `/src`
|
|
139
|
+
* inside a doubled-star glob, which is not a path at all, and relativising it
|
|
140
|
+
* would encode the root's depth.
|
|
141
|
+
*
|
|
142
|
+
* Substring replacement is sufficient because the only machine-dependent part
|
|
143
|
+
* of an interpolated path IS the root prefix; everything after it is a property
|
|
144
|
+
* of the repository.
|
|
145
|
+
*
|
|
146
|
+
* Only the *root* is separator-normalized, never the surrounding text: rule
|
|
147
|
+
* descriptions embed regex sources (`/\bparse/`), and rewriting their
|
|
148
|
+
* backslashes would let two distinct rules collide on one identity.
|
|
149
|
+
*/
|
|
150
|
+
export function normalizeIdentityText(text, root) {
|
|
151
|
+
const posixRoot = normalizeSeparators(root);
|
|
152
|
+
if (posixRoot === '')
|
|
153
|
+
return text;
|
|
154
|
+
const win32Root = posixRoot.replaceAll('/', '\\');
|
|
155
|
+
const withToken = text.replaceAll(posixRoot, ROOT_TOKEN).replaceAll(win32Root, ROOT_TOKEN);
|
|
156
|
+
// Collapse `<root>/x` and `<root>x` so a root with and without a trailing
|
|
157
|
+
// separator produce identical identity.
|
|
158
|
+
return withToken
|
|
159
|
+
.replaceAll(ROOT_TOKEN + '/', ROOT_TOKEN)
|
|
160
|
+
.replaceAll(ROOT_TOKEN + '\\', ROOT_TOKEN);
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Normalize Windows separators so a baseline generated on one OS matches on
|
|
164
|
+
* another. ts-morph already returns forward slashes; interpolated `path.*`
|
|
165
|
+
* output and the stored `file` field do not.
|
|
166
|
+
*/
|
|
167
|
+
function normalizeSeparators(value) {
|
|
168
|
+
return value.replaceAll('\\', '/');
|
|
169
|
+
}
|
|
170
|
+
//# sourceMappingURL=identity-root.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity-root.js","sourceRoot":"","sources":["../src/identity-root.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B;;;;;;;;;;;GAWG;AAEH;;;GAGG;AACH,MAAM,UAAU,GAAG,QAAQ,CAAA;AAE3B;;;;;;;;;;;;;;;;;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AAO,SAAS;SACb,UAAU,CAAC,UAAU,GAAG,GAAG,EAAE,UAAU,CAAC;SACxC,UAAU,CAAC,UAAU,GAAG,IAAI,EAAE,UAAU,CAAC,CAAA;AAC9C,CAAC;AAED;;;;GAIG;AACH,SAAS,mBAAmB,CAAC,KAAa;IACxC,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;AACpC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,11 +3,14 @@ export type { Condition, ConditionContext } from './condition.js';
|
|
|
3
3
|
export { not, and, or } from './combinators.js';
|
|
4
4
|
export type { Matcher } from './combinators.js';
|
|
5
5
|
export type { ArchViolation, ArchFix } from './violation.js';
|
|
6
|
-
export { applyFixes } from './apply-fixes.js';
|
|
7
|
-
export type { ApplyResult } from './apply-fixes.js';
|
|
8
6
|
export { RuleBuilder } from './rule-builder.js';
|
|
9
7
|
export { TerminalBuilder } from './terminal-builder.js';
|
|
10
|
-
export {
|
|
8
|
+
export type { CollectResult, Evidence } from './collect-result.js';
|
|
9
|
+
export { collectResult, mergeCollectResults, hasEvidence } from './collect-result.js';
|
|
10
|
+
export { EMITTER_NO_RECEIPT, EMITTER_PASS_WITHOUT_EVIDENCE, EMITTER_EXPIRED_DECLARATION, EMITTER_CONTRADICTORY_EVIDENCE, EMITTER_SOURCE_EMPTY, } from './emitter-findings.js';
|
|
11
|
+
export { assertsCardinality } from './cardinality.js';
|
|
12
|
+
export { ArchRuleError, isArchRuleError, ArchConfigError, isArchConfigError } from './errors.js';
|
|
13
|
+
export type { PathUniverse } from './path-universe.js';
|
|
11
14
|
export type { RuleMetadata } from './rule-metadata.js';
|
|
12
15
|
export type { RuleDescription } from './rule-description.js';
|
|
13
16
|
export { generateCodeFrame } from './code-frame.js';
|
|
@@ -19,24 +22,27 @@ export { formatViolationsGitHub } from './format-github.js';
|
|
|
19
22
|
export type { CheckOptions, OutputFormat, BaselineFilter, DiffFilterLike } from './check-options.js';
|
|
20
23
|
export { detectFormat, isCI } from './environment.js';
|
|
21
24
|
export { definePredicate, defineCondition } from './define.js';
|
|
22
|
-
export { dispatchRule, validateOverrides
|
|
25
|
+
export { dispatchRule, validateOverrides } from './preset-dispatch.js';
|
|
23
26
|
export { reportViolations, finishPreset } from './report.js';
|
|
24
27
|
export type { ReportMode, ReportOptions, PresetReportOptions } from './report.js';
|
|
25
28
|
export type { RuleSeverity, PresetBaseOptions } from './preset-dispatch.js';
|
|
26
|
-
export {
|
|
27
|
-
export type { Pair, MatchResult, MatchOptions } from './matching.js';
|
|
29
|
+
export type { Dispatchable } from './preset-dispatch.js';
|
|
28
30
|
export { correspondence, CorrespondenceBuilder } from './correspondence.js';
|
|
29
|
-
export type { Selection, ElementInfo, Direction
|
|
30
|
-
export {
|
|
31
|
-
export { escapeGitHub } from './format-github.js';
|
|
32
|
-
export { hashViolation } from './baseline.js';
|
|
33
|
-
export { bold, red, dim, yellow, cyan, gray } from './ansi.js';
|
|
31
|
+
export type { Selection, ElementInfo, Direction } from './correspondence.js';
|
|
32
|
+
export type { RelationSpec, CorrespondenceOptions, KeyBy } from './correspondence.js';
|
|
34
33
|
export { parseExclusionComments, isExcludedByComment } from './exclusion-comments.js';
|
|
35
|
-
export type { ExclusionComment, ExclusionWarning, ParseResult } from './exclusion-comments.js';
|
|
34
|
+
export type { ExclusionComment, ExclusionWarning, ParseResult, MaskNonComment, ParseExclusionOptions, } from './exclusion-comments.js';
|
|
36
35
|
export { silent } from './silent-exclusion.js';
|
|
37
36
|
export type { SilentExclusion } from './silent-exclusion.js';
|
|
38
37
|
export { withBaseline, generateBaseline, Baseline } from './baseline.js';
|
|
39
38
|
export type { BaselineEntry, BaselineFile } from './baseline.js';
|
|
40
39
|
export { collectViolations } from './baseline-generator.js';
|
|
41
40
|
export { diffAware, DiffFilter } from './diff-aware.js';
|
|
41
|
+
export type { UntestedReason, EdgeCoverage } from './edge-coverage.js';
|
|
42
|
+
export type { GlobKind, GlobPosition, GlobBase, DeclaredGlob, GlobSite, OpaqueGlob, GlobLeaf, GlobTree, DeclaredGlobs, GlobNode, } from './glob-site.js';
|
|
43
|
+
export type { ArchJsonViolation, ArchJsonSuppression, ArchJsonUntestedAllowlist, ArchJsonReport, } from './format-json.js';
|
|
44
|
+
export type { CorrespondenceResult } from './correspondence-core.js';
|
|
45
|
+
export { setCorrespondence } from './correspondence-core.js';
|
|
46
|
+
export type { RuleBuilderLike } from './rule-builder-like.js';
|
|
47
|
+
export { globAnyOf, globNode } from './glob-site.js';
|
|
42
48
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACjE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAA;AAC/C,YAAY,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAG/C,YAAY,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACjE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAA;AAC/C,YAAY,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAG/C,YAAY,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAG5D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,eAA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cAAc,GACf,MAAM,kBAAkB,CAAA;AACzB,YAAY,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,YAAY,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAO7D,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -5,11 +5,13 @@
|
|
|
5
5
|
// defineCondition extension points. Nothing here depends on ts-morph or any
|
|
6
6
|
// dialect-specific parser.
|
|
7
7
|
export { not, and, or } from './combinators.js';
|
|
8
|
-
export { applyFixes } from './apply-fixes.js';
|
|
9
8
|
// Rule builder, terminal builder, error
|
|
10
9
|
export { RuleBuilder } from './rule-builder.js';
|
|
11
10
|
export { TerminalBuilder } from './terminal-builder.js';
|
|
12
|
-
export {
|
|
11
|
+
export { collectResult, mergeCollectResults, hasEvidence } from './collect-result.js';
|
|
12
|
+
export { EMITTER_NO_RECEIPT, EMITTER_PASS_WITHOUT_EVIDENCE, EMITTER_EXPIRED_DECLARATION, EMITTER_CONTRADICTORY_EVIDENCE, EMITTER_SOURCE_EMPTY, } from './emitter-findings.js';
|
|
13
|
+
export { assertsCardinality } from './cardinality.js';
|
|
14
|
+
export { ArchRuleError, isArchRuleError, ArchConfigError, isArchConfigError } from './errors.js';
|
|
13
15
|
// Code frame & formatting
|
|
14
16
|
export { generateCodeFrame } from './code-frame.js';
|
|
15
17
|
export { formatViolations, formatViolationsPlain } from './format.js';
|
|
@@ -19,17 +21,10 @@ export { detectFormat, isCI } from './environment.js';
|
|
|
19
21
|
// Custom predicate/condition factories
|
|
20
22
|
export { definePredicate, defineCondition } from './define.js';
|
|
21
23
|
// Preset dispatch — generic per-rule severity/override infrastructure for presets
|
|
22
|
-
export { dispatchRule, validateOverrides
|
|
24
|
+
export { dispatchRule, validateOverrides } from './preset-dispatch.js';
|
|
23
25
|
export { reportViolations, finishPreset } from './report.js';
|
|
24
|
-
// Matching engine — shared by correspondence() and eess-ts's crossLayer
|
|
25
|
-
export { matchSelections } from './matching.js';
|
|
26
26
|
// Cross-validation — bind two element Selections and assert they correspond
|
|
27
27
|
export { correspondence, CorrespondenceBuilder } from './correspondence.js';
|
|
28
|
-
// Lower-level building blocks (used by dialects and covered by kernel tests)
|
|
29
|
-
export { applyFilters } from './execute-rule.js';
|
|
30
|
-
export { escapeGitHub } from './format-github.js';
|
|
31
|
-
export { hashViolation } from './baseline.js';
|
|
32
|
-
export { bold, red, dim, yellow, cyan, gray } from './ansi.js';
|
|
33
28
|
// Exclusions
|
|
34
29
|
export { parseExclusionComments, isExcludedByComment } from './exclusion-comments.js';
|
|
35
30
|
export { silent } from './silent-exclusion.js';
|
|
@@ -37,4 +32,11 @@ export { silent } from './silent-exclusion.js';
|
|
|
37
32
|
export { withBaseline, generateBaseline, Baseline } from './baseline.js';
|
|
38
33
|
export { collectViolations } from './baseline-generator.js';
|
|
39
34
|
export { diffAware, DiffFilter } from './diff-aware.js';
|
|
35
|
+
export { setCorrespondence } from './correspondence-core.js';
|
|
36
|
+
// Glob declaration — the constructors a user-written `definePredicate` needs to
|
|
37
|
+
// declare what it matches on. The types are above; these build them. ADR-011's
|
|
38
|
+
// first cut moved them behind `/internal` and left `packages/ts/src/index.ts`'s
|
|
39
|
+
// comment about them standing over the types alone, so the documented extension
|
|
40
|
+
// path required the internal entry point.
|
|
41
|
+
export { globAnyOf, globNode } from './glob-site.js';
|
|
40
42
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,EAAE;AACF,+EAA+E;AAC/E,8EAA8E;AAC9E,4EAA4E;AAC5E,2BAA2B;AAK3B,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAA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AO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAM3E,aAAa;AACb,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAQrF,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAG9C,wBAAwB;AACxB,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AA4BvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAG5D,gFAAgF;AAChF,+EAA+E;AAC/E,gFAAgF;AAChF,gFAAgF;AAChF,0CAA0C;AAC1C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export type { ApplyResult } from './apply-fixes.js';
|
|
2
|
+
export type { Describable } from './rule-description.js';
|
|
3
|
+
export type { OnDisk, DiskSet } from './disk-set.js';
|
|
4
|
+
export type { Pair, MatchResult, MatchOptions } from './matching.js';
|
|
5
|
+
export { DECLARE_INSTEAD } from './unsuppressable.js';
|
|
6
|
+
export { UNSUPPRESSABLE } from './unsuppressable.js';
|
|
7
|
+
export { UNSUPPRESSABLE_MECHANISMS } from './unsuppressable.js';
|
|
8
|
+
export { applyFilters } from './execute-rule.js';
|
|
9
|
+
export { applyFixes } from './apply-fixes.js';
|
|
10
|
+
export { assertionLessViolation } from './terminal-builder.js';
|
|
11
|
+
export { bold, red, dim, yellow, cyan, gray } from './ansi.js';
|
|
12
|
+
export { byCodepoint, severityFor, remedyRepeatsMessage } from './violation.js';
|
|
13
|
+
export { dedupeConfigFindings } from './dedupe-config-findings.js';
|
|
14
|
+
export { isEmitterFinding, EMITTER_IDS } from './emitter-findings.js';
|
|
15
|
+
export { disambiguateIdentities } from './violation.js';
|
|
16
|
+
export { discoverIdentityRoot, normalizeIdentityText } from './identity-root.js';
|
|
17
|
+
export { escapeGitHub } from './format-github.js';
|
|
18
|
+
export { hashViolation } from './baseline.js';
|
|
19
|
+
export { identityCollisions } from './violation.js';
|
|
20
|
+
export { isAnchored, isProjectRelative } from './project-relative.js';
|
|
21
|
+
export { isDescribable } from './rule-description.js';
|
|
22
|
+
export { isFaultPosition, countDeclaredGlobs, isGlobNode, isOpaqueGlob, stampGlobs, negateGlobs, combineGlobs, } from './glob-site.js';
|
|
23
|
+
export { isRecord, isNullaryCallable } from './type-guards.js';
|
|
24
|
+
export { isSilent } from './silent-exclusion.js';
|
|
25
|
+
export { marksAssertsCardinality } from './cardinality.js';
|
|
26
|
+
export { marksOwnEmptyDiscovery, ownsEmptyDiscovery } from './owns-empty-discovery.js';
|
|
27
|
+
export { matchSelections } from './matching.js';
|
|
28
|
+
export { recordEdgeCoverage, untestedRules, edgeCoverageNotice, resetEdgeCoverage, } from './edge-coverage.js';
|
|
29
|
+
export { registerCacheReset, clearRegisteredCaches } from './cache-registry.js';
|
|
30
|
+
export { resetCommentSuppression, recordCommentSuppression, commentSuppressions, commentSuppressionNotice, } from './comment-suppression.js';
|
|
31
|
+
export { resetIdentityCollisions } from './violation.js';
|
|
32
|
+
export { resetStderrGuardForTests } from './stderr.js';
|
|
33
|
+
export { selectionMemo } from './selection-memo.js';
|
|
34
|
+
export { shallowClone } from './shallow-clone.js';
|
|
35
|
+
export { subjectOf } from './violation.js';
|
|
36
|
+
export { suppressionNotice, activeNotice, resetDiffDisclosureForTests } from './diff-disclosure.js';
|
|
37
|
+
export { toPortablePath } from './identity-root.js';
|
|
38
|
+
export { viewsFor } from './path-universe.js';
|
|
39
|
+
export { pathSuffixIndex } from './path-suffix.js';
|
|
40
|
+
export type { PathSuffixIndex, PathSuffixMatch } from './path-suffix.js';
|
|
41
|
+
export { violationsEmittedCount } from './report.js';
|
|
42
|
+
export { writeStderr } from './stderr.js';
|
|
43
|
+
export { RunScheduler, watchAndRerun } from './watch.js';
|
|
44
|
+
export type { WatchOptions } from './watch.js';
|
|
45
|
+
export { findConfigFile, extractSharedConfig, isModuleFormatRefusal, requireRuleFiles, } from './cli-config.js';
|
|
46
|
+
export type { SharedCliConfig } from './cli-config.js';
|
|
47
|
+
export { walkFiles, toPosix } from './file-walk.js';
|
|
48
|
+
export { declaredGlobsOf } from './rule-builder.js';
|
|
49
|
+
export { recordExclusions } from './silent-exclusion.js';
|
|
50
|
+
export { selectMatching, matchingElements } from './correspondence.js';
|
|
51
|
+
export { recordPredicate } from './predicate.js';
|
|
52
|
+
export { evaluateConditions, conditionContextFrom } from './condition.js';
|
|
53
|
+
export { ruleDescriptionOf, ruleDescriptionFrom } from './rule-description.js';
|
|
54
|
+
export { assertHomogeneous } from './combinators.js';
|
|
55
|
+
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAeA,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACpD,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AAC9D,OAAO,EAA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