Conventional Commits, lowercase, no trailing period: fix: ..., feat: ..., test: ..., chore: ....
npm test/npm run test:coveragerun the suite under bothen-USanden-GBlocales (test:en-US,test:en-GBinpackage.json). This exists because bugs in this library have historically only reproduced under non-US locales (e.g. dd/mm/yyyy date parsing) and were invisible to a single-locale CI run. When adding a test that depends on locale-sensitive formatting, either make the assertion locale-independent or assert explicitly per-locale (don't rely on the runtime's default locale viagetLocale()).test:coveragerunsnpm run buildfirst — it does not go through thetestscript, so it does not pick up npm'spretesthook automatically. If you touchtest:coverage, keep the explicitnpm run build &&prefix or CI's dist-smoke tests (src/index.dist.test.ts) will fail withCannot find module '../dist/bundle.cjs'.- CI (
.github/workflows/ci.yml) runstypecheck,lint, thentest:coveragedirectly. There is no separate CI step that runs plaintest, sotest:coverageis the only thing that actually exercises the en-GB locale run in CI — don't let it silently drop back to a single locale.
There is no automated versioning (no semantic-release/changesets). Releasing is manual:
-
Bump the version as part of the same PR/branch as the change, not as a separate follow-up after merge (this is the established convention — see PR #34, which merged the fix and its version bump commit together):
npm version patch --no-git-tag-version # or minor/major as appropriate git add package.json package-lock.json git commit -m "chore: bump version to X.Y.Z" git push
-
After the PR is merged to
main, tag the actual merge commit (not the PR branch's local commit — the SHA can change on squash/rebase merges) and push the tag:git checkout main && git pull origin main git tag -a vX.Y.Z -m vX.Y.Z git push origin vX.Y.ZThis step matters because
.github/workflows/release.yml's last step isgh release create "$(git describe --tags --abbrev=0)" --generate-notes— it names the GitHub Release after the nearest tag reachable frommain's HEAD. Skip pushing the tag and it reuses the previous release's tag. -
Manually trigger the Release workflow: GitHub → Actions → "Release" → "Run workflow" on
main. It runsnpm ci, fetches an npm publish token viaatlassian-labs/artifact-publish-token(already wired up, no action needed), runsnpm publish --userconfig .npmrc-public(publishes whatever version is inpackage.jsononmain— hence step 1 must land first), then creates the GitHub Release from the tag pushed in step 2.