Add ability to parse version without 3 increments (x.y.z) - #49
Closed
famaridon wants to merge 4 commits into
Closed
Conversation
famaridon
marked this pull request as ready for review
March 18, 2019 16:21
|
The original project is stale as of 2015. My Fork has that and other features implemented. |
heisluft
added a commit
to AntiLaby/jsemver
that referenced
this pull request
Mar 24, 2019
zafarkhaja
self-requested a review
April 13, 2023 05:39
Owner
|
Looks like just a different approach to the same functionality as in #29. |
Owner
|
Hello @famaridon, I hope you're doing well! I'm sorry it took me this long to get back to you. I appreciate you taking the time and effort to contribute. I totally understand the use case and the need for this functionality but unfortunately, as I've said on numerous occasions elsewhere, I'm not willing to deviate from the Specification in the default parser. I still am planning to support this in some future release, but with a separate parser. Have a nice day, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
I have added the ability to parse non-fully compatible versions like 1.0-SNAPSHOT because in our project we would like to use SemVer. But we have some legacy versions and we need to support them (while converting them to SemVer).
I added 3 methods parseCompatibleSemVer because parseValidSemVer should have valid input like the method explicitly says.
I added default strategies to handle missing increments with a replacement by 0 or an exception thrown. This allow to use customs strategies like log WARN and default with 0.