McSherry.SemanticVersioning icon indicating copy to clipboard operation
McSherry.SemanticVersioning copied to clipboard

Allow operators on wildcard version ranges

Open McSherry opened this issue 4 years ago • 0 comments

The node-semver specification allows operators to be applied to wildcard ranges (e.g. >1.7.x, ~2.*), which appears to have been omitted from McSherry.SemanticVersioning.

For tilde and caret ranges (~2.* or ^2.x), the specification is explicit in stating that wildcards are treated as if they were zeroes. Unit tests involving other operators seem to be consistent in treating it as a zero, although this doesn't appear to be stated.

As partial ranges (1.7, 2) are treated as wildcard ranges, adding tests for this is also desirable.

This is a blocker for #18, as the node-semver test suite includes such versions.

McSherry avatar May 25 '20 15:05 McSherry