Changesets is the versioning and changelog tool that powers major open-source projects like Pnpm, SvelteKit, and Radix UI. If you're manually bumping versions, you're wasting time.
What is Changesets?
Changesets automates version management and changelog generation for monorepos and single packages. Each PR includes a changeset file describing what changed and how.
The Free APIs You're Missing
1. CLI — Interactive Version Management
# Add a changeset (interactive)
npx changeset
# What it creates: .changeset/fuzzy-lions-dance.md
---
"@myorg/ui": minor
"@myorg/utils": patch
---
Added new Button variant and fixed utility type exports.
Each changeset is a markdown file. Reviewable in PRs. No version conflicts.
2. Version Command — Automatic Semver Bumps
npx changeset version
This reads all pending changesets, calculates the correct version bump for each package (respecting dependencies), updates package.json files, generates CHANGELOG.md entries, and deletes consumed changeset files.
3. GitHub Action — Automated Release PRs
# .github/workflows/release.yml
name: Release
on:
push:
branches: [main]
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: changesets/action@v1
with:
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Automatic "Version Packages" PR on every merge to main. One-click release.
4. Pre-Release Mode — Beta/RC Channels
npx changeset pre enter beta
# Now all version bumps become: 1.0.0-beta.0, 1.0.0-beta.1...
npx changeset version # Bumps to beta versions
npx changeset publish # Publishes to npm with beta tag
npx changeset pre exit # Back to normal releases
5. Config — Fine-Grained Control
// .changeset/config.json
{
"changelog": ["@changesets/changelog-github", { "repo": "org/repo" }],
"commit": false,
"fixed": [["@myorg/ui", "@myorg/theme"]],
"linked": [["@myorg/react-*"]],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["@myorg/docs"]
}
- fixed: Packages always share the same version
- linked: Packages bump together but can have different versions
- ignore: Skip packages from versioning
Getting Started
npm install @changesets/cli
npx changeset init
Need data from any website delivered as clean JSON? I build production web scrapers that handle anti-bot, proxies, and rate limits. 77 scrapers running in production. Email me: Spinov001@gmail.com
Check out my awesome-web-scraping list for the best scraping tools and resources.
Top comments (0)