|
| 1 | +--- |
| 2 | +"@objectstack/cli": patch |
| 3 | +--- |
| 4 | + |
| 5 | +fix(cli): wire `packages/cli`'s test layer into `check:test-typecheck`, so its 115 test files are type-checked at all (#14710) |
| 6 | + |
| 7 | +`packages/cli/tsconfig.json` declares `include: ["src"]` and no `exclude` at |
| 8 | +all, and the package's `typecheck` script was a bare `tsc --noEmit` against that |
| 9 | +very config — so the 115 test files in the sibling `test/` tree were read by no |
| 10 | +tsc program anywhere. This is the shape AGENTS.md already forbids, reached by |
| 11 | +the OTHER spelling: not an `exclude` naming the test globs, but an `include` |
| 12 | +that never reaches them. |
| 13 | + |
| 14 | +Measured at `5a5336b399` with the workspace closure built first, rather than |
| 15 | +read off the config: `tsc --noEmit --listFiles -p tsconfig.json` puts 1009 files |
| 16 | +in the program and **0** of the 115 among them, while 119 of 119 non-test |
| 17 | +`src/**` files and all 121 `src/**` test files ARE there — so the zero is the |
| 18 | +`include` line, not a probe that sees nothing. The directional control is |
| 19 | +`packages/drivers/driver-memory`, whose tsconfig carries no test exclusion: the |
| 20 | +same probe puts 40 of its 40 test files in the program. Under the new |
| 21 | +`tsconfig.test.json` the count is **115 of 115**, plus the three package-root |
| 22 | +harness modules (`vitest.config.ts`, `vitest-tiers.ts`, |
| 23 | +`vitest-tiers.fixtures.ts`) and `test/helpers/serve-process.ts`. |
| 24 | + |
| 25 | +Onboarded by *wiring* to the shared mechanism (`scripts/check-test-typecheck.mts`) |
| 26 | +the way `objectql`, `rest`, `lint`, the fourteen `packages/plugins/**` and |
| 27 | +`runtime` are wired, never by copying it: a sibling `tsconfig.test.json` |
| 28 | +matching vitest's real module semantics (`module: esnext`, |
| 29 | +`moduleResolution: bundler`), named by `typecheck` via |
| 30 | +`check:test-typecheck --project`. Strictness is untouched and inherited; not one |
| 31 | +`any` and not one `@ts-expect-error` was added to any test file to open the |
| 32 | +gate. `rootDir` IS widened to `../..`, the way `packages/client`'s test config |
| 33 | +already does it — this package's tests sit outside the build config's |
| 34 | +`rootDir: "src"`, and three of them import fixtures from |
| 35 | +`examples/app-showcase/src/**`. |
| 36 | + |
| 37 | +**Seeded, not repaired, per this card's triage ruling.** The layer reports 28 |
| 38 | +errors across 3 files and they are recorded EXACT and shrink-only in the new |
| 39 | +`test-typecheck-debt.json`. Every one is pre-existing: no test file is edited |
| 40 | +here. The other 112 files carry no entry, so any error they gain is red on |
| 41 | +arrival. |
| 42 | + |
| 43 | +This is a CONVERSION rather than a new debt-opening decision. The same |
| 44 | +population under the build config's inherited NodeNext reports 144 — exactly the |
| 45 | +number `scripts/check-type-check-coverage.mjs` already held for this package in |
| 46 | +its per-PACKAGE `TEST_DEBT` ledger, class for class — and that entry graduates |
| 47 | +here, as the pairing forces. The 144 → 28 step is attributed in both directions |
| 48 | +with no remainder: −120 config-tier diagnostics that dissolve under vitest's |
| 49 | +module semantics (TS2835 ×56, the TS7006 ×59 cascading above them, TS2307 ×3, |
| 50 | +TS18046 ×2) and +4 that collapsing the cascade exposed (TS18048 ×4 in |
| 51 | +`test/i18n-extract-action-description.test.ts`, previously masked by an `any` |
| 52 | +from two unresolved imports). The 24 TS2339 survive unchanged, file for file. |
0 commit comments