Thanks for your interest in contributing! This guide covers the basics.
Open a bug report issue with:
- Steps to reproduce
- Expected vs actual behavior
- Node version and OS
Open a feature request issue describing the use case and proposed solution.
Releases are cut by maintainers. The publish workflow fires automatically when a GitHub release is published.
Prerequisites (one-time repo setup):
- Create an npm access token with publish permissions at npmjs.com.
- Add it as a repository secret named
NPM_TOKENunder Settings → Secrets and variables → Actions.
Release steps:
- Merge all changes to
main— CI must be green. - Move items from
## UnreleasedinCHANGELOG.mdto a new## x.y.z - YYYY-MM-DDentry and commit. - Create a GitHub release:
- Tag:
vx.y.z(e.g.v0.2.0), targetingmain - Title:
vx.y.z - Body: paste the changelog entry for this version
- Tag:
- Publishing the release triggers the
publish.ymlworkflow, which runs the full quality gate and then publishes to npm with provenance attestation.
Verify:
npm view snapdrift@x.y.zSnapDrift workflow examples reference public release tags for readability. If your organization requires immutable pins, resolve the tag to a commit SHA and pin that instead.
# Clone the repo
git clone https://github.com/ranacseruet/snapdrift.git
cd snapdrift
# Install dependencies
npm ci
# Install Playwright browsers (needed for capture tests)
npx playwright install --with-deps chromium# Run the main local quality gate
npm run ci
# Lint source and tests
npm run lint
# Type-check JSDoc-annotated production code
npm run typecheck
# Validate composite action metadata
npm run validate:actions
# Run the full test suite
npm test
# Run the suite with coverage enforcement
npm run test:coverage
# Run a single test file
NODE_OPTIONS='--experimental-vm-modules' npx jest tests/snapdrift-smoke.test.jsThe six test files in tests/ cover config validation, capture, compare, staging, PR comment generation, and action contract integrity. Tests are unit-level — they do not run Playwright or require a live app.
- Fork the repo and create a branch from
main. - Make your changes.
- Add or update tests to cover the change.
- Run the test suite and confirm everything passes.
- Update documentation if your change affects contracts, inputs/outputs, or behavior.
- Update
CHANGELOG.mdunder an## Unreleasedsection. - Open a pull request.
- Keep PRs focused — one concern per PR.
- Follow existing code style (ESM, no transpilation, JSDoc types).
- Keep docs, generated report copy, and action metadata aligned with the SnapDrift brand voice.
- Add a clear description of what changed and why.
- ESM modules (
.mjs) withtype: "module"in package.json - JSDoc type annotations referencing
types/visual-diff-types.d.ts - No transpilation or bundling — runs directly on Node >= 22
- Composite GitHub Actions with inline shell or
actions/github-script
By contributing, you agree that your contributions will be licensed under the MIT License.