Skip to content

(not semver) add two match model for '~' and '^' - #25

Closed
chinakids wants to merge 4 commits into
python-semver:masterfrom
chinakids:master
Closed

chinakids wants to merge 4 commits into
python-semver:masterfrom
chinakids:master

Conversation

@chinakids

Copy link
Copy Markdown

add two match model for '~' and '^'

Geron added 4 commits March 18, 2016 15:44
add two match model for '~' and '^'
add two match model for '~' and '^'
@k-bx

k-bx commented Mar 18, 2016

Copy link
Copy Markdown
Contributor

@chinakids thanks for the contribution. However, I can't accept it as is. First of all, ~ and ^ don't seem like part of a "pure" semantic versioning. Secondly, tests are lacking.

I don't mind adding this npm's advanced ranges syntax, but as a separate API. It's clearly stated in the docs that "Advanced range syntax desugars to primitive comparators in deterministic ways.", which means you can add functions like match_advanced, which would reuse current match function underneath after desugaring advanced operators.

I'd be happy to accept PR in this case. Thanks.

@chinakids

Copy link
Copy Markdown
Author

Thanks,I think i can understand what u mean

@notpushkin

Copy link
Copy Markdown

I believe that supporting all of the advanced range syntax would be nice. If this needs to be implemented in a separate function, I think satisfies is a great choice as this is what it is called in the node semver module.

@s-celles s-celles changed the title add two match model for '~' and '^' (not semver) add two match model for '~' and '^' May 15, 2018
@ppkt ppkt mentioned this pull request May 25, 2018
Closed
@tomschr tomschr added the Not Semver This issue does not belong to semver or is an invalid issue label Nov 24, 2019
@tomschr tomschr linked an issue Apr 24, 2020 that may be closed by this pull request
@tomschr

tomschr commented Apr 24, 2020

Copy link
Copy Markdown
Member

As Konstantine already said, it should be done in a separate API (class, ...). I've linked the respective issue, so closing this.

@tomschr tomschr closed this Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Not Semver This issue does not belong to semver or is an invalid issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Extended Version Comparisons (Ranges, Hyphens, Tilde...)

4 participants