Plugin to facilitate integration of changesets with release-it
npm install changesets-release-it-plugin> [!WARNING]
> This plugin is highly experimental, use at your own risk
>
> In particular, only certain monorepo configurations are supported
The idea of this plugin is to combine the excellent changelog management from changesets with the
nice and simple release management of release-it.
My main gripe with changesets is their over-reliance on the provided github action to perform vital steps such as github releases.
I like the semi-manual approach that release-it takes, this makes the CI setup simpler as it can just focus on building the git tags.
This plugin essentially lets changesets generate the changelog and bump the package version, using changeset version, and then hands off to release-it for
the remaining steps, using the parsed changelog and version that changesets decided on.
The changelog parsing is lifted verbatim from the changesets github action.
```
npm install --save-dev changesets-release-it-plugin
call.`
"plugins": {
"changesets-release-it-plugin": {}
}
"npm": {
"ignoreVersion": true,
"allowSameVersion": true
}
`Monorepos
Due to the way that release-it handles tagging and releasing it is only possible to support very constrained monorepo version configurations.
There are two options that should work (it's also possible that a combination will work):
$3
For this set-up you will need to set the same version number in the
package.json of each package in the workspace.
You then need to change your changesets configuration to have all of your packages in the fixed array.Whenever you run release-it, all of the packages will be released with the new, same version number, each with their own changelog.
There will be one tag created with the new version number.
$3
If you have only one package in your workspace that you want to release, you can instead just version that and ignore the others.
You need to remove the version number from the
package.json of all but the versioned package and add the non-versioned package names to the ignore` array in the changeset configuration.When you run release-it, you'll get a tag of the new version and any linked dependencies will be updated but there will be no changelog for the non-versioned packages.