archprint 0.13.0 → 0.13.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/CHANGELOG.md +6 -0
- package/README.md +28 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# archprint
|
|
2
2
|
|
|
3
|
+
## 0.13.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- The README now walks through adopting the layer boundaries you agree with: read them with `scan`, write the ones you chose with `generate --include-structural --rules`, and reference them with `wire`.
|
|
8
|
+
|
|
3
9
|
## 0.13.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -159,6 +159,9 @@ archprint generate apps/web --check
|
|
|
159
159
|
# Generate a single rule by id after reviewing it (including a SUGGEST rule)
|
|
160
160
|
archprint generate apps/web --rule AP-001
|
|
161
161
|
|
|
162
|
+
# Adopt only the rules you choose, including reviewed layer boundaries
|
|
163
|
+
archprint generate apps/web --include-structural --rules AP-002,no-utils-to-app
|
|
164
|
+
|
|
162
165
|
# Recommend a rule set from the evidence and the detected stack (fresh repos too)
|
|
163
166
|
archprint recommend apps/web
|
|
164
167
|
|
|
@@ -532,6 +535,31 @@ LAYER BOUNDARIES (review before enforcing)
|
|
|
532
535
|
are shown for review, not written as enforcement unless you pass `--include-structural`. Every number is measured
|
|
533
536
|
from the import graph, not estimated.
|
|
534
537
|
|
|
538
|
+
### Adopt the layer boundaries you agree with
|
|
539
|
+
|
|
540
|
+
A layer boundary is held for review because a folder name can be misread as a layer. Once you have read the
|
|
541
|
+
evidence, adopt the boundaries you agree with by id: `utils !-> app` becomes the rule `no-utils-to-app`.
|
|
542
|
+
|
|
543
|
+
```bash
|
|
544
|
+
# 1. Read the boundaries and their evidence
|
|
545
|
+
archprint scan apps/web
|
|
546
|
+
|
|
547
|
+
# 2. Write the rules you chose: AP-002 plus two of the boundaries above
|
|
548
|
+
archprint generate apps/web --include-structural --rules AP-002,no-utils-to-app,no-hooks-to-app
|
|
549
|
+
|
|
550
|
+
# 3. Reference the generated rules from your ESLint config (once)
|
|
551
|
+
archprint wire
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
Without dependency-cruiser, each boundary becomes an ESLint rule in `.archprint/eslint.mjs`, such as
|
|
555
|
+
`archprint/no-utils-to-app`, with no extra plugin; with dependency-cruiser, it goes there instead. The rule
|
|
556
|
+
exempts the files that already break the boundary, so your lint stays green, and it catches a new import across
|
|
557
|
+
the boundary, by relative path or alias. `archprint check` reports a new break in a pull request, and
|
|
558
|
+
`archprint allow` records a justified exception. `--rules` keeps only the rules it names, so list every rule you
|
|
559
|
+
want in the same run. If your CI pins archprint (for example the GitHub Action's `archprint-version`), use 0.13.0
|
|
560
|
+
or later there first. The [rules reference](https://tommkruix.github.io/archprint/rules#layer-boundaries-review)
|
|
561
|
+
says exactly which imports and files the rule reads.
|
|
562
|
+
|
|
535
563
|
## Technical notes
|
|
536
564
|
|
|
537
565
|
**Fast and deep modes.** `scan` defaults to a **fast** specifier-level pass (no type checker). `generate` defaults
|
package/package.json
CHANGED