# Contributing ## Development ```sh pnpm install pnpm test pnpm build ``` Use `pnpm version patch/minor/major` to release — it runs lint, format, types, tests and build, regenerates CHANGELOG.md with git-cliff, then pushes the version tag which triggers the publish workflow. `docs/img/dataflow.svg` is generated from `docs/img/dataflow.dot` and committed, since GitHub does not render DOT. If you edit the `.dot`, re-render it in the same commit: ```sh dot -Tsvg docs/img/dataflow.dot -o docs/img/dataflow.svg ``` No automated check catches this — graphviz is not a dependency and different versions emit different SVG bytes, so a staleness check would fail on toolchain drift rather than on a stale diagram. ## Publishing Releases publish automatically via GitHub Actions using npm trusted publishing (OIDC, no stored token). The workflow requires `--provenance` and `id-token: write` permissions. There is deliberately no `prepublishOnly` script: `preversion` gates the local side and the publish job's `needs: test` gates CI, so adding one just runs lint/test/build a third time per release. This repo is already configured. To set up a new package: `npm trust github --file publish.yml --repo GMOD/` (requires npm >=11.10.0 and 2FA). Once npm publish succeeds, the `release` job creates the GitHub release for the tag, taking its notes from that version's CHANGELOG.md section — which `scripts/release-notes.sh` extracts, so run that with a version to preview a release's notes.