Overview
Changesets provides:- Semantic versioning: Automatically bump versions based on change types
- Changelog generation: Create CHANGELOG.md from changeset descriptions
- Coordinated releases: Publish multiple packages together
- CI automation: Automated publishing via GitHub Actions
Creating a Changeset
When you make changes that affect users, create a changeset:1
Run the changeset command
From the repository root:
2
Select the package
Choose which package(s) are affected (usually
@tailor-platform/app-shell):3
Choose version bump type
Select the semantic version bump:
- patch: Bug fixes (0.27.1 → 0.27.2)
- minor: New features (0.27.1 → 0.28.0)
- major: Breaking changes (0.27.1 → 1.0.0)
4
Describe the changes
Write a clear description of what changed. This will appear in:
- CHANGELOG.md
- GitHub Release notes
- npm release page
.changeset/ with a random name like cool-pandas-jump.md.
Changeset File Format
A changeset file looks like this:- Frontmatter: Package name and version bump type
- Description: What changed (supports markdown)
When to Create Changesets
DO Create Changesets For:
New Features
New Features
New components, hooks, or utilities that users can use:
Breaking Changes
Breaking Changes
Changes that require users to update their code:After:
DO NOT Create Changesets For:
- Internal refactoring that doesn’t change behavior
- Removing unused dependencies
- Build/dev tooling changes
- Test-only changes
- Code style/formatting changes
- Internal type changes that don’t affect public API
Publishing Workflow
The full release workflow:1
Make changes and create changeset
2
Open pull request
Create a PR to
main from your feature branch. The changeset file will be reviewed along with your code.3
Merge to main
Once approved, merge your PR. The changeset bot will:
- Detect the new changeset
- Create/update a “Version Packages” PR
4
Review version PR
The bot’s PR will:
- Update version in
package.json - Generate CHANGELOG.md entries
- Remove the changeset file
5
Merge version PR to publish
When you merge the “Version Packages” PR:
- CI builds the packages
- Publishes to npm automatically
- Creates a GitHub Release
Manual Publishing
Maintainers can manually publish if needed:Writing Good Changeset Descriptions
Include Code Examples
For new features or API changes, show how to use them:Troubleshooting
Changeset Not Detected
Ensure the changeset file is:- In the
.changeset/directory - Committed to git
- Has valid frontmatter format
Version PR Not Created
Check that:- The changeset file was merged to
main - GitHub Actions workflow is enabled
- No existing “Version Packages” PR is open
Publish Failed
Verify:- NPM credentials are configured in CI
- Package builds successfully (
pnpm build) - Version number doesn’t already exist on npm