Publish monorepo packages with Changesets
Riley Tomasek
Changesets makes it easy to publish public and/or private packages to NPM from a monorepo.
Features
- Specify packages in a monorepo to publish
- Update package version numbers
- Append to changelogs
- Create git tags for the release
- Publish to NPM
Usage Commands
changeset addspecifies which packages to releasechangeset versionupdates package versions and changelogschangeset publishadds a git tag and publishes to NPM
Usage Notes
- Adding
private: trueto a package.json will prevent it from being published to NPM - Use
publishConfigin package.json when publishing scoped packages (@acme/xxx) withpublicfor publicly available packages andrestrictedfor private packages. - The Changesets GitHub Action with the Changeset GitHub Bot will create a PR after a PR with a changeset has been merged. Merging the PR created by Changeset automations will publish to NPM, update Git tags, and create a GitHub release.