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

Support for dot separation inside prerelease versions #2090

Closed
bhvngt opened this issue Oct 2, 2023 · 2 comments
Closed

Support for dot separation inside prerelease versions #2090

bhvngt opened this issue Oct 2, 2023 · 2 comments
Assignees
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@bhvngt
Copy link

bhvngt commented Oct 2, 2023

Is your feature request related to a problem? Please describe.

Thanks for this repo. While trying to bump version with prerelease strategy, I have noticed that the current code does not support dot separation. In the spec, dot-separation is optional. However, in practice its a fairly common format used to separate prerelease id from its version number.

For example, code currently supports following prerelease version bumps

'2.0.0-beta01': '2.0.0-beta02',

With support for dot separation, it will also support following format

'2.0.0-beta.01': '2.0.0-beta.02',
or
'2.0.0-beta.1': '2.0.0-beta.2',

This is a completely backward compatible change.

Describe the solution you'd like

I have looked through the code and with simple change in the PRERELEASE_PATTERN regexp and adding separator inside nextPrerelease in case if the separator exists, dot separation can be supported.

If the core team supports this enhancement then I can create a PR to support this change.

Describe alternatives you've considered

An alternative could be to create a separate semver v2 compliant versioning strategy. However, that will be a much bigger scope.

Additional context

While the spec supports many other formatting options. I am not too sure if any of those are part of the roadmap.

@bhvngt bhvngt added priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Oct 2, 2023
@kalosisz
Copy link
Contributor

kalosisz commented Oct 31, 2023

Hey! Look at #2083. It introduced a new pattern.

@bhvngt
Copy link
Author

bhvngt commented Nov 5, 2023

Thanks a ton @kalosisz. This should solve my problem. I will close this issue.

@bhvngt bhvngt closed this as completed Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

3 participants