@hublo/sentinel 1.4.0-alpha.1 → 1.4.0-alpha.2
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 +6 -4
- package/dist/bin/sentinel.js +1 -1
- package/dist/{chunk-O3XCQGTJ.js → chunk-4UIZJ3TR.js} +707 -163
- package/dist/chunk-CPCUPK4J.js +70 -0
- package/dist/chunk-NX4GHIHF.js +25 -0
- package/dist/index.js +1 -1
- package/dist/roles/test/nest/toolchain.js +71 -6
- package/dist/roles/test/nest/toolchain.js.map +1 -1
- package/dist/roles/test/react/toolchain.js +4 -21
- package/dist/roles/test/react/toolchain.js.map +1 -1
- package/dist/roles/test/setup/nest.js +12 -64
- package/dist/roles/test/setup/nest.js.map +1 -1
- package/dist/roles/test/setup/workspace-entry.d.ts +2 -0
- package/dist/roles/test/setup/workspace-entry.js +8 -0
- package/dist/roles/test/setup/workspace-entry.js.map +1 -0
- package/docs/.gitkeep +0 -0
- package/docs/build-adoption.md +521 -0
- package/docs/format-adoption.md +321 -0
- package/docs/lint-adoption.md +290 -0
- package/docs/performance.md +49 -0
- package/docs/test-adoption.md +175 -0
- package/docs/typescript-adoption.md +184 -0
- package/docs/typescript-traces.md +798 -0
- package/docs/using-sentinel.md +180 -0
- package/docs/validating-a-change.md +101 -0
- package/package.json +9 -3
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
`sentinel` is a standalone, semver-versioned package (published to a registry, consumed by a repo as a normal dependency) that unifies a repo's tooling, config, and quality checks into one place, so projects stop copying config files everywhere and stop carrying a pile of duplicated tooling dependencies.
|
|
6
6
|
|
|
7
|
-
> Status: **the foundation,
|
|
7
|
+
> Status: **the foundation, TypeScript, lint, format, build, dev and test are shipped** (`@hublo/sentinel` on npm). The rest of this README is the design reference for the tools still to come, added one at a time on top of this foundation.
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -43,8 +43,9 @@ A large monorepo accumulates:
|
|
|
43
43
|
|
|
44
44
|
sentinel writes **standard config files** into a project (each just `extends` a sentinel preset) and runs the checks. Your editor and the tools read those **normal files natively**, they never call sentinel at runtime, so nothing is coupled to it or brittle.
|
|
45
45
|
|
|
46
|
-
> **Shipped today:** the **TypeScript**, **lint**, **format**, **build** and **
|
|
47
|
-
> `--test`
|
|
46
|
+
> **Shipped today:** the **TypeScript**, **lint**, **format**, **build**, **dev** and **test**
|
|
47
|
+
> tools. `--test` migrates a module from jest to Vitest and proves the migration by comparing the
|
|
48
|
+
> full NAMES of the tests before and after; see [the test cheat sheet](docs/test-adoption.md).
|
|
48
49
|
|
|
49
50
|
**Step 1 — put a module on sentinel** (once per module, by a dev; the files are committed). Run from the app dir; `--init` does it all, nothing is hand-edited:
|
|
50
51
|
|
|
@@ -168,6 +169,7 @@ throwaway run wants. Once a module has adopted, nothing is fetched any more: the
|
|
|
168
169
|
- [`docs/format-adoption.md`](docs/format-adoption.md) — migrating a module from Prettier to oxfmt: why this config is materialized rather than a stub, how a module keeps its own formatting, and what did not survive the move.
|
|
169
170
|
- [`docs/build-adoption.md`](docs/build-adoption.md) — moving a React app's Vite toolchain into sentinel: adoption changes the config's IMPORTS and nothing else, what sentinel owns versus what stays the app's, and why reading nothing is what makes losing nothing a guarantee.
|
|
170
171
|
- [`docs/typescript-adoption.md`](docs/typescript-adoption.md) — the adoption cheat sheet: the two adoption steps, the command model (verb x type x location), options, reading a report, and troubleshooting.
|
|
172
|
+
- [`docs/test-adoption.md`](docs/test-adoption.md) — migrating a module from jest to Vitest: the two steps, what the migration rewrites and what it refuses BY NAME, how the baseline gate proves nothing was lost, and the failures worth recognising.
|
|
171
173
|
- [`docs/typescript-traces.md`](docs/typescript-traces.md) — a **generated, versioned** reference of live command + output traces (every verb, option, config result and edge case) against the mock monorepo. Regenerate after CLI changes with `pnpm docs:traces`.
|
|
172
174
|
|
|
173
175
|
## Architecture: `target → runner → preset`
|
|
@@ -529,7 +531,7 @@ This scaffold is the foundation; each tool is added one at a time on top of it:
|
|
|
529
531
|
2. **TypeScript** (`--typescript`) — runner `tsc` (later `tsgo`): presets react/nest/node, `--run`/`--inspect`/`--report`/`--init`, the composable grid, phased (non-breaking) strictness. **✅ shipped in `0.1.0-alpha.x`**
|
|
530
532
|
3. **Lint** (`--lint`) — benchmark `eslint` vs `biome` vs `oxlint`.
|
|
531
533
|
4. **Build** (`--build`) — `vite`.
|
|
532
|
-
5. **Test** (`--test`) — `vitest`,
|
|
534
|
+
5. **Test** (`--test`) — `vitest`, migration from jest proven module by module against a name-level baseline. **✅ shipped in `1.4.0-alpha.x`**; a11y / w3c setups still to come.
|
|
533
535
|
6. **Static analysis** (`--static-analysis`) — cycles, complexity, duplication, centrality.
|
|
534
536
|
7. **Runtime analysis** (`--runtime-analysis`) — bundle, Lighthouse, web vitals.
|
|
535
537
|
8. **Unified CI workflow + `--report --all` dashboard.**
|