Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
agarat opened this issue Mar 27, 2023 · 1 comment

Comments

@agarat
Copy link

agarat commented Mar 27, 2023

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!

@muratgozel
Copy link
Owner

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants