muratgozel / node-calver

Calendar based software versioning library as node.js module and with cli support. 📅
MIT License
29 stars 5 forks source link

separators and modifiers #1

Closed justLuiz closed 3 years ago

justLuiz commented 4 years ago

first thanks for writing this library

I would like to know if you have any plans to support modifiers dev, alpha and support additional separators to the dot ., like - or _ or simply allow identifiers together, like YYYY0M

let me know if you need more information or prs about it

muratgozel commented 4 years ago

The only feature missing right now is the MODIFIER tags such as dev.1 or alpha.201. I'll add it to the API as soon as I have time. I think API would be similar to:

const calver = new Calver('YY.MM.MICRO-MODIFIER', '20.8.123-alpha1')
calver.inc('modifier')
calver.get() === '20.8.123-alpha2'

And if I want to switch to another pre-release tag:

calver.inc('modifier', 'beta')
calver.get() === '20.8.123-beta1'

What do you think?

muratgozel commented 3 years ago

Modifier tags are now supported as of release 21.1.0. The api is not exactly the same as I mentioned above but similar. Please see readme.