@archwall/core 0.2.0 → 1.0.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/CHANGELOG.md ADDED
@@ -0,0 +1,110 @@
1
+ # @archwall/core
2
+
3
+ ## 1.0.0
4
+
5
+ ### Minor Changes
6
+
7
+ - b56068e: `UserConfig.baseline` now points at a committed file of accepted violations, keyed on
8
+ violation fingerprints. Matched findings move to `AnalysisResult.suppressed` instead of
9
+ failing the run, and the suppressed count is printed on every run. Write the file with
10
+ `archwall check --update-baseline`. See `docs/guides/brownfield-adoption.md`.
11
+
12
+ Suppression is applied at the run edge, not inside `analyze()` — the engine stays pure and
13
+ policy-free, exactly as `failOn` already is.
14
+
15
+ - New in `@archwall/core`: `parseBaseline`, `serializeBaseline`, `applyBaseline`, and the
16
+ `BaselineFile` / `BaselineEntry` / `AppliedBaseline` types.
17
+ - New diagnostic `baseline-invalid` (a configured baseline that is missing, unparseable, or
18
+ written under another fingerprint scheme), gated with the other configuration errors and so
19
+ failing by default. `baseline-stale` is now emitted, and remains off by default.
20
+ - Stale entries are not reported when the run was partial — a progressive graph, or a rule
21
+ that was skipped or crashed — because an unmatched entry is then not evidence of a fix.
22
+ - New in `@archwall/integration-kit`: `readBaseline`, `writeBaseline`, and
23
+ `RunCheckOptions.updateBaseline`.
24
+
25
+ **Breaking:** `@archwall/core` is now a peer dependency of `@archwall/rules`,
26
+ `@archwall/presets`, `@archwall/integration-kit`, and `@archwall/test-utils`, so an install
27
+ cannot end up with two copies of core behind one graph. The adapter packages depend on it
28
+ directly; if you install `@archwall/rules` or `@archwall/test-utils` on their own, add
29
+ `@archwall/core` alongside them.
30
+
31
+ ## 0.2.1
32
+
33
+ ### Patch Changes
34
+
35
+ - c512a8a: Fix unusable published packages. `0.1.0` and `0.2.0` should not be installed.
36
+
37
+ Both earlier releases went to npm with manifests that were never rewritten for publishing:
38
+
39
+ - `exports` still pointed at `./src/*.ts`, which no tarball contains — `files` is `["dist"]`. Any
40
+ import of any package threw `ERR_MODULE_NOT_FOUND`.
41
+ - Internal dependencies were published as `"@archwall/core": "workspace:^"`, so installing anything
42
+ with an internal dependency failed with `EUNSUPPORTEDPROTOCOL`.
43
+
44
+ Both fields come from Yarn features — `publishConfig.exports` and the `workspace:` protocol — that
45
+ Yarn substitutes when it packs. Releases ran through `changeset publish`, which shells out to
46
+ `npm publish`; npm treats `publishConfig` as npm config, warns `Unknown publishConfig config
47
+ "exports"`, and drops it. The pack smoke test never caught it because it packs with Yarn, so it was
48
+ checking a tarball no release ever uploaded.
49
+
50
+ Releases now pack with Yarn and upload the finished tarball with `npm publish`, which keeps the
51
+ correct manifest and keeps OIDC trusted publishing (Yarn's own publisher has no token exchange).
52
+ `verify:pack` gained two guards: no `workspace:` range in a publishable manifest, and every
53
+ advertised entrypoint must exist in the tarball — including for ESM-only packages, which the CJS
54
+ load check skips.
55
+
56
+ `@archwall/test-utils` is published for the first time in this release.
57
+
58
+ ## 0.2.0
59
+
60
+ ### Minor Changes
61
+
62
+ - 1321ebb: Contract corrections. These are the changes that are cheap now and a
63
+ major version later, so they are made together while the packages are still 0.x.
64
+
65
+ **Type-only edges are a fact, not a producer's private decision.** `Edge` gains an open
66
+ `attributes` bag, with `typeOnly` as its first well-known member and a `type-only-edges`
67
+ capability gating it. The CLI previously _deleted_ type-only edges during its scan, which made
68
+ it silently disagree with every bundler adapter about what the graph contained, with no way for
69
+ a user to get them back. It now labels them, and whether an erased import counts as a dependency
70
+ is answered by configuration — a new `dropTypeOnlyEdges()` transform — rather than by whichever
71
+ producer happened to build the graph. `kind` keeps answering exactly one question, so a
72
+ re-export that is also type-only is finally expressible.
73
+
74
+ Edges that dedupe onto one another now _merge_ their attributes by intersection rather than
75
+ first-wins. `import type { A } from "./x"` beside `import { b } from "./x"` is one dependency
76
+ and it is not type-only; union semantics there would let a "type-only may cross this boundary"
77
+ rule wave through a real violation.
78
+
79
+ **The CLI no longer passes green over files it never read.** It lexes JavaScript and TypeScript
80
+ only, so `.vue`, `.svelte`, and `.astro` files inside the project boundary produced no module, no
81
+ edge, and no warning — a green CI run over a codebase half of which was invisible. A new
82
+ `unscannable-files` diagnostic names the count, the extensions, and a sample of paths, gated by
83
+ `failOnDiagnostics.unscannableFiles` (default off, so nobody's CI breaks on upgrade).
84
+ **Breaking:** `buildGraphFromFilesystem` now returns `{ graph, diagnostics }` rather than a
85
+ `ProjectGraph`.
86
+
87
+ **Rules receive a `GraphView`, not a `GraphQuery`.** The read surface a rule may rely on is now
88
+ an interface; `GraphQuery` is its sole implementation and has moved to `@archwall/core/internal`.
89
+ Naming the class froze the implementation into the public contract, made test doubles impossible,
90
+ and would have turned any future interned or columnar store into a breaking change.
91
+ **Breaking:** import `GraphQuery` from `@archwall/core/internal` if you were constructing one —
92
+ or, if you were doing so to test a rule, use `@archwall/test-utils` instead.
93
+
94
+ **`@archwall/test-utils` is now published.** There is no rule ecosystem without a supported way
95
+ to test a rule, and `ProjectGraph` is opaque by design, so building a fixture graph by hand is
96
+ not something a third party could otherwise do. `runRule` drives the real engine, so scoping,
97
+ option validation, and message rendering behave in a test exactly as they do in a build.
98
+
99
+ **Reserved seams, declared before they are honoured.** `analyze()` takes an optional third
100
+ parameter (`signal` is honoured between rules; `previous` is accepted and ignored, reserving the
101
+ name for incremental reuse). `ProjectGraph` carries a `revision`. `AnalysisResult` always carries
102
+ a `suppressed` list, `UserConfig` accepts `baseline`, and a `baseline-stale` diagnostic gate
103
+ exists — all inert for now. Each of these lives on a type that is about to be frozen, and adding
104
+ them after the freeze would cost a major apiece.
105
+
106
+ ## 0.1.0
107
+
108
+ ### Minor Changes
109
+
110
+ - 4415522: Initial release.
package/dist/index.cjs CHANGED
Binary file