Skip to content

Add ability to parse version without 3 increments (x.y.z) - #49

Closed
famaridon wants to merge 4 commits into
zafarkhaja:masterfrom
vdoc-community:feature/compatibility-strategies
Closed

Add ability to parse version without 3 increments (x.y.z)#49
famaridon wants to merge 4 commits into
zafarkhaja:masterfrom
vdoc-community:feature/compatibility-strategies

Conversation

@famaridon

@famaridon famaridon commented Mar 11, 2019

Copy link
Copy Markdown

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.

@famaridon
famaridon marked this pull request as ready for review March 18, 2019 16:21
@heisluft

Copy link
Copy Markdown

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
zafarkhaja self-requested a review April 13, 2023 05:39
@zafarkhaja

Copy link
Copy Markdown
Owner

Looks like just a different approach to the same functionality as in #29.

@zafarkhaja zafarkhaja added this to the 0.10.0 milestone Apr 13, 2023
@zafarkhaja

Copy link
Copy Markdown
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,

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

Successfully merging this pull request may close these issues.

4 participants