conventional-changelog icon indicating copy to clipboard operation
conventional-changelog copied to clipboard

PreRelease with conventional changelog behaves unexpectedly

Open Blackclaws opened this issue 1 year ago • 1 comments

When using conventional changelog together with a prerelease branch it behaves unexpectedly.

Expectation

Commits on pre-release branch + Message + Expected Versions:

Start - N/A - 1.0.0
A - fix: fix something - 1.0.1-dev.0
B - fix: fix something - 1.0.1-dev.1
C - feat: new feature - 1.1.0-dev.0
D - fix: fix something - 1.1.0-dev.1 

Especially note the step from B -> C and C -> D.

Once we've incremented the minor version once from the base branch I expect that patch version no longer increments no matter what other fixes are pushed.

Reality

Without strictSemVer: true

Start - N/A - 1.0.0
A - fix: fix something - 1.0.1-dev.0
B - fix: fix something - 1.0.1-dev.1
C - feat: new feature - 1.0.1-dev.2
D - fix: fix something - 1.0.1-dev.3 

With strictSemVer: true

Start - N/A - 1.0.0
A - fix: fix something - 1.0.1-dev.0
B - fix: fix something - 1.0.2-dev.0
C - feat: new feature - 1.1.0-dev.0
D - fix: fix something - 1.1.1-dev.0

Both are wrong. Without strictSemVer I don't get an increase in the minor number on a feature and with it I get increases in the minor number and patch numbers all the time.

Blackclaws avatar May 29 '24 17:05 Blackclaws

Any update on this?

JMMarchant avatar Jul 25 '24 14:07 JMMarchant

Thanks @Blackclaws, @micaelmbagira's PR has been released in v8.0.2-next.0, feel free to try it out. Would love to get your feedback before releasing v8.0.2.

webpro avatar Aug 25 '24 12:08 webpro

@webpro thanks for merging! I've just run some tests and it does work as expected. Also in the last few weeks, I was using this branch in another project and it's worked well 👌

micaelmbagira avatar Aug 25 '24 12:08 micaelmbagira

This should be fixed in v8.0.2, thanks for your patience everyone.

webpro avatar Sep 11 '24 19:09 webpro