Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

deal with '+' in version numbers - specifically for Python 2.7.2+

  • Loading branch information...
commit 215f98598c37403f0d5612af9616f364d251cc40 1 parent e059844
@vyclone vyclone authored isaacs committed
Showing with 2 additions and 1 deletion.
  1. +1 −1  semver.js
  2. +1 −0  test.js
View
2  semver.js
@@ -8,7 +8,7 @@ var semver = "\\s*[v=]*\\s*([0-9]+)" // major
+ "\\.([0-9]+)" // minor
+ "\\.([0-9]+)" // patch
+ "(-[0-9]+-?)?" // build
- + "([a-zA-Z-][a-zA-Z0-9-\.:]*)?" // tag
+ + "([a-zA-Z-+][a-zA-Z0-9-\.:]*)?" // tag
, exprComparator = "^((<|>)?=?)\s*("+semver+")$|^$"
, xRangePlain = "[v=]*([0-9]+|x|X|\\*)"
+ "(?:\\.([0-9]+|x|X|\\*)"
View
1  test.js
@@ -41,6 +41,7 @@ test("\ncomparison tests", function (t) {
, ["1.2.3-5", "1.2.3-5-foo"]
, ["1.2.3-5", "1.2.3-4"]
, ["1.2.3-5-foo", "1.2.3-5-Foo"]
+ , ["3.0.0", "2.7.2+"]
].forEach(function (v) {
var v0 = v[0]
, v1 = v[1]
Please sign in to comment.
Something went wrong with that request. Please try again.