Skip to content

Commit fa2b5ac

Browse files
leogclaude
andcommitted
chore: add standard-version for automated releases
- Add release scripts (release, release:minor, release:major, release:dry-run) - Add .versionrc for changelog customization - Update CONTRIBUTING.md with release workflow Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 895794a commit fa2b5ac

4 files changed

Lines changed: 1905 additions & 24 deletions

File tree

.versionrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"types": [
3+
{ "type": "feat", "section": "Features" },
4+
{ "type": "fix", "section": "Bug Fixes" },
5+
{ "type": "docs", "section": "Documentation" },
6+
{ "type": "style", "section": "Styling", "hidden": true },
7+
{ "type": "refactor", "section": "Code Refactoring", "hidden": true },
8+
{ "type": "perf", "section": "Performance" },
9+
{ "type": "test", "section": "Tests", "hidden": true },
10+
{ "type": "chore", "section": "Maintenance", "hidden": true }
11+
]
12+
}

CONTRIBUTING.md

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,48 @@ npm run test:coverage
9696

9797
## Commit Messages
9898

99-
Use clear, descriptive commit messages:
99+
We use [Conventional Commits](https://www.conventionalcommits.org/) for automatic changelog generation. Use these prefixes:
100+
101+
- `feat:` - New features (appears in changelog)
102+
- `fix:` - Bug fixes (appears in changelog)
103+
- `docs:` - Documentation changes (appears in changelog)
104+
- `perf:` - Performance improvements (appears in changelog)
105+
- `test:` - Adding/updating tests (hidden from changelog)
106+
- `chore:` - Maintenance tasks (hidden from changelog)
107+
- `refactor:` - Code refactoring (hidden from changelog)
108+
109+
Examples:
100110

101111
- `feat: add --verbose flag`
102112
- `fix: correct error message for missing lockfile`
103113
- `docs: update README with troubleshooting section`
104-
- `test: add tests for version flag`
105-
- `chore: update dependencies`
114+
115+
## Releasing (Maintainers)
116+
117+
We use [standard-version](https://github.com/conventional-changelog/standard-version) for automated versioning and changelog generation.
118+
119+
```bash
120+
# Preview what will happen
121+
npm run release:dry-run
122+
123+
# Create a release (auto-determines version bump from commits)
124+
npm run release
125+
126+
# Force a minor version bump
127+
npm run release:minor
128+
129+
# Force a major version bump
130+
npm run release:major
131+
132+
# Push tags and publish
133+
git push --follow-tags origin main
134+
npm publish
135+
```
136+
137+
The release script will:
138+
1. Bump the version in `package.json` based on commits
139+
2. Update `CHANGELOG.md` automatically
140+
3. Create a git commit and tag
106141

107142
## Questions?
108143

0 commit comments

Comments
 (0)