Conversation
|
I've left all the commits separate, but I'll squash them once you're happy with the review. |
|
|
||
| else: | ||
| blocks = group.split(' ') | ||
| blocks = group.split() |
There was a problem hiding this comment.
This now splits across multiple whitespace, but also allows for newlines (so it would allow >0.1.2 \n<3.4.5)
Would it be worth raising an error at the start if the expression contains newlines?
There was a problem hiding this comment.
IMHO this is not worth
There was a problem hiding this comment.
I assume you're referring to "not worth raising an error for newlines", as opposed to allowing multiple spaces between the subclauses?
There was a problem hiding this comment.
I assume you're referring to "not worth raising an error for newlines"
Correct. How many times are there new lines across all the package.json anyway?
There was a problem hiding this comment.
Yeah I wouldn't expect it as an issue, just a slight nitpick of my own code where it's different to the current npm implementation.
|
I also noticed that |
Reorder OP to check for longer match options first. Co-authored-by: Philippe Ombredanne <pombredanne@gmail.com>
|
What is missing here? The conflict is only in the changelog and needs to be resolved before merge anyway. |
|
@pgampe Refer to the linked issue. The maintainer is waiting on clarification from the NPM semver implementers. |
Add additional tests from the PR to have better coverage of NPM expressions Credit to `@gnattishness`, author of [`python-semanticversion #116`]. [`python-semanticversion #116`]: rbarrois/python-semanticversion#116
Add `~>` as an alias for `~` Credit to `@gnattishness`, author of [`python-semanticversion #116`]. [`python-semanticversion #116`]: rbarrois/python-semanticversion#116
Makes NpmSpec more closely match the
node-semverimplementation in what syntax it accepts as valid.Resolves #115