Skip to content

Share base config across tsconfig and vitest configs; replace shell-pipeline version generation #96

@gmoon

Description

@gmoon

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

  • Extract tsconfig.base.json; both existing tsconfigs extends it.
  • Extract a shared Vitest defaults object; both vitest configs spread it.
  • Replace version.ts shell-pipeline generation with import { version } from '../package.json' assert { type: 'json' } (or current-Node-target equivalent).
  • Remove the now-dead clean step for version.ts.
  • npm run build produces equivalent output (verify dist/ shape).
  • All existing tests pass.

Notes

This is independent of the API refactor and can ship first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:toolingBuild, lint, tsconfig, CIv4Targeted for the 4.0 release

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions