CreateChangeFile
Create a change file interactively. Creates the .changeset
directory if missing.
Example
With a knope.toml
file that looks like this:
You could run knope document-change
to start a new change file.
First, Knope will prompt you to select the packages that this change affects.
For this example, we check off both packages.
For each package, Knope will prompt you to select the type of change you’re documenting.
The available change types are major
, minor
, patch
, and any of the custom types configured in extra_changelog_sections.types
.
For the first
package, this will look like:
For the second
package, there wouldn’t be the poem
option.
Next, Knope will prompt you to write a short summary of the change (a few words).
The summary will become both the name of the file and a header in the changelog generated by PrepareRelease
.
If the summary is `[i carry your heart with me(i carry it in]`, this step will then generate a file .changeset/i_carry_your_heart_with_mei_carry_it_in.md
with the following contents:
If that brief summary isn’t enough, you should then edit this file and add more detail below the generated heading, using all the Markdown features you want!
When you are done, you can run knope document-change
again to create another change file.
When you are ready to release, run PrepareRelease
to combine all the change files and conventional commits into a changelog and update the versions of any configured packages. The type of the change for each package will decide where it’s placed in the changelog: so first/CHANGELOG.md
will have a ### Poems 🎭
section and second/CHANGELOG.md
will have a ### Breaking Changes
section, each containing the summary and body of the change.
For completeness, this is what the changelog for first
would look like (if there had been no other changes):