The vitest suite silently ran zero tests: vitest 4 transpiles with oxc, which does not pick up `experimentalDecorators` from a tsconfig that excludes the files being transformed, so every decorator-using suite failed to parse and was reported as "0 test". A vitest.config.ts enabling legacy decorators brings all 40 existing tests back to life. - Add vitest.config.ts (oxc legacy decorators + v8 coverage config) - Type-check test files: move the test/demo exclusions from the base tsconfig onto the two build configs, and fix the strict-mode errors this surfaced - Stop shipping src/example.ts in dist (it invokes runExample() at import time, a side effect in a package declaring "sideEffects": false) - CI: run lint, tests with coverage, build and entry-point smoke checks; drop EOL Node 18, add Node 24; commit package-lock.json so `npm ci` works - Add `verify`, `test:watch` and `build:docs` scripts, and an engines field; `build:docs` regenerates the previously hand-maintained docs/cereale.js Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SAcqrz3FcadkYr3xG32CjK
43 lines
1.1 KiB
JSON
43 lines
1.1 KiB
JSON
{
|
|
// Visit https://aka.ms/tsconfig to read more about this file
|
|
"compilerOptions": {
|
|
// File Layout
|
|
"rootDir": "src",
|
|
"outDir": "dist",
|
|
|
|
// Environment Settings
|
|
"module": "NodeNext",
|
|
"target": "ES2025",
|
|
"lib": ["ESNext"],
|
|
"types": ["node"],
|
|
|
|
// Other Outputs
|
|
"sourceMap": true,
|
|
"declaration": true,
|
|
"declarationMap": true,
|
|
|
|
// Stricter Typechecking Options
|
|
"noUncheckedIndexedAccess": true,
|
|
"exactOptionalPropertyTypes": true,
|
|
|
|
// Style Options
|
|
"noImplicitReturns": true,
|
|
"noImplicitOverride": true,
|
|
"noUnusedLocals": true,
|
|
"noUnusedParameters": true,
|
|
"noFallthroughCasesInSwitch": true,
|
|
|
|
// Recommended Options
|
|
"strict": true,
|
|
"strictPropertyInitialization": false,
|
|
"isolatedModules": true,
|
|
"skipLibCheck": true,
|
|
|
|
"experimentalDecorators": true
|
|
},
|
|
// NOTE: test files are deliberately included here so that `npm run type-check`
|
|
// covers them. The two build configs exclude them (and the demo) from `dist`.
|
|
"include": ["src/**/*"],
|
|
"exclude": ["node_modules", "dist"]
|
|
}
|