- tsconfig.build.json references the nine in-scope packages; each package is composite and references the workspace packages it depends on. build:packages is now `tsc -b tsconfig.build.json` instead of a chain of cd commands. - Every in-scope package exports its TypeScript entry under a `source` condition next to the dist/ entries. Vitest, tsx (dev:server, the Tauri dev launch, the e2e server), the sidecar and launcher bundles and the web app resolve it, so none of them needs build:packages first or can pick up a stale dist/. The vitest src aliases remain only for the excluded packages that have no source export. - Published packages with a files list (agent, cli, marketplace) pack src/ too, so the source condition never points at a missing file. - tsconfig.tests.json and `npm run typecheck:tests` type-check the test suites of the in-scope packages. They report 426 existing errors, so the CI step is advisory for now. - The root test run leaves out the excluded and postponed packages (hive-mind-*, memory-mcp, wiki-compiler, team-server, waggle-dance, worker, weaver); they are not built either. - CI runs the test job on Ubuntu, macOS and Windows with Node 22.23.2 (ADR-0008), and no longer builds the hook runtime and the memory MCP server.
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
import { defineConfig } from 'vitest/config';
|
|
import path from 'node:path';
|
|
import { INFRA_TEST_SUITES } from './vitest.infra-suites';
|
|
import { WAGGLE_SOURCE_CONDITIONS, waggleSrcAliases } from './vitest.aliases';
|
|
|
|
/**
|
|
* Infra-lane vitest config — runs ONLY the suites that require live PostgreSQL
|
|
* (5434) + Redis (6381). Bring infra up first: `docker-compose up -d postgres
|
|
* redis` (and apply the schema), then `npm run test:infra`.
|
|
*
|
|
* The default `npm test` (vitest.config.ts) EXCLUDES these so the no-Docker
|
|
* gate stays green. See docs/audits/2026-06-01-full-repo-verification-sweep.md.
|
|
*/
|
|
export default defineConfig({
|
|
resolve: {
|
|
conditions: WAGGLE_SOURCE_CONDITIONS,
|
|
alias: {
|
|
...waggleSrcAliases(__dirname),
|
|
'@/': path.resolve(__dirname, 'app/src') + '/',
|
|
'@': path.resolve(__dirname, 'app/src'),
|
|
},
|
|
},
|
|
ssr: {
|
|
resolve: { conditions: WAGGLE_SOURCE_CONDITIONS },
|
|
},
|
|
test: {
|
|
globals: true,
|
|
testTimeout: 30_000,
|
|
setupFiles: ['./vitest.setup.ts'],
|
|
include: [...INFRA_TEST_SUITES],
|
|
exclude: ['node_modules/**'],
|
|
},
|
|
});
|