Versioning & releases
dsp-audio-metrics follows semantic versioning. The public surface that counts is the src/index.d.mts type declarations: a breaking change to any exported function signature bumps the major version.
The release gate
Releases are driven entirely by git tags, and enforced by script/check-release.mjs (unit-tested, 100% line coverage) plus the publish.yml workflow:
- Tag — push a
vX.Y.Ztag. - Check —
check-release.mjsverifies the tag parses, exactly matchespackage.json'sversion, and is a single-step, coherent bump from the latest existing tag (v0.1.0→v0.1.1OK,v0.1.0→v0.2.0OK,v0.1.0→v0.3.0rejected, downgrades rejected). - Test — the matrix runs
npm teston Node 18 / 20 / 22, and the coverage gate (--test-coverage-lines=95 --test-coverage-branches=90 --test-coverage-functions=95) on Node 22. - Publish —
npm publish --provenanceruns only on the tag that passed.
This is the same design as the drizzle-migrate-neon-http package, which this project mirrors.
Versioning the docs
The docs live on a separate docs branch (VitePress) and deploy to GitHub Pages on every push to that branch. API docs are written by hand against src/index.d.mts and reviewed in the same PR that changes the types, so the docs branch is always in sync with the latest main.
Procedure
# feature work on main
git checkout main
npm version patch # or minor / major — bumps version + creates the tag
git push --follow-tagsGitHub Actions does the rest. If the gate rejects the bump (e.g. you skipped a version), delete the tag and npm version again:
