At the time of writing this documentation, the latest pnpm version was v5.17.3. The latest Changesets version was v2.14.1.
To setup changesets on a pnpm workspace, install changesets as a dev dependency in the root of the workspace:
Then changesets' init command:
To generate a new changeset, run
pnpx changeset in the root of the repository.
The generated markdown files in the
.changeset directory should be committed
to the repository.
pnpx changeset version. This will bump the versions of the packages previously specified with
pnpx changeset(and any dependents of those) and update the changelog files.
pnpm install. This will update the lockfile and rebuild packages.
- Commit the changes.
pnpm publish -r. This command will publish all packages that have bumped versions not yet present in the registry.
To automate the process, you can use
changeset version with GitHub actions.
In a nutshell, the action will detect new changesets on the
apply them, commit the updated metadata and changelogs, and open a Pull Request.
You could also publish your packages automatically.
More info and documentation regarding this action can be found here.