Skip to content

Commit 1180de6

Browse files
committed
chore(cutover): the root tsc program and the coverage walker leave ui/ to its own packages (bill item 46, objectstack#25803)
The root tsconfig.json declares no `include` and excluded only node_modules/packages/apps/examples, so on the merged tree the root program read every ui/**/*.ts (2833 files plus the React and Vite type closure) and check:type-check-debt's re-measure died at the 6144 MB heap ceiling after about 3.5 minutes (exit 3, PREREQUISITE NOT MET). Excluding `ui` puts the root program back to its own seven files (tsc in 3 s, the same raw error count as main). With the directory out of the root program, check-type-check-coverage's walker then handed ui/scripts, ui/e2e, ui/docs and the rest (232 test files, 51 source files) to the ROOT package: its "another package's problem" guard skipped a child directory carrying a package.json only at depth > 0, and ui/ is the first workspace member that sits directly under the root. The guard now applies at any depth. No other member has a direct child directory with a package.json, so this changes exactly that one attribution. Measured: --self-test 0 (58+97+56+28+19+18+19 cases); plain gate OK 128/131, the same reading as CI; --re-measure OK, 1 ledger entry, 26 raw errors, none above its recorded number; check-test-source-alias, check-undeclared-dep-imports and check-registry-log-declared exit 0. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RSDL3SFtJaKzcymvCD8RsU
1 parent d2342a1 commit 1180de6

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎scripts/check-type-check-coverage.mjs‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2116,7 +2116,10 @@ function walkPackageFiles(absDir, dir, ignored) {
21162116
if (isIgnoredPath(ignored, posix.join(dir, childRel))) continue;
21172117
if (entry.isDirectory()) {
21182118
if (entry.name === 'node_modules' || entry.name === 'dist' || entry.name.startsWith('.')) continue;
2119-
if (depth > 0 && existsSync(join(child, 'package.json'))) continue; // another package's problem
2119+
// Any depth, since the ui/ import (objectstack#25752): `ui/` is a workspace
2120+
// member that sits DIRECTLY under the root, so a depth guard here would hand
2121+
// its root-level scripts and tests to the ROOT package's walk.
2122+
if (existsSync(join(child, 'package.json'))) continue; // another package's problem
21202123
walk(child, childRel, depth + 1);
21212124
} else if (TEST_FILE.test(entry.name)) {
21222125
testRels.push(childRel);

‎tsconfig.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"node_modules",
2222
"packages",
2323
"apps",
24-
"examples"
24+
"examples",
25+
"ui"
2526
]
2627
}

0 commit comments

Comments
 (0)