keep-a-changelog icon indicating copy to clipboard operation
keep-a-changelog copied to clipboard

ERROR Missing section for previous release in CHANGELOG.md with no increment option

Open WirthAware opened this issue 2 years ago • 3 comments

We updated recently to the latest release-it version and keep-it-changelog version. We have an release job in our CI todo automated Gitlab release with release-it but after the update we got an error.

We are using an internal company release versioning, so we use release it with the --no-increment version and use the version from our package.json instead. Verything was working with those versions:

"@release-it/keep-a-changelog": "2.3.0",
"release-it": "14.12.1",

With the latest version we got the following Error

ERROR Missing section for previous release ("12.0.0") in CHANGELOG.md.

In our package.json the version is version": "12.0.0 in that example.

So we have an Unreleased section in our changelog and the last versions in our changelog. But it seems keep a changelog thought there should be a last version 12.0.0 but it is the current version that needs to be released.

We had a look into the code on github and tried to debug this. And its working with increment option. When when setting the --no-increment its not working. Looking into the code we found some conditions and i guess it seems there is a bug. Also what we noticed in the config object lastVersion is given with isIncrement option but with no increment option last version is not passed into config object. Maybe you could have a look into it ? We reverted the update but would be great to be able to update and use latest features.

Cheers

WirthAware avatar Oct 13 '22 14:10 WirthAware

@WirthAware , have you found any fix for that? I got the same error msg

yusuf963 avatar Nov 23 '23 00:11 yusuf963

@WirthAware , it seems that the fix for this error is to add "strictLatest": false, to the @release-it/keep-a-changelog plugin object

yusuf963 avatar Nov 23 '23 01:11 yusuf963

A bit late to the party, but is the issue resolved with @yusuf963's suggestion, @WirthAware?

webpro avatar Feb 15 '24 07:02 webpro

Closing due to inactivity.

webpro avatar Oct 08 '24 05:10 webpro