12.6K ·GitHub
What is this?
Changesets is a tool that manages versioning and changelogs for JavaScript/TypeScript projects, with a focus on monorepos. Contributors declare how their changes should be released, and Changesets handles bumping package versions, writing changelogs, and publishing.
Is this a CLI tool or a library I import into code?
It is a CLI/npm package added as a dev dependency to your repo (not a library you import into app code). You run its commands via npm/pnpm/yarn scripts to add changesets, version packages, and publish.
How do I add this to a project?
Install it as a dev dependency and run its init command to set up the .changeset folder and config, then use the `changeset` command whenever you make a change that needs a version bump.
Do I need a monorepo tool like pnpm workspaces or Lerna first?
No specific monorepo tool is required, but Changesets is built specifically to solve versioning problems in monorepos with interdependent packages, and it also works fine for single-package repos.
Is the main branch stable to use right now?
The main branch is active development for Changesets v3; if you need the stable v2 behavior, you should use the maintenance/v2 branch instead.
Is this only useful for open-source npm packages?
It's aimed at any JS/TS project managing releases, especially repos with multiple interdependent packages, but the workflow is also described as beneficial for single package repos.
How does a changeset actually work day to day?
When you make a change that should trigger a release, you run the changeset command, pick which packages are affected and whether it's a major/minor/patch bump, and write a short summary. That markdown file gets committed with your PR and later consumed to bump versions and generate changelogs.
Does it handle publishing to npm too?
Yes, Changesets covers the whole flow through to publishing, not just version bumping and changelog generation.
Why would I use this instead of manually bumping versions?
In a monorepo with interdependent packages, manually tracking which packages need a version bump and keeping dependents in sync is error-prone; Changesets automates that coordination across the whole package graph.
What are similar projects?
lerna, commitlint, semantic-release, renovate, git-extras, upm, epiq, pnpm
Which topics is it in?
changelog, version-control, package-manager, monorepo, devops, command-line-tool, npm, automation, nodejs, typescript, cli, cross-platform