pnpm add -Dw @changesets/cli
pnpm changeset init
pnpm changeset
then, you'll see the changeset's cli for updating version.
pnpm changeset version
set the selected package's version, update CHANGELOG.md
.
pnpm install
update the lockfile and rebuild packages.
If you don't wanna publish it (like me ๐ญ) You might run additional command for generating version tag.
It is possible to input the command line below.
pnpm changeset tag
Changesets are generated by the yarn changeset
or npx changeset
command. As long as you are following a changeset release flow, you shouldn't have any problems.
We use random human readable names by default for these files to avoid collisions when generating them, but there's no harm that will come from renaming them.
When changeset version
or equivalent command is run, all the changeset folders are removed. This is so we only ever use a changeset once. This makes this a very bad place to store any other information.
The two parts of the file are for different purposes. You should feel free to edit both parts as much as you want.
- The markdown text is a summary of the changes that will be prepended to your changelog when you next run your version command.
- The YAML front matter describes what should be versioned by the version command
Editing the summary or package bump types is completely safe. You can even write changesets without the command if you want.
You can, but you should be aware this will remove the intent to release communicated by the changeset, and should be done with caution.
changesets now provides @changesets/action@v1, which creates a pull request with all of the package versions updated and changelogs updated and when there are new changesets on your configured baseBranch, the PR will be updated.
see: Changesets Release Action
and pnpm also provides workflow code: Using Changesets with pnpm
if you write workflow correctly, then PR is automatically created. LIKE THIS BELOW:
when you update changeset version, then changeset will update PR