node-calver icon indicating copy to clipboard operation
node-calver copied to clipboard

Modifier gets set to -1 when bumping calendar and minor for a previous month version.

Open agarat opened this issue 2 years ago • 1 comments

Hi, When I pass increment as calendar.minor.rc to a previous month version without the modifier, the modifier gets set to -1. I'm not sure if maybe I'm trying something unusual here. I would expect that the following command gives me 2023.3.0-rc.0.

> const calver = await require('calver')
undefined
> calver.inc("yyyy.mm.minor", "2023.2.2", "calendar.minor.rc")
'2023.3.0-rc.-1'

If I try setting increment as calendar.rc, it keeps the minor:

> calver.inc("yyyy.mm.minor", "2023.2.2", "calendar.rc")
'2023.3.2-rc.0'

Is there a way that I can bump from a version without modifier (with date from a previous month), and get minor=0 and rc=0?

Thanks!

agarat avatar Mar 27 '23 19:03 agarat

Hi @agarat thanks for pointing out these issues, i have updated the package and fixed these. Could you share if you are satisfied or not with the most recent update?

muratgozel avatar Apr 02 '23 14:04 muratgozel