The purpose of the changesets ↗ is management of versioning and changelogs with a focus on multi-package repositories.
-
Add workspace reference to
@changesets/cli
:pnpm add -w @changesets/cli
-
Initialize changesets:
pnpm changeset init
-
Add changeset entries
# Add temporary changeset entries in .changesets folder. # Entries can be safely committed until release. pnpm changeset add
-
Prerelease
# Transform temporary changeset entries into # corresponded packages versions and changelogs. pnpm changeset version
-
Release
# Review and commit package versions and changelogs git add . git commit -m "chore: release"
-
Publish (automatic)
# Publish all changed packages and add version tags to current git commit pnpm changeset publish
-
Publish (manual)
# Publish packages pnpm publish --access=public # Add version tags to current git commit pnpm changeset tag
-
Push version tags
# Review and push created version tags: git push --follow-tags