Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 38 additions & 2 deletions apps/console/tsconfig.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,42 @@
/* `../../scripts/vite-*.ts` are the repo-level Vite plugins vite.config.ts
imports. They must be listed here or each one is a TS6307 ("not listed
within the file list of project") — the error that kept this project red,
and therefore ungated. */
"include": ["vite.config.ts", "vitest.setup.ts", "../../scripts/vite-*.ts"]
and therefore ungated.

`vitest.config.ts` is listed for the same reason `vite.config.ts` is, and
until objectui#3476 it was in ZERO tsc programs. CI runs
`turbo run type-check`, i.e. per PACKAGE; the root `tsconfig.json` does
list `apps` in its `include`, but no script ever runs it — it is the
editor config. So the one console config that merges two config objects
(`rootConfig` and `viteConfig`), which is precisely the shape a
type-checker catches drift in, was the one an agent could break with no
gate noticing.

`../../vitest.config.mts` follows it in by necessity, not by wish:
`vitest.config.ts` imports it, and a composite project must list every
file in its program or that import is a TS6307 as well. Covering the
importer is impossible without it — and it is a bonus, since the root
Vitest config was in no gated program either. One caveat that comes with
it: its `@ts-expect-error` on the plain-JS `vitest-invocation-guard.mjs`
import stays CORRECT here only because this project leaves `allowJs` at
its default `false`. Turning `allowJs` on would make that directive unused
and this project red with TS2578 — see `tsconfig.scripts.json`, which
chose `allowJs: true` for `scripts/` and deliberately paid that price.

There is deliberately NO `vitest.setup.ts` entry. No such file has ever
existed in this directory, and a literal, glob-less `include` entry that
matches nothing is silently ignored by TypeScript — so it read as coverage
that was never there (objectui#3476). Repointing it at the setup file
`vitest.config.ts` actually uses (the repo-root `vitest.setup.dom.tsx`)
was measured and rejected: that file is handed to Vitest as a RUNTIME PATH
STRING, never imported, so this program has no type edge to it, and naming
it here drags `vitest.setup.base.ts` plus four `@object-ui` side-effect
imports into a Node build-config project that cannot resolve them
(one TS6307 + four TS2882). It belongs to a test-oriented program. */
"include": [
"vite.config.ts",
"vitest.config.ts",
"../../vitest.config.mts",
"../../scripts/vite-*.ts"
]
}
3 changes: 2 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
"cache": true,
"inputs": [
"$TURBO_DEFAULT$",
"$TURBO_ROOT$/scripts/vite-*.ts"
"$TURBO_ROOT$/scripts/vite-*.ts",
"$TURBO_ROOT$/vitest.config.mts"
]
},
"clean": {
Expand Down
Loading