- Fork the repository and clone your fork
- Create a feature branch:
git checkout -b feature/my-feature - Install dependencies:
bun install(ornpm install) - Make your changes
- Run local checks:
bun run check - Create a changeset:
bun run changeset - Commit and push (pre-commit hooks will run automatically)
- Create a Pull Request
Maximum 1000 lines per file (enforced via ESLint).
This benefits both AI and human developers by ensuring files remain readable and maintainable.
All code must pass:
# Check formatting
bun run format:check
# Check linting
bun run lint
# Run all checks
bun run checkThe pre-commit hook runs automatically, but you can also manually format and fix:
# Auto-fix formatting
bun run format
# Auto-fix lint issues
bun run lint:fixTests should:
- Cover critical paths
- Work across all runtimes (Node.js, Bun, Deno)
- Use the test-anywhere framework
# Run tests
bun test
npm test
deno test --allow-readThis project uses Changesets to manage versions and changelogs. This eliminates merge conflicts that occur when multiple PRs bump the version in package.json.
When you make changes that affect users, add a changeset:
bun run changeset
# or
npm run changesetThis will prompt you to:
- Select the type of change (patch/minor/major)
- Provide a summary of the changes
The changeset will be saved as a markdown file in .changeset/ and should be committed with your PR.
| Type | When to Use | Examples |
|---|---|---|
| Patch | Bug fixes, internal changes | Fix typo, update dependency, refactor internal code |
| Minor | New features, non-breaking additions | Add new function, new optional parameter |
| Major | Breaking changes | Remove function, change API signature |
Example changeset summary:
Add support for custom configuration via config fileRequired for:
- Bug fixes
- New features
- Breaking changes
- Public API changes
Not required for:
- Documentation-only changes (in
./docsfolder) - Changes to markdown files
- CI/CD workflow updates (unless they affect users)
The release process is fully automated:
- PR with changeset merged - The changeset is added to
.changeset/ - CI detects changesets - On push to main, CI checks for pending changesets
- Version bump - Package version is updated based on changeset type
- Changelog update -
CHANGELOG.mdis updated automatically - npm publish - Package is published via OIDC trusted publishing
- GitHub Release - A release is created with formatted notes
If multiple PRs are merged before a release:
- All changesets are merged into one
- The highest version bump type wins (major > minor > patch)
- All descriptions are preserved in chronological order
Use a clear, descriptive title that summarizes the change:
feat: Add support for custom configuration
fix: Resolve race condition in async handler
docs: Update API documentation for v2
Include:
- What - Describe the change
- Why - Explain the motivation
- Testing - How the change was tested
All PRs must pass:
- Changeset validation (for code changes)
- Lint and format check
- Tests on all platforms (Ubuntu, macOS, Windows)
- Tests on all runtimes (Node.js, Bun, Deno)
The CI workflow automatically:
- Merges the latest
maininto your PR branch - Runs checks against the merged state
If this fails with merge conflicts, you need to:
git fetch origin main
git merge origin/main
# Resolve conflicts
git pushIf you have questions about contributing, feel free to open an issue for discussion.