A tool to manage versioning and changelogs with a focus on monorepos
13 Sept 2019 · Newest first
Last checked
Checking sources…
Showing 1 of 1 releases. Full release notes.
Signals highlight changes worth reviewing. They cannot determine whether your application is affected.
Welcome to version 2 🎉🦋
Quickest summary of the most exciting changes:
🦋 Changesets (the written files) have a new format! They are now human readable/writeable
🦋 The config options have been completely rethought to be clearer and more concise
🦋 Changesets has been significantly decomposed, allowing an easier time building tools on top of it
We have removed command line arguments that overrwrite the config. The following commands can no longer be passed in:
updateChangelogisPublicskipCIcommitThis has been done to avoid overloading the number of ways you can pass options, as within any single repository, there should be a single consistent way in which these values are always provided.
The Changesets config is now written in JSON with fewer options. The new defaults are shown below.
{
"$schema": "https://unpkg.com/@changesets/config/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"linked": [],
"access": "private"
}
Reasoning: Having a JSON config makes it easier to build other tools on changesets because the config can be read without executing user code that could potentially be unsafe. It also means we can have easy autocompletion and descriptions in editors that don't go out of date like the comments in the JS config along with being able to packagise changelog entry generators.
yarn changeset init to create a config file in the new format at .changeset/config.jsongetReleaseLine and getDependencyReleaseLine to their own module and set the changelog option to the path to the module. If you're not using changelogs, set the changelog option to false. In the future, we will be providing packages to write changelogs for common use casesaccess to "public" if publishOptions.public is true, otherwise set it to "private"linked, copy your linked package groups from the JS config to the the JSON filecommit and skipCI in versionOptions or publishOptions, set commit to true, all commits will include a skip ci message. if you have a use case for only using commit on one command or not including a skip ci message by default, contact us and we will talk about re-implementing these features..changeset/config.jsIn addition to how these functions are defined (see changes to config), the data that is passed through to these functions is notably different to what it was before. For the most part, the changelog functions simply receive richer information, based on the new changelog format.
BREAKING: The release objects and dependency release objects now use release.newVersion for the latest
version, instead of the previous release.version.
The @changesets/types package includes exports for both GetReleaseLine as well as GetDependencyReleaseLine.
If you were using the default changelog generation scripts, you won't need to worry. Otherwise, we recommend updating
your command and manually running version to ensure you are still getting the changelogs you expect.
Looking further forward We are already aware that we want to change how people write these generation functions, including opening up more flexibility, and access to things such as the underlying release plan. This will likely require a breaking change in the future, but we thought we were changing enough this release that we didn't want too much turmoil. 😁
bump has been renamed to versionrelease has been renamed to publishThis is a reversion to the changes made in 1.0.0.
Reasoning: We switched the names because we wanted to avoid confusion with the related
tasks in npm. While technically it removed confusion that this was doing the same thing as
npm version, or npm publish, the new terms did not convey easily grokkable meanings. As
we weren't benefiting from the new names, we have decided to revert to names that have more
meaning within the community, even though these commands do slightly more than this.