Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 22 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

## Development Workflow

1. Create a feature branch from `main`
2. Make your changes with conventional commits
3. Push and create a Pull Request
4. CI runs tests, linting, and type checking
5. After approval, rebase and merge to `main`
6. Semantic Release automatically creates a new version
1. Run `pnpm install` to install dependencies and set up Git hooks via Husky
2. Create a feature branch from `main`
3. Make your changes with conventional commits
4. Push and create a Pull Request
5. CI runs tests, linting, and type checking
6. After approval, rebase and merge to `main`
7. Semantic Release automatically creates a new version

## Commit Convention

Expand All @@ -18,6 +19,20 @@ Use conventional commits for automatic versioning:
- `feat!:` or `BREAKING CHANGE:` - Breaking change (major version)
- `docs:`, `chore:`, `test:` - No version bump

## Husky setup

This project relies on Husky for Git hooks. Husky is installed as a dev dependency, so
the hooks have to be configured locally:

- `pnpm install` (or `npm install`) runs the `prepare` lifecycle script, which invokes
Husky and writes the hooks into `.git/hooks`.
- The `prepare` script also runs automatically before `pnpm publish`, `pnpm pack`, and
when installing the project from a Git URL. This ensures the hooks are present for
contributors and before release builds are created.
- Unlike `postinstall`, `prepare` is skipped for consumers installing the published
package from the npm registry. That keeps end users from needing Husky (or other dev
tooling) in their production environments.

## Code Quality

All code must pass:
Expand All @@ -32,4 +47,4 @@ All code must pass:
- Keep changes focused and atomic
- Ensure all CI checks pass
- Request review from maintainers
- Rebase before merging to maintain linear history
- Rebase before merging to maintain linear history
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"bench:gc": "node --expose-gc node_modules/.bin/tsx benchmark/index.ts",
"bench:watch": "tsx watch benchmark/index.ts",
"prepare": "husky",
"postinstall": "husky",
"prepublishOnly": "pnpm build",
"release": "semantic-release"
},
Expand Down