refactor(vitest): resolve every lane through the tsconfig.base.json facade

tsconfig.vitest.json is deleted; its job (a paths map applying to all
test files) is inherent in tsconfig.base.json having no include —
vite-tsconfig-paths treats that as match-all. All four vitest configs
now pin the same facade: the unit config gains a shared pathsPlugin()
helper, the web lane drops its handwritten webserver alias (apps/web
tests are covered by match-all), and the snapshot lane leaves the root
solution (which no longer carries paths) and stops resolving client
imports through package exports. tsconfig.base.json documents the
facade role and bans include/files; the CI eslint cache key hashes the
four graph tsconfigs; the eslint tests-block comment states resolution
via the solution to tsconfig.host.json.

Per missions/tsconfig-single-graph-migration.md §3.
This commit is contained in:
imccyu
2026-07-23 00:02:21 +08:00
parent 19e6f7d907
commit e1cb3da755
8 changed files with 37 additions and 48 deletions

View File

@@ -1,4 +1,7 @@
{
// Doubles as the resolution facade for vite-tsconfig-paths (vitest configs
// point here). NEVER add include/files to this file: it would leak into
// every extending package project and narrow the facade's match-all scope.
"compilerOptions": {
"target": "es2024",
"module": "esnext",
@@ -87,8 +90,9 @@
// One wildcard maps every @deepseek-ai/dsh-<name> to its source. Package
// dir names are unique across groups, so first-on-disk-wins resolution is
// unambiguous; adding a package under an existing group needs no edit
// here. The build graph's project references (tsconfig.build.json) stay
// explicit — TS project references have no wildcard form.
// here. The aggregates' project references (tsconfig.host.json /
// tsconfig.client.json) stay explicit — TS project references have no
// wildcard form.
"@deepseek-ai/dsh-host-apiproxy": ["./packages/host/apiproxy/src"],
"@deepseek-ai/dsh-host-apiproxy/client": ["./packages/host/apiproxy/src/fetch/client.ts"],
"@deepseek-ai/dsh-host-apiproxy/*": ["./packages/host/apiproxy/src/*"],