Fix NPM spec less comparison with prerelease bug.#101
Fix NPM spec less comparison with prerelease bug.#101arjunaskykok wants to merge 1 commit intorbarrois:masterfrom
Conversation
|
Thanks for the contribution! Could you explain why this fixes the bug? Ideally in comments or the commit message, but I can add it myself — as long as I understand it :D |
|
@rbarrois So without the fix, this is what happens. Notice there is this clause AllOf(Range('<', Version('1.2.3'), prerelease_policy='same-patch')), so every prerelease (alpha-1,2,3,4,..., beta-1,2,3,4,...., rc-1,2,3,4,....) version always matches because versions 1.2.3-rc.4 or 1.2.3-alpha.7 or 1.2.3-beta.8 is always less than version 1.2.3. Basically, my fix removes this clause. To be fair, I consider my patch as a quick fix, not as a holistic one. I don't fully understand how NPM spec matching engine works. :) I mean I can update the PR to add a comment but I just need to make sure you are okay with my patch. |
Fixes [`python-semanticversion #100`]. Credit to `@arjunaskykok`, author of [`python-semanticversion #101`]. [`python-semanticversion #100`]: rbarrois/python-semanticversion#100 [`python-semanticversion #101`]: rbarrois/python-semanticversion#101
* Add additional tests mentioned in the comments of [`python-semanticversion #100`]. * Comment out the test cases that fail (these will be fixed in the next commits). Credit to `@ugomancz` and `@tysonliddell` for the tests cases! [`python-semanticversion #100`]: rbarrois/python-semanticversion#101
This PR fixes this bug: #100.