You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
release-start.yml fails when only changes/ fragments exist on a published version #714
Found while fixing #706 in cli-base's own bin/release (#713). The shared workflow .github/workflows/release-start.yml has the same two gaps.
1. Only fragments, no Unreleased section, on a published version: the release fails.
When npm already has the version in package.json, renumber swaps \n## <unreleased>\n for the new heading. With no ## Unreleased section (every entry is in changes/ fragments), the swap throws CHANGELOG.md has no "## Unreleased" to raise …, so a CLI that uses only fragments cannot release. The fix in #713: give the new version a new empty section above the published one, and let changelog fragments --collect fill it. Refuse only when there are no fragments and no Unreleased entry.
2. A published x.0.0 is followed by a major. next-version keeps the level of the version it is given, so a published 1.0.0 with one fix asks for 2.0.0, and the run stops at the --major check. The fix in #713: start from the published version's next patch, and let changelog level raise it only when the entries need more. So 1.0.0 with a fix gives 1.0.1, and 1.0.0 with an Added gives 1.1.0.
Also worth taking from #713: check both files before writing either, and refuse an empty Unreleased section.
Test model: scripts/release.test.ts in #713. It runs the release against a local git origin, with fake npm and gh.
Activity