Problem
Two TypeScript configs (tsconfig.json, tsconfig.examples.json) and two Vitest configs (vitest.config.ts, vitest.integration.config.ts) duplicate settings (globals: true, environment: 'node', testTimeout: 30000, hookTimeout: 30000, target/module options). They will drift.
The build script in package.json uses npm pkg get version | sed | echo > version.ts to generate a versioned source file, then a separate clean script removes it. Brittle; replaceable with a build-time import.
Acceptance criteria
Notes
This is independent of the API refactor and can ship first.
Problem
Two TypeScript configs (
tsconfig.json,tsconfig.examples.json) and two Vitest configs (vitest.config.ts,vitest.integration.config.ts) duplicate settings (globals: true,environment: 'node',testTimeout: 30000,hookTimeout: 30000, target/module options). They will drift.The
buildscript inpackage.jsonusesnpm pkg get version | sed | echo > version.tsto generate a versioned source file, then a separatecleanscript removes it. Brittle; replaceable with a build-time import.Acceptance criteria
tsconfig.base.json; both existing tsconfigsextendsit.version.tsshell-pipeline generation withimport { version } from '../package.json' assert { type: 'json' }(or current-Node-target equivalent).cleanstep forversion.ts.npm run buildproduces equivalent output (verify dist/ shape).Notes
This is independent of the API refactor and can ship first.