At the time of writing this documentation, the latest pnpm version was v6.3.0. The latest Changesets version was v2.16.0.
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.
The action will detect when changeset files arrive in the
main branch, the action will open a new PR listing all the packages with bumped versions. Once merged, the packages will be updated and you can decide whether to publish or not by adding the
publish: pnpm ci:publish which is a script that executes
will publish to the registry once the PR is opened by
More info and documentation regarding this action can be found here.