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 03:59:06 +08:00
parent 19e6f7d907
commit e1cb3da755
8 changed files with 37 additions and 48 deletions
+7 -7
View File
@@ -29,13 +29,13 @@ const e2eMaxWorkers = positiveIntFromEnv('DSH_E2E_MAX_WORKERS', DEFAULT_E2E_MAX_
export default defineConfig({
// Same resolution note as vitest.config.ts: bare workspace names resolve
// through the vitest-scoped tsconfig paths map (its include spans package
// src, so client-package sources get mapping too — the root tsconfig
// excludes packages/client, which would drop /client subpath imports onto
// package exports and load browser dist bundles into node). Built-artifact
// e2e suites are unaffected: their built-ness lives in subprocesses and
// createRequire lookups, which bypass vite resolution entirely.
plugins: [tsconfigPaths({ projects: ['./tsconfig.vitest.json'] })],
// through the tsconfig.base.json paths facade (no include = match-all, so
// client-package sources get mapping too — dropping /client subpath imports
// onto package exports would load browser dist bundles into node).
// Built-artifact e2e suites are unaffected: their built-ness lives in
// subprocesses and createRequire lookups, which bypass vite resolution
// entirely.
plugins: [tsconfigPaths({ projects: ['./tsconfig.base.json'] })],
test: {
setupFiles: ['./scripts/test-invariants.ts'],
include: ['packages/*/*/tests/**/*.e2e.ts', 'examples/*/tests/**/*.e2e.ts'],