Merge remote-tracking branch 'origin/master' into jsonl-packed-chunk-rows

Conflict: the generated event-producer-consumer doc — regenerated over merged
sources. Also strips the trailing whitespace / extra EOF blank line that
master's vitest.config.ts and client api.ts arrived with (the pre-commit
whitespace hook rejects any commit touching them otherwise).
This commit is contained in:
kingwl
2026-07-22 19:38:42 +08:00
440 changed files with 34280 additions and 689 deletions

View File

@@ -24,25 +24,38 @@ const windowsCoverageExclusions = process.platform === 'win32'
export default defineConfig({
// Native path resolution reads each package's nearest tsconfig, but only the root defines
// workspace paths. Keep this plugin pinned to the root map so unbuilt bare package imports resolve
// to source; native resolution would fall through to absent `lib/` outputs.
plugins: [tsconfigPaths({ projects: ['./tsconfig.json'] })],
// workspace paths. Keep this plugin pinned to the root map so bare package imports resolve
// to source — with built lib/ present, manifest-exports fallthrough would load a second
// copy of module singletons. tsconfig.vitest.json widens include to .tsx specs (the root
// include stops at .ts for tsc -b; the plugin scopes applicability by include).
plugins: [tsconfigPaths({ projects: ['./tsconfig.vitest.json'] })],
test: {
setupFiles: ['./scripts/test-invariants.ts'],
include: ['packages/*/*/tests/**/*.spec.ts', 'examples/*/tests/**/*.spec.ts', 'scripts/**/*.spec.ts'],
// .tsx: client component specs (jsdom via per-file @vitest-environment pragma).
include: ['packages/*/*/tests/**/*.spec.{ts,tsx}', 'examples/*/tests/**/*.spec.ts', 'scripts/**/*.spec.ts'],
exclude: windowsUnsupportedPackages.map(path => `${path}/tests/**/*.spec.ts`),
coverage: {
provider: 'v8',
// Coverage measures OUR runtime source. Types-only files carry no
// executable code; vendor/ and examples/ are out of scope (examples are
// exercised by the demo smoke test instead).
include: ['packages/*/*/src/**/*.ts'],
// .tsx: client components are gated like everything else (jsdom lane).
include: ['packages/*/*/src/**/*.{ts,tsx}'],
// Types-only files have no runtime coverage. Importing self-executing bins/workers would boot
// them inside the unit process, so real subprocess/Worker tests cover their thin entry glue.
exclude: [
'packages/*/*/src/types.ts',
'packages/*/*/src/bin.ts',
'packages/*/*/src/worker.ts',
// GUI step-1 skeleton (PR #500): client/web UI files whose remaining
// branches need a browser-grade harness the jsdom lane doesn't cover
// yet. TODO(gui): cover and remove as the client test lane matures.
'packages/client/ui-trajectory/src/*',
'packages/client/web-react/src/*',
'packages/host/webserver/src/*',
...windowsUnsupportedPackages.map(path => `${path}/src/**/*.ts`),
...windowsCoverageExclusions,
],