diff --git a/tsconfig.typecheck.json b/tsconfig.typecheck.json new file mode 100644 index 000000000..f28873ee4 --- /dev/null +++ b/tsconfig.typecheck.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "incremental": false, + "noEmit": true + }, + "include": ["packages/ai/src/**/*"], + "exclude": ["**/dist", "**/node_modules"] +} diff --git a/vitest.config.ts b/vitest.config.ts index 008db3b2a..3b9a33e4d 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -8,6 +8,13 @@ export default defineConfig({ envDir: __dirname, test: { setupFiles: ["./vitest.setup.ts"], + // The nightly type-drift guard runs `.test-d.ts` files through vitest's + // `--typecheck` engine. Scope the tsc program to the package under test so + // unrelated source (example UIs needing `jsx`, providers relying on their + // own ambient `types`/`lib`) is not swept in and reported as drift. + typecheck: { + tsconfig: "./tsconfig.typecheck.json", + }, testTimeout: 15000, // 15 second global timeout (WASM Postgres / PGlite init can be slow) // Vitest uses hookTimeout for beforeEach/afterAll separately from testTimeout; keep both aligned hookTimeout: 15000,