Changeset Format
Detailed reference for changeset file format.
Overview
Changesets are Markdown files with YAML front matter that describe version bumps for packages. They are stored in the .changes or .changesets directory.
File Structure
.changes/
├── config.toml
└── add-awesome-feature.md # One changeset per file
Changeset File Format
---
semifold: minor
my-library: patch:fix
---
Add awesome new feature to semifold and fix bug in my-library
Components
--- - YAML document start marker
- Front matter - Package bump specifications
--- - Front matter separator
- Summary - Markdown description of changes
Front Matter Format
Basic Format
With Tag
package-name: bump-level:tag
Multiple Packages
---
package-a: major
package-b: minor
package-c: patch:feat
---
Summary of changes affecting all three packages
Bump Levels
| Level |
SemVer |
Description |
major |
X.Y.Z → X+1.0.0 |
Breaking changes |
minor |
X.Y.Z → X.Y+1.0 |
New features |
patch |
X.Y.Z → X.Y.Z+1 |
Bug fixes |
Tags
Tags categorize changesets for changelog generation. Tags must be defined in config.toml:
[tags]
feat = "New Features"
fix = "Bug Fixes"
chore = "Chores"
refactor = "Refactors"
perf = "Performance Improvements"
Using Tags
---
my-package: minor:feat
---
Add new API endpoint
When no tag is specified, the default label is "Changes".
Examples
Feature Release
---
my-app: minor
my-utils: patch
---
Add dark mode support and fix timezone bug
Breaking Change
---
api-client: major:feat
---
Complete rewrite of API client with new interface
Bug Fix Release
---
utils: patch:fix
---
Fix memory leak in cache implementation
Multiple Changes
---
core: minor:feat
cli: minor:feat
docs: patch:chore
---
Add interactive CLI mode and update documentation
Changeset Naming
Changeset filenames should be unique and descriptive:
.changes/
├── add-dark-mode.md
├── fix-timezone-bug.md
├── rewrite-api-client.md
└── improve-cache-performance.md
Naming Rules
- Must be unique (no duplicate filenames)
- Lowercase letters, numbers, and hyphens only
- No spaces or special characters
- Should describe the change briefly
How Changesets Work
Creation
- Run
smif commit to create a changeset interactively
- Or manually create a
.md file with proper format
Processing
smif version reads all changesets
- Determines bump level for each package (highest wins)
- Updates package versions
- Generates changelog entries
- Deletes processed changesets
Bump Level Priority
When multiple changesets affect the same package:
| Changeset A |
Changeset B |
Final Bump |
| patch |
patch |
patch |
| patch |
minor |
minor |
| minor |
patch |
minor |
| minor |
major |
major |
| patch |
major |
major |
Changelog Generation
The smif version command generates changelogs based on:
- Changesets affecting each package
- Tags defined in config
- Git history (commit hashes, PR info)
Example generated changelog:
## v1.2.0
### New Features
- [`abc1234`](https://github.com/owner/repo/commit/abc1234): Add dark mode support (#45)
### Bug Fixes
- [`def5678`](https://github.com/owner/repo/commit/def5678): Fix timezone bug (#46)
See Also