- Node.js
^20,^22, or^24 - npm
npm ci- Create a branch from
main. - Make the smallest coherent change that solves the problem.
- Add or update runtime tests, type tests, and documentation as needed.
- Run the verification commands before opening a pull request.
- Add a changeset if the published package behavior changes.
Run the full local gate:
npm run verifyRun coverage separately when needed:
npm run test:coverageUseful focused commands:
npm run lint
npm run typecheck
npm test
npm run build
npm run test:package
npm run bench
npm run publish:package- Add positive and negative behavioral coverage for runtime guards.
- Keep type-level narrowing coverage current in
src/__tests__/narrowing.types.ts. - Preserve the per-file coverage threshold enforced by the repository scripts.
- Keep consumer smoke tests passing for both CommonJS and ESM package usage.
Create a changeset whenever a pull request changes the published package in a way that should produce a version bump or release note entry.
npm run changesetChangesets are applied during release with:
npm run release:versionChangesets can be published with:
npm run release:changesetsThe GitHub release workflow publishes with npm provenance enabled. The local
npm run publish:package command does not force provenance, because npm only
supports automatic provenance generation in supported CI providers.
- The package publishes built files from
dist/. - The root
README.md,LICENSE, andpackage.jsonare included in the npm tarball automatically. - Source maps are intentionally not published.
- Keep pull requests focused.
- Update documentation when behavior, packaging, or workflow changes.
- Do not relax quality gates to make a change pass. Fix the code, tests, or tooling instead.