Affected Packages
@changesets/apply-release-plan
Problem
We currently use our own changelog generator package (@remix-run/changelog-github). The workflow is pretty good overall, but because we version all of our packages in lockstep there are occasionally releases in some packages that don't have any changes, so I need to manually update those release notes prior to committing.
There are only two possible hooks into the generator: one for formatting dependency updates and another for individual changeset lines. I'd like to add a completely new changelog message for empty releases instead of having the generator insert a version heading without content.
Proposed solution
Modify the getChangelogEntry function to allow changelog generators to provide their own getChangelogEntry method.
async function generateChangesForVersionTypeMarkdown(
obj: ChangelogLines,
type: keyof ChangelogLines
) {
// ...
if (typeof changelogFuncs.getChangelogEntry === "function") {
return changelogFuncs.getChangelogEntry(
release,
changelogLines,
changelogOpts
);
}
// otherwise just do what you already do, no breaking change needed
return [
`## ${release.newVersion}`,
await generateChangesForVersionTypeMarkdown(changelogLines, "major"),
await generateChangesForVersionTypeMarkdown(changelogLines, "minor"),
await generateChangesForVersionTypeMarkdown(changelogLines, "patch"),
]
.filter((line) => line)
.join("\n");
}
If there is interest in this solution, I'd be more than happy to submit a PR.
Affected Packages
@changesets/apply-release-planProblem
We currently use our own changelog generator package (
@remix-run/changelog-github). The workflow is pretty good overall, but because we version all of our packages in lockstep there are occasionally releases in some packages that don't have any changes, so I need to manually update those release notes prior to committing.There are only two possible hooks into the generator: one for formatting dependency updates and another for individual changeset lines. I'd like to add a completely new changelog message for empty releases instead of having the generator insert a version heading without content.
Proposed solution
Modify the
getChangelogEntryfunction to allow changelog generators to provide their owngetChangelogEntrymethod.If there is interest in this solution, I'd be more than happy to submit a PR.