Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2013-06-21 00:08:58 +0400
committerisaacs <i@izs.me>2013-06-21 00:08:58 +0400
commit8ee81f99f4226b20c43d791788fa5b629aa1f83e (patch)
treee046595af298e1a323cd43231434c9203a7eacb5 /node_modules/semver
parentc992ffe60f58edae4c2cc96bc3797d5e40fbc408 (diff)
semver@2 This breaks a lot of stuff
Diffstat (limited to 'node_modules/semver')
-rw-r--r--node_modules/semver/.npmignore1
-rw-r--r--node_modules/semver/LICENSE42
-rw-r--r--node_modules/semver/Makefile24
-rw-r--r--node_modules/semver/README.md67
-rw-r--r--node_modules/semver/foot.js6
-rw-r--r--node_modules/semver/head.js2
-rw-r--r--node_modules/semver/package.json24
-rw-r--r--node_modules/semver/semver.browser.js850
-rw-r--r--node_modules/semver/semver.browser.js.gzbin0 -> 6072 bytes
-rw-r--r--node_modules/semver/semver.js1114
-rw-r--r--node_modules/semver/semver.min.js1
-rw-r--r--node_modules/semver/semver.min.js.gzbin0 -> 2842 bytes
-rw-r--r--node_modules/semver/test/amd.js15
-rw-r--r--node_modules/semver/test/index.js516
-rw-r--r--node_modules/semver/test/no-module.js19
15 files changed, 2331 insertions, 350 deletions
diff --git a/node_modules/semver/.npmignore b/node_modules/semver/.npmignore
new file mode 100644
index 000000000..7300fbc79
--- /dev/null
+++ b/node_modules/semver/.npmignore
@@ -0,0 +1 @@
+# nada
diff --git a/node_modules/semver/LICENSE b/node_modules/semver/LICENSE
index 05a401094..0c44ae716 100644
--- a/node_modules/semver/LICENSE
+++ b/node_modules/semver/LICENSE
@@ -1,23 +1,27 @@
-Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
+Copyright (c) Isaac Z. Schlueter ("Author")
All rights reserved.
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
+The BSD License
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/semver/Makefile b/node_modules/semver/Makefile
new file mode 100644
index 000000000..e171f70e2
--- /dev/null
+++ b/node_modules/semver/Makefile
@@ -0,0 +1,24 @@
+files = semver.browser.js \
+ semver.min.js \
+ semver.browser.js.gz \
+ semver.min.js.gz
+
+all: $(files)
+
+clean:
+ rm $(files)
+
+semver.browser.js: head.js semver.js foot.js
+ ( cat head.js; \
+ cat semver.js | \
+ egrep -v '^ *\/\* nomin \*\/' | \
+ perl -pi -e 's/debug\([^\)]+\)//g'; \
+ cat foot.js ) > semver.browser.js
+
+semver.min.js: semver.browser.js
+ uglifyjs -m <semver.browser.js >semver.min.js
+
+%.gz: %
+ gzip --stdout -9 <$< >$@
+
+.PHONY: all clean
diff --git a/node_modules/semver/README.md b/node_modules/semver/README.md
index 219300968..a315fe888 100644
--- a/node_modules/semver/README.md
+++ b/node_modules/semver/README.md
@@ -33,59 +33,50 @@ As a command-line utility:
## Versions
-A version is the following things, in this order:
-
-* a number (Major)
-* a period
-* a number (minor)
-* a period
-* a number (patch)
-* OPTIONAL: a hyphen, followed by a number (build)
-* OPTIONAL: a collection of pretty much any non-whitespace characters
- (tag)
+A "version" is described by the v2.0.0 specification found at
+<http://semver.org/>.
A leading `"="` or `"v"` character is stripped off and ignored.
-## Comparisons
-
-The ordering of versions is done using the following algorithm, given
-two versions and asked to find the greater of the two:
-
-* If the majors are numerically different, then take the one
- with a bigger major number. `2.3.4 > 1.3.4`
-* If the minors are numerically different, then take the one
- with the bigger minor number. `2.3.4 > 2.2.4`
-* If the patches are numerically different, then take the one with the
- bigger patch number. `2.3.4 > 2.3.3`
-* If only one of them has a build number, then take the one with the
- build number. `2.3.4-0 > 2.3.4`
-* If they both have build numbers, and the build numbers are numerically
- different, then take the one with the bigger build number.
- `2.3.4-10 > 2.3.4-9`
-* If only one of them has a tag, then take the one without the tag.
- `2.3.4 > 2.3.4-beta`
-* If they both have tags, then take the one with the lexicographically
- larger tag. `2.3.4-beta > 2.3.4-alpha`
-* At this point, they're equal.
-
## Ranges
The following range styles are supported:
+* `1.2.3` A specific version. When nothing else will do. Note that
+ build metadata is still ignored, so `1.2.3+build2012` will satisfy
+ this range.
* `>1.2.3` Greater than a specific version.
-* `<1.2.3` Less than
+* `<1.2.3` Less than a specific version. If there is no prerelease
+ tag on the version range, then no prerelease version will be allowed
+ either, even though these are technically "less than".
+* `>=1.2.3` Greater than or equal to. Note that prerelease versions
+ are NOT equal to their "normal" equivalents, so `1.2.3-beta` will
+ not satisfy this range, but `2.3.0-beta` will.
+* `<=1.2.3` Less than or equal to. In this case, prerelease versions
+ ARE allowed, so `1.2.3-beta` would satisfy.
* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
-* `~1.2.3` := `>=1.2.3 <1.3.0`
-* `~1.2` := `>=1.2.0 <1.3.0`
-* `~1` := `>=1.0.0 <2.0.0`
-* `1.2.x` := `>=1.2.0 <1.3.0`
-* `1.x` := `>=1.0.0 <2.0.0`
+* `~1.2.3` := `>=1.2.3-0 <1.3.0-0` "Reasonably close to 1.2.3". When
+ using tilde operators, prerelease versions are supported as well,
+ but a prerelease of the next significant digit will NOT be
+ satisfactory, so `1.3.0-beta` will not satisfy `~1.2.3`.
+* `~1.2` := `>=1.2.0-0 <1.3.0-0` "Any version starting with 1.2"
+* `1.2.x` := `>=1.2.0-0 <1.3.0-0` "Any version starting with 1.2"
+* `~1` := `>=1.0.0-0 <2.0.0-0` "Any version starting with 1"
+* `1.x` := `>=1.0.0-0 <2.0.0-0` "Any version starting with 1"
+
Ranges can be joined with either a space (which implies "and") or a
`||` (which implies "or").
## Functions
+All methods and classes take a final `loose` boolean argument that, if
+true, will be more forgiving about not-quite-valid semver strings.
+The resulting output will always be 100% strict, of course.
+
+Strict-mode Comparators and Ranges will be strict about the SemVer
+strings that they parse.
+
* valid(v): Return the parsed version, or null if it's not valid.
* inc(v, release): Return the version incremented by the release type
(major, minor, patch, or build), or null if it's not valid.
diff --git a/node_modules/semver/foot.js b/node_modules/semver/foot.js
new file mode 100644
index 000000000..8f83c20f8
--- /dev/null
+++ b/node_modules/semver/foot.js
@@ -0,0 +1,6 @@
+
+})(
+ typeof exports === 'object' ? exports :
+ typeof define === 'function' && define.amd ? {} :
+ semver = {}
+);
diff --git a/node_modules/semver/head.js b/node_modules/semver/head.js
new file mode 100644
index 000000000..653686517
--- /dev/null
+++ b/node_modules/semver/head.js
@@ -0,0 +1,2 @@
+;(function(exports) {
+
diff --git a/node_modules/semver/package.json b/node_modules/semver/package.json
index abbfb210b..5ae76a2d5 100644
--- a/node_modules/semver/package.json
+++ b/node_modules/semver/package.json
@@ -1,18 +1,19 @@
{
"name": "semver",
- "version": "1.1.4",
+ "version": "2.0.7",
"description": "The semantic version parser used by npm.",
"main": "semver.js",
+ "browser": "semver.browser.js",
+ "min": "semver.min.js",
"scripts": {
- "test": "tap test.js"
+ "test": "tap test/*.js",
+ "prepublish": "make"
},
"devDependencies": {
- "tap": "0.x >=0.0.4"
- },
- "license": {
- "type": "MIT",
- "url": "https://github.com/isaacs/semver/raw/master/LICENSE"
+ "tap": "0.x >=0.0.4",
+ "uglify-js": "~2.3.6"
},
+ "license": "BSD",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-semver.git"
@@ -20,8 +21,11 @@
"bin": {
"semver": "./bin/semver"
},
- "readme": "semver(1) -- The semantic versioner for npm\n===========================================\n\n## Usage\n\n $ npm install semver\n\n semver.valid('1.2.3') // '1.2.3'\n semver.valid('a.b.c') // null\n semver.clean(' =v1.2.3 ') // '1.2.3'\n semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true\n semver.gt('1.2.3', '9.8.7') // false\n semver.lt('1.2.3', '9.8.7') // true\n\nAs a command-line utility:\n\n $ semver -h\n\n Usage: semver -v <version> [-r <range>]\n Test if version(s) satisfy the supplied range(s),\n and sort them.\n\n Multiple versions or ranges may be supplied.\n\n Program exits successfully if any valid version satisfies\n all supplied ranges, and prints all satisfying versions.\n\n If no versions are valid, or ranges are not satisfied,\n then exits failure.\n\n Versions are printed in ascending order, so supplying\n multiple versions to the utility will just sort them.\n\n## Versions\n\nA version is the following things, in this order:\n\n* a number (Major)\n* a period\n* a number (minor)\n* a period\n* a number (patch)\n* OPTIONAL: a hyphen, followed by a number (build)\n* OPTIONAL: a collection of pretty much any non-whitespace characters\n (tag)\n\nA leading `\"=\"` or `\"v\"` character is stripped off and ignored.\n\n## Comparisons\n\nThe ordering of versions is done using the following algorithm, given\ntwo versions and asked to find the greater of the two:\n\n* If the majors are numerically different, then take the one\n with a bigger major number. `2.3.4 > 1.3.4`\n* If the minors are numerically different, then take the one\n with the bigger minor number. `2.3.4 > 2.2.4`\n* If the patches are numerically different, then take the one with the\n bigger patch number. `2.3.4 > 2.3.3`\n* If only one of them has a build number, then take the one with the\n build number. `2.3.4-0 > 2.3.4`\n* If they both have build numbers, and the build numbers are numerically\n different, then take the one with the bigger build number.\n `2.3.4-10 > 2.3.4-9`\n* If only one of them has a tag, then take the one without the tag.\n `2.3.4 > 2.3.4-beta`\n* If they both have tags, then take the one with the lexicographically\n larger tag. `2.3.4-beta > 2.3.4-alpha`\n* At this point, they're equal.\n\n## Ranges\n\nThe following range styles are supported:\n\n* `>1.2.3` Greater than a specific version.\n* `<1.2.3` Less than\n* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`\n* `~1.2.3` := `>=1.2.3 <1.3.0`\n* `~1.2` := `>=1.2.0 <1.3.0`\n* `~1` := `>=1.0.0 <2.0.0`\n* `1.2.x` := `>=1.2.0 <1.3.0`\n* `1.x` := `>=1.0.0 <2.0.0`\n\nRanges can be joined with either a space (which implies \"and\") or a\n`||` (which implies \"or\").\n\n## Functions\n\n* valid(v): Return the parsed version, or null if it's not valid.\n* inc(v, release): Return the version incremented by the release type\n (major, minor, patch, or build), or null if it's not valid.\n\n### Comparison\n\n* gt(v1, v2): `v1 > v2`\n* gte(v1, v2): `v1 >= v2`\n* lt(v1, v2): `v1 < v2`\n* lte(v1, v2): `v1 <= v2`\n* eq(v1, v2): `v1 == v2` This is true if they're logically equivalent,\n even if they're not the exact same string. You already know how to\n compare strings.\n* neq(v1, v2): `v1 != v2` The opposite of eq.\n* cmp(v1, comparator, v2): Pass in a comparison string, and it'll call\n the corresponding function above. `\"===\"` and `\"!==\"` do simple\n string comparison, but are included for completeness. Throws if an\n invalid comparison string is provided.\n* compare(v1, v2): Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if\n v2 is greater. Sorts in ascending order if passed to Array.sort().\n* rcompare(v1, v2): The reverse of compare. Sorts an array of versions\n in descending order when passed to Array.sort().\n\n\n### Ranges\n\n* validRange(range): Return the valid range or null if it's not valid\n* satisfies(version, range): Return true if the version satisfies the\n range.\n* maxSatisfying(versions, range): Return the highest version in the list\n that satisfies the range, or null if none of them do.\n",
+ "readme": "semver(1) -- The semantic versioner for npm\n===========================================\n\n## Usage\n\n $ npm install semver\n\n semver.valid('1.2.3') // '1.2.3'\n semver.valid('a.b.c') // null\n semver.clean(' =v1.2.3 ') // '1.2.3'\n semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true\n semver.gt('1.2.3', '9.8.7') // false\n semver.lt('1.2.3', '9.8.7') // true\n\nAs a command-line utility:\n\n $ semver -h\n\n Usage: semver -v <version> [-r <range>]\n Test if version(s) satisfy the supplied range(s),\n and sort them.\n\n Multiple versions or ranges may be supplied.\n\n Program exits successfully if any valid version satisfies\n all supplied ranges, and prints all satisfying versions.\n\n If no versions are valid, or ranges are not satisfied,\n then exits failure.\n\n Versions are printed in ascending order, so supplying\n multiple versions to the utility will just sort them.\n\n## Versions\n\nA \"version\" is described by the v2.0.0 specification found at\n<http://semver.org/>.\n\nA leading `\"=\"` or `\"v\"` character is stripped off and ignored.\n\n## Ranges\n\nThe following range styles are supported:\n\n* `1.2.3` A specific version. When nothing else will do. Note that\n build metadata is still ignored, so `1.2.3+build2012` will satisfy\n this range.\n* `>1.2.3` Greater than a specific version.\n* `<1.2.3` Less than a specific version. If there is no prerelease\n tag on the version range, then no prerelease version will be allowed\n either, even though these are technically \"less than\".\n* `>=1.2.3` Greater than or equal to. Note that prerelease versions\n are NOT equal to their \"normal\" equivalents, so `1.2.3-beta` will\n not satisfy this range, but `2.3.0-beta` will.\n* `<=1.2.3` Less than or equal to. In this case, prerelease versions\n ARE allowed, so `1.2.3-beta` would satisfy.\n* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`\n* `~1.2.3` := `>=1.2.3-0 <1.3.0-0` \"Reasonably close to 1.2.3\". When\n using tilde operators, prerelease versions are supported as well,\n but a prerelease of the next significant digit will NOT be\n satisfactory, so `1.3.0-beta` will not satisfy `~1.2.3`.\n* `~1.2` := `>=1.2.0-0 <1.3.0-0` \"Any version starting with 1.2\"\n* `1.2.x` := `>=1.2.0-0 <1.3.0-0` \"Any version starting with 1.2\"\n* `~1` := `>=1.0.0-0 <2.0.0-0` \"Any version starting with 1\"\n* `1.x` := `>=1.0.0-0 <2.0.0-0` \"Any version starting with 1\"\n\n\nRanges can be joined with either a space (which implies \"and\") or a\n`||` (which implies \"or\").\n\n## Functions\n\nAll methods and classes take a final `loose` boolean argument that, if\ntrue, will be more forgiving about not-quite-valid semver strings.\nThe resulting output will always be 100% strict, of course.\n\nStrict-mode Comparators and Ranges will be strict about the SemVer\nstrings that they parse.\n\n* valid(v): Return the parsed version, or null if it's not valid.\n* inc(v, release): Return the version incremented by the release type\n (major, minor, patch, or build), or null if it's not valid.\n\n### Comparison\n\n* gt(v1, v2): `v1 > v2`\n* gte(v1, v2): `v1 >= v2`\n* lt(v1, v2): `v1 < v2`\n* lte(v1, v2): `v1 <= v2`\n* eq(v1, v2): `v1 == v2` This is true if they're logically equivalent,\n even if they're not the exact same string. You already know how to\n compare strings.\n* neq(v1, v2): `v1 != v2` The opposite of eq.\n* cmp(v1, comparator, v2): Pass in a comparison string, and it'll call\n the corresponding function above. `\"===\"` and `\"!==\"` do simple\n string comparison, but are included for completeness. Throws if an\n invalid comparison string is provided.\n* compare(v1, v2): Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if\n v2 is greater. Sorts in ascending order if passed to Array.sort().\n* rcompare(v1, v2): The reverse of compare. Sorts an array of versions\n in descending order when passed to Array.sort().\n\n\n### Ranges\n\n* validRange(range): Return the valid range or null if it's not valid\n* satisfies(version, range): Return true if the version satisfies the\n range.\n* maxSatisfying(versions, range): Return the highest version in the list\n that satisfies the range, or null if none of them do.\n",
"readmeFilename": "README.md",
- "_id": "semver@1.1.4",
- "_from": "semver@1.1.4"
+ "bugs": {
+ "url": "https://github.com/isaacs/node-semver/issues"
+ },
+ "_id": "semver@2.0.7",
+ "_from": "semver@latest"
}
diff --git a/node_modules/semver/semver.browser.js b/node_modules/semver/semver.browser.js
new file mode 100644
index 000000000..f5229487c
--- /dev/null
+++ b/node_modules/semver/semver.browser.js
@@ -0,0 +1,850 @@
+;(function(exports) {
+
+// export the class if we are in a Node-like system.
+if (typeof module === 'object' && module.exports === exports)
+ exports = module.exports = SemVer;
+
+// The debug function is excluded entirely from the minified version.
+
+// Note: this is the semver.org version of the spec that it implements
+// Not necessarily the package version of this code.
+exports.SEMVER_SPEC_VERSION = '2.0.0';
+
+// The actual regexps go on exports.re
+var re = exports.re = [];
+var src = exports.src = [];
+var R = 0;
+
+// The following Regular Expressions can be used for tokenizing,
+// validating, and parsing SemVer version strings.
+
+// ## Numeric Identifier
+// A single `0`, or a non-zero digit followed by zero or more digits.
+
+var NUMERICIDENTIFIER = R++;
+src[NUMERICIDENTIFIER] = '0|[1-9]\\d*';
+var NUMERICIDENTIFIERLOOSE = R++;
+src[NUMERICIDENTIFIERLOOSE] = '[0-9]+';
+
+
+// ## Non-numeric Identifier
+// Zero or more digits, followed by a letter or hyphen, and then zero or
+// more letters, digits, or hyphens.
+
+var NONNUMERICIDENTIFIER = R++;
+src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*';
+
+
+// ## Main Version
+// Three dot-separated numeric identifiers.
+
+var MAINVERSION = R++;
+src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIER] + ')';
+
+var MAINVERSIONLOOSE = R++;
+src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIERLOOSE] + ')';
+
+// ## Pre-release Version Identifier
+// A numeric identifier, or a non-numeric identifier.
+
+var PRERELEASEIDENTIFIER = R++;
+src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +
+ '|' + src[NONNUMERICIDENTIFIER] + ')';
+
+var PRERELEASEIDENTIFIERLOOSE = R++;
+src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +
+ '|' + src[NONNUMERICIDENTIFIER] + ')';
+
+
+// ## Pre-release Version
+// Hyphen, followed by one or more dot-separated pre-release version
+// identifiers.
+
+var PRERELEASE = R++;
+src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +
+ '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))';
+
+var PRERELEASELOOSE = R++;
+src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +
+ '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))';
+
+// ## Build Metadata Identifier
+// Any combination of digits, letters, or hyphens.
+
+var BUILDIDENTIFIER = R++;
+src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+';
+
+// ## Build Metadata
+// Plus sign, followed by one or more period-separated build metadata
+// identifiers.
+
+var BUILD = R++;
+src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
+ '(?:\\.' + src[BUILDIDENTIFIER] + ')*))';
+
+
+// ## Full Version String
+// A main version, followed optionally by a pre-release version and
+// build metadata.
+
+// Note that the only major, minor, patch, and pre-release sections of
+// the version string are capturing groups. The build metadata is not a
+// capturing group, because it should not ever be used in version
+// comparison.
+
+var FULL = R++;
+var FULLPLAIN = 'v?' + src[MAINVERSION] +
+ src[PRERELEASE] + '?' +
+ src[BUILD] + '?';
+
+src[FULL] = '^' + FULLPLAIN + '$';
+
+// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
+// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
+// common in the npm registry.
+var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] +
+ src[PRERELEASELOOSE] + '?' +
+ src[BUILD] + '?';
+
+var LOOSE = R++;
+src[LOOSE] = '^' + LOOSEPLAIN + '$';
+
+var GTLT = R++;
+src[GTLT] = '((?:<|>)?=?)';
+
+// Something like "2.*" or "1.2.x".
+// Note that "x.x" is a valid xRange identifer, meaning "any version"
+// Only the first item is strictly required.
+var XRANGEIDENTIFIERLOOSE = R++;
+src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
+var XRANGEIDENTIFIER = R++;
+src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*';
+
+var XRANGEPLAIN = R++;
+src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:(' + src[PRERELEASE] + ')' +
+ ')?)?)?';
+
+var XRANGEPLAINLOOSE = R++;
+src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:(' + src[PRERELEASELOOSE] + ')' +
+ ')?)?)?';
+
+// >=2.x, for example, means >=2.0.0-0
+// <1.x would be the same as "<1.0.0-0", though.
+var XRANGE = R++;
+src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$';
+var XRANGELOOSE = R++;
+src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$';
+
+// Tilde ranges.
+// Meaning is "reasonably at or greater than"
+var LONETILDE = R++;
+src[LONETILDE] = '(?:~>?)';
+
+var TILDETRIM = R++;
+src[TILDETRIM] = src[LONETILDE] + '\s+';
+var tildeTrimReplace = '$1';
+
+var TILDE = R++;
+src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$';
+var TILDELOOSE = R++;
+src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$';
+
+
+// A simple gt/lt/eq thing, or just "" to indicate "any version"
+var COMPARATORLOOSE = R++;
+src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$';
+var COMPARATOR = R++;
+src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$';
+
+
+// An expression to strip any whitespace between the gtlt and the thing
+// it modifies, so that `> 1.2.3` ==> `>1.2.3`
+var COMPARATORTRIM = R++;
+src[COMPARATORTRIM] = src[GTLT] +
+ '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')';
+
+// this one has to use the /g flag
+re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g');
+
+var comparatorTrimReplace = '$1$2 ';
+
+
+// Something like `1.2.3 - 1.2.4`
+// Note that these all use the loose form, because they'll be
+// checked against either the strict or loose comparator form
+// later.
+var HYPHENRANGE = R++;
+src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[XRANGEPLAIN] + ')' +
+ '\\s*$';
+
+var HYPHENRANGELOOSE = R++;
+src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[XRANGEPLAINLOOSE] + ')' +
+ '\\s*$';
+
+// Star ranges basically just allow anything at all.
+var STAR = R++;
+src[STAR] = '(<|>)?=?\\s*\\*';
+
+// Compile to actual regexp objects.
+// All are flag-free, unless they were created above with a flag.
+for (var i = 0; i < R; i++) {
+ ;
+ if (!re[i])
+ re[i] = new RegExp(src[i]);
+}
+
+exports.parse = parse;
+function parse(version, loose) {
+ var r = loose ? re[LOOSE] : re[FULL];
+ return (r.test(version)) ? new SemVer(version, loose) : null;
+}
+
+exports.valid = valid;
+function valid(version, loose) {
+ var v = parse(version, loose);
+ return v ? v.version : null;
+}
+
+
+exports.clean = clean;
+function clean(version, loose) {
+ var s = parse(version, loose);
+ return s ? s.version : null;
+}
+
+exports.SemVer = SemVer;
+
+function SemVer(version, loose) {
+ if (version instanceof SemVer) {
+ if (version.loose === loose)
+ return version;
+ else
+ version = version.version;
+ }
+
+ if (!(this instanceof SemVer))
+ return new SemVer(version, loose);
+
+ ;
+ this.loose = loose;
+ var m = version.trim().match(loose ? re[LOOSE] : re[FULL]);
+
+ if (!m)
+ throw new TypeError('Invalid Version: ' + version);
+
+ this.raw = version;
+
+ // these are actually numbers
+ this.major = +m[1];
+ this.minor = +m[2];
+ this.patch = +m[3];
+
+ // numberify any prerelease numeric ids
+ if (!m[4])
+ this.prerelease = [];
+ else
+ this.prerelease = m[4].split('.').map(function(id) {
+ return (/^[0-9]+$/.test(id)) ? +id : id;
+ });
+
+ this.build = m[5] ? m[5].split('.') : [];
+ this.format();
+}
+
+SemVer.prototype.format = function() {
+ this.version = this.major + '.' + this.minor + '.' + this.patch;
+ if (this.prerelease.length)
+ this.version += '-' + this.prerelease.join('.');
+ return this.version;
+};
+
+SemVer.prototype.inspect = function() {
+ return '<SemVer "' + this + '">';
+};
+
+SemVer.prototype.toString = function() {
+ return this.version;
+};
+
+SemVer.prototype.compare = function(other) {
+ ;
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ return this.compareMain(other) || this.comparePre(other);
+};
+
+SemVer.prototype.compareMain = function(other) {
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ return compareIdentifiers(this.major, other.major) ||
+ compareIdentifiers(this.minor, other.minor) ||
+ compareIdentifiers(this.patch, other.patch);
+};
+
+SemVer.prototype.comparePre = function(other) {
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ // NOT having a prerelease is > having one
+ if (this.prerelease.length && !other.prerelease.length)
+ return -1;
+ else if (!this.prerelease.length && other.prerelease.length)
+ return 1;
+ else if (!this.prerelease.lenth && !other.prerelease.length)
+ return 0;
+
+ var i = 0;
+ do {
+ var a = this.prerelease[i];
+ var b = other.prerelease[i];
+ ;
+ if (a === undefined && b === undefined)
+ return 0;
+ else if (b === undefined)
+ return 1;
+ else if (a === undefined)
+ return -1;
+ else if (a === b)
+ continue;
+ else
+ return compareIdentifiers(a, b);
+ } while (++i);
+};
+
+SemVer.prototype.inc = function(release) {
+ switch (release) {
+ case 'major':
+ this.major++;
+ this.minor = -1;
+ case 'minor':
+ this.minor++;
+ this.patch = -1;
+ case 'patch':
+ this.patch++;
+ this.prerelease = [];
+ break;
+ case 'prerelease':
+ if (this.prerelease.length === 0)
+ this.prerelease = [0];
+ else {
+ var i = this.prerelease.length;
+ while (--i >= 0) {
+ if (typeof this.prerelease[i] === 'number') {
+ this.prerelease[i]++;
+ i = -2;
+ }
+ }
+ if (i === -1) // didn't increment anything
+ this.prerelease.push(0);
+ }
+ break;
+
+ default:
+ throw new Error('invalid increment argument: ' + release);
+ }
+ this.format();
+ return this;
+};
+
+exports.inc = inc;
+function inc(version, release, loose) {
+ try {
+ return new SemVer(version, loose).inc(release).version;
+ } catch (er) {
+ return null;
+ }
+}
+
+exports.compareIdentifiers = compareIdentifiers;
+
+var numeric = /^[0-9]+$/;
+function compareIdentifiers(a, b) {
+ var anum = numeric.test(a);
+ var bnum = numeric.test(b);
+
+ if (anum && bnum) {
+ a = +a;
+ b = +b;
+ }
+
+ return (anum && !bnum) ? -1 :
+ (bnum && !anum) ? 1 :
+ a < b ? -1 :
+ a > b ? 1 :
+ 0;
+}
+
+exports.rcompareIdentifiers = rcompareIdentifiers;
+function rcompareIdentifiers(a, b) {
+ return compareIdentifiers(b, a);
+}
+
+exports.compare = compare;
+function compare(a, b, loose) {
+ return new SemVer(a, loose).compare(b);
+}
+
+exports.compareLoose = compareLoose;
+function compareLoose(a, b) {
+ return compare(a, b, true);
+}
+
+exports.rcompare = rcompare;
+function rcompare(a, b, loose) {
+ return compare(b, a, loose);
+}
+
+exports.sort = sort;
+function sort(list, loose) {
+ return list.sort(function(a, b) {
+ return exports.compare(a, b, loose);
+ });
+}
+
+exports.rsort = rsort;
+function rsort(list, loose) {
+ return list.sort(function(a, b) {
+ return exports.rcompare(a, b, loose);
+ });
+}
+
+exports.gt = gt;
+function gt(a, b, loose) {
+ return compare(a, b, loose) > 0;
+}
+
+exports.lt = lt;
+function lt(a, b, loose) {
+ return compare(a, b, loose) < 0;
+}
+
+exports.eq = eq;
+function eq(a, b, loose) {
+ return compare(a, b, loose) === 0;
+}
+
+exports.neq = neq;
+function neq(a, b, loose) {
+ return compare(a, b, loose) !== 0;
+}
+
+exports.gte = gte;
+function gte(a, b, loose) {
+ return compare(a, b, loose) >= 0;
+}
+
+exports.lte = lte;
+function lte(a, b, loose) {
+ return compare(a, b, loose) <= 0;
+}
+
+exports.cmp = cmp;
+function cmp(a, op, b, loose) {
+ var ret;
+ switch (op) {
+ case '===': ret = a === b; break;
+ case '!==': ret = a !== b; break;
+ case '': case '=': case '==': ret = eq(a, b, loose); break;
+ case '!=': ret = neq(a, b, loose); break;
+ case '>': ret = gt(a, b, loose); break;
+ case '>=': ret = gte(a, b, loose); break;
+ case '<': ret = lt(a, b, loose); break;
+ case '<=': ret = lte(a, b, loose); break;
+ default: throw new TypeError('Invalid operator: ' + op);
+ }
+ return ret;
+}
+
+exports.Comparator = Comparator;
+function Comparator(comp, loose) {
+ if (comp instanceof Comparator) {
+ if (comp.loose === loose)
+ return comp;
+ else
+ comp = comp.value;
+ }
+
+ if (!(this instanceof Comparator))
+ return new Comparator(comp, loose);
+
+ ;
+ this.loose = loose;
+ this.parse(comp);
+
+ if (this.semver === ANY)
+ this.value = '';
+ else
+ this.value = this.operator + this.semver.version;
+}
+
+var ANY = {};
+Comparator.prototype.parse = function(comp) {
+ var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
+ var m = comp.match(r);
+
+ if (!m)
+ throw new TypeError('Invalid comparator: ' + comp);
+
+ this.operator = m[1];
+ // if it literally is just '>' or '' then allow anything.
+ if (!m[2])
+ this.semver = ANY;
+ else {
+ this.semver = new SemVer(m[2], this.loose);
+
+ // <1.2.3-rc DOES allow 1.2.3-beta (has prerelease)
+ // >=1.2.3 DOES NOT allow 1.2.3-beta
+ // <=1.2.3 DOES allow 1.2.3-beta
+ // However, <1.2.3 does NOT allow 1.2.3-beta,
+ // even though `1.2.3-beta < 1.2.3`
+ // The assumption is that the 1.2.3 version has something you
+ // *don't* want, so we push the prerelease down to the minimum.
+ if (this.operator === '<' && !this.semver.prerelease.length) {
+ this.semver.prerelease = ['0'];
+ this.semver.format();
+ }
+ }
+};
+
+Comparator.prototype.inspect = function() {
+ return '<SemVer Comparator "' + this + '">';
+};
+
+Comparator.prototype.toString = function() {
+ return this.value;
+};
+
+Comparator.prototype.test = function(version) {
+ ;
+ return (this.semver === ANY) ? true :
+ cmp(version, this.operator, this.semver, this.loose);
+};
+
+
+exports.Range = Range;
+function Range(range, loose) {
+ if ((range instanceof Range) && range.loose === loose)
+ return range;
+
+ if (!(this instanceof Range))
+ return new Range(range, loose);
+
+ this.loose = loose;
+
+ // First, split based on boolean or ||
+ this.raw = range;
+ this.set = range.split(/\s*\|\|\s*/).map(function(range) {
+ return this.parseRange(range.trim());
+ }, this).filter(function(c) {
+ // throw out any that are not relevant for whatever reason
+ return c.length;
+ });
+
+ if (!this.set.length) {
+ throw new TypeError('Invalid SemVer Range: ' + range);
+ }
+
+ this.format();
+}
+
+Range.prototype.inspect = function() {
+ return '<SemVer Range "' + this.range + '">';
+};
+
+Range.prototype.format = function() {
+ this.range = this.set.map(function(comps) {
+ return comps.join(' ').trim();
+ }).join('||').trim();
+ return this.range;
+};
+
+Range.prototype.toString = function() {
+ return this.range;
+};
+
+Range.prototype.parseRange = function(range) {
+ var loose = this.loose;
+ range = range.trim();
+ ;
+ // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
+ var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE];
+ range = range.replace(hr, hyphenReplace);
+ ;
+ // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
+ range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace);
+ ;
+
+ // `~ 1.2.3` => `~1.2.3`
+ range = range.replace(re[TILDETRIM], tildeTrimReplace);
+
+ // normalize spaces
+ range = range.split(/\s+/).join(' ');
+
+ // At this point, the range is completely trimmed and
+ // ready to be split into comparators.
+
+ var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
+ var set = range.split(' ').map(function(comp) {
+ return parseComparator(comp, loose);
+ }).join(' ').split(/\s+/);
+ if (this.loose) {
+ // in loose mode, throw out any that are not valid comparators
+ set = set.filter(function(comp) {
+ return !!comp.match(compRe);
+ });
+ }
+ set = set.map(function(comp) {
+ return new Comparator(comp, loose);
+ });
+
+ return set;
+};
+
+// Mostly just for testing and legacy API reasons
+exports.toComparators = toComparators;
+function toComparators(range, loose) {
+ return new Range(range, loose).set.map(function(comp) {
+ return comp.map(function(c) {
+ return c.value;
+ }).join(' ').trim().split(' ');
+ });
+}
+
+// comprised of xranges, tildes, stars, and gtlt's at this point.
+// already replaced the hyphen ranges
+// turn into a set of JUST comparators.
+function parseComparator(comp, loose) {
+ ;
+ comp = replaceTildes(comp, loose);
+ ;
+ comp = replaceXRanges(comp, loose);
+ ;
+ comp = replaceStars(comp, loose);
+ ;
+ return comp;
+}
+
+function isX(id) {
+ return !id || id.toLowerCase() === 'x' || id === '*';
+}
+
+// ~, ~> --> * (any, kinda silly)
+// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
+// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
+// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
+// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
+// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
+function replaceTildes(comp, loose) {
+ return comp.trim().split(/\s+/).map(function(comp) {
+ return replaceTilde(comp, loose);
+ }).join(' ');
+}
+
+function replaceTilde(comp, loose) {
+ var r = loose ? re[TILDELOOSE] : re[TILDE];
+ return comp.replace(r, function(_, M, m, p, pr) {
+ ;
+ var ret;
+
+ if (isX(M))
+ ret = '';
+ else if (isX(m))
+ ret = '>=' + M + '.0.0-0 <' + (+M + 1) + '.0.0-0';
+ else if (isX(p))
+ // ~1.2 == >=1.2.0- <1.3.0-
+ ret = '>=' + M + '.' + m + '.0-0 <' + M + '.' + (+m + 1) + '.0-0';
+ else if (pr) {
+ ;
+ if (pr.charAt(0) !== '-')
+ pr = '-' + pr;
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + M + '.' + (+m + 1) + '.0-0';
+ } else
+ // ~1.2.3 == >=1.2.3-0 <1.3.0-0
+ ret = '>=' + M + '.' + m + '.' + p + '-0' +
+ ' <' + M + '.' + (+m + 1) + '.0-0';
+
+ ;
+ return ret;
+ });
+}
+
+function replaceXRanges(comp, loose) {
+ ;
+ return comp.split(/\s+/).map(function(comp) {
+ return replaceXRange(comp, loose);
+ }).join(' ');
+}
+
+function replaceXRange(comp, loose) {
+ comp = comp.trim();
+ var r = loose ? re[XRANGELOOSE] : re[XRANGE];
+ return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
+ ;
+ var xM = isX(M);
+ var xm = xM || isX(m);
+ var xp = xm || isX(p);
+ var anyX = xp;
+
+ if (gtlt === '=' && anyX)
+ gtlt = '';
+
+ if (gtlt && anyX) {
+ // replace X with 0, and then append the -0 min-prerelease
+ if (xM)
+ M = 0;
+ if (xm)
+ m = 0;
+ if (xp)
+ p = 0;
+
+ if (gtlt === '>') {
+ // >1 => >=2.0.0-0
+ // >1.2 => >=1.3.0-0
+ // >1.2.3 => >= 1.2.4-0
+ gtlt = '>=';
+ if (xM) {
+ // no change
+ } else if (xm) {
+ M = +M + 1;
+ m = 0;
+ p = 0;
+ } else if (xp) {
+ m = +m + 1;
+ p = 0;
+ }
+ }
+
+
+ ret = gtlt + M + '.' + m + '.' + p + '-0';
+ } else if (xM) {
+ // allow any
+ ret = '*';
+ } else if (xm) {
+ // append '-0' onto the version, otherwise
+ // '1.x.x' matches '2.0.0-beta', since the tag
+ // *lowers* the version value
+ ret = '>=' + M + '.0.0-0 <' + (+M + 1) + '.0.0-0';
+ } else if (xp) {
+ ret = '>=' + M + '.' + m + '.0-0 <' + M + '.' + (+m + 1) + '.0-0';
+ }
+
+ ;
+
+ return ret;
+ });
+}
+
+// Because * is AND-ed with everything else in the comparator,
+// and '' means "any version", just remove the *s entirely.
+function replaceStars(comp, loose) {
+ ;
+ // Looseness is ignored here. star is always as loose as it gets!
+ return comp.trim().replace(re[STAR], '');
+}
+
+// This function is passed to string.replace(re[HYPHENRANGE])
+// M, m, patch, prerelease, build
+// 1.2 - 3.4.5 => >=1.2.0-0 <=3.4.5
+// 1.2.3 - 3.4 => >=1.2.0-0 <3.5.0-0 Any 3.4.x will do
+// 1.2 - 3.4 => >=1.2.0-0 <3.5.0-0
+function hyphenReplace($0,
+ from, fM, fm, fp, fpr, fb,
+ to, tM, tm, tp, tpr, tb) {
+
+ if (isX(fM))
+ from = '';
+ else if (isX(fm))
+ from = '>=' + fM + '.0.0-0';
+ else if (isX(fp))
+ from = '>=' + fM + '.' + fm + '.0-0';
+ else
+ from = '>=' + from;
+
+ if (isX(tM))
+ to = '';
+ else if (isX(tm))
+ to = '<' + (+tM + 1) + '.0.0-0';
+ else if (isX(tp))
+ to = '<' + tM + '.' + (+tm + 1) + '.0-0';
+ else if (tpr)
+ to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;
+ else
+ to = '<=' + to;
+
+ return (from + ' ' + to).trim();
+}
+
+
+// if ANY of the sets match ALL of its comparators, then pass
+Range.prototype.test = function(version) {
+ if (!version)
+ return false;
+ for (var i = 0; i < this.set.length; i++) {
+ if (testSet(this.set[i], version))
+ return true;
+ }
+ return false;
+};
+
+function testSet(set, version) {
+ for (var i = 0; i < set.length; i++) {
+ if (!set[i].test(version))
+ return false;
+ }
+ return true;
+}
+
+exports.satisfies = satisfies;
+function satisfies(version, range, loose) {
+ try {
+ range = new Range(range, loose);
+ } catch (er) {
+ return false;
+ }
+ return range.test(version);
+}
+
+exports.maxSatisfying = maxSatisfying;
+function maxSatisfying(versions, range, loose) {
+ return versions.filter(function(version) {
+ return satisfies(version, range, loose);
+ }).sort(compare)[0] || null;
+}
+
+exports.validRange = validRange;
+function validRange(range, loose) {
+ try {
+ // Return '*' instead of '' so that truthiness works.
+ // This will throw if it's invalid anyway
+ return new Range(range, loose).range || '*';
+ } catch (er) {
+ return null;
+ }
+}
+
+// Use the define() function if we're in AMD land
+if (typeof define === 'function' && define.amd)
+ define(exports);
+
+})(
+ typeof exports === 'object' ? exports :
+ typeof define === 'function' && define.amd ? {} :
+ semver = {}
+);
diff --git a/node_modules/semver/semver.browser.js.gz b/node_modules/semver/semver.browser.js.gz
new file mode 100644
index 000000000..01c4caeed
--- /dev/null
+++ b/node_modules/semver/semver.browser.js.gz
Binary files differ
diff --git a/node_modules/semver/semver.js b/node_modules/semver/semver.js
index cebfe6fd1..aa1b518f1 100644
--- a/node_modules/semver/semver.js
+++ b/node_modules/semver/semver.js
@@ -1,158 +1,657 @@
-;(function (exports) { // nothing in here is node-specific.
-
-// See http://semver.org/
-// This implementation is a *hair* less strict in that it allows
-// v1.2.3 things, and also tags that don't begin with a char.
-
-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
- , exprComparator = "^((<|>)?=?)\s*("+semver+")$|^$"
- , xRangePlain = "[v=]*([0-9]+|x|X|\\*)"
- + "(?:\\.([0-9]+|x|X|\\*)"
- + "(?:\\.([0-9]+|x|X|\\*)"
- + "([a-zA-Z-][a-zA-Z0-9-\.:]*)?)?)?"
- , xRange = "((?:<|>)=?)?\\s*" + xRangePlain
- , exprLoneSpermy = "(?:~>?)"
- , exprSpermy = exprLoneSpermy + xRange
- , expressions = exports.expressions =
- { parse : new RegExp("^\\s*"+semver+"\\s*$")
- , parsePackage : new RegExp("^\\s*([^\/]+)[-@](" +semver+")\\s*$")
- , parseRange : new RegExp(
- "^\\s*(" + semver + ")\\s+-\\s+(" + semver + ")\\s*$")
- , validComparator : new RegExp("^"+exprComparator+"$")
- , parseXRange : new RegExp("^"+xRange+"$")
- , parseSpermy : new RegExp("^"+exprSpermy+"$")
- }
+// export the class if we are in a Node-like system.
+if (typeof module === 'object' && module.exports === exports)
+ exports = module.exports = SemVer;
+
+// The debug function is excluded entirely from the minified version.
+/* nomin */ var debug;
+/* nomin */ if (typeof process === 'object' &&
+ /* nomin */ process.env &&
+ /* nomin */ process.env.NODE_DEBUG &&
+ /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG))
+ /* nomin */ debug = function() {
+ /* nomin */ var args = Array.prototype.slice.call(arguments, 0);
+ /* nomin */ args.unshift('SEMVER');
+ /* nomin */ console.log.apply(console, args);
+ /* nomin */ };
+/* nomin */ else
+ /* nomin */ debug = function() {};
+
+// Note: this is the semver.org version of the spec that it implements
+// Not necessarily the package version of this code.
+exports.SEMVER_SPEC_VERSION = '2.0.0';
+
+// The actual regexps go on exports.re
+var re = exports.re = [];
+var src = exports.src = [];
+var R = 0;
+
+// The following Regular Expressions can be used for tokenizing,
+// validating, and parsing SemVer version strings.
+
+// ## Numeric Identifier
+// A single `0`, or a non-zero digit followed by zero or more digits.
+
+var NUMERICIDENTIFIER = R++;
+src[NUMERICIDENTIFIER] = '0|[1-9]\\d*';
+var NUMERICIDENTIFIERLOOSE = R++;
+src[NUMERICIDENTIFIERLOOSE] = '[0-9]+';
+
+
+// ## Non-numeric Identifier
+// Zero or more digits, followed by a letter or hyphen, and then zero or
+// more letters, digits, or hyphens.
+
+var NONNUMERICIDENTIFIER = R++;
+src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*';
+
+
+// ## Main Version
+// Three dot-separated numeric identifiers.
+
+var MAINVERSION = R++;
+src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIER] + ')';
+
+var MAINVERSIONLOOSE = R++;
+src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIERLOOSE] + ')';
+
+// ## Pre-release Version Identifier
+// A numeric identifier, or a non-numeric identifier.
+
+var PRERELEASEIDENTIFIER = R++;
+src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +
+ '|' + src[NONNUMERICIDENTIFIER] + ')';
+
+var PRERELEASEIDENTIFIERLOOSE = R++;
+src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +
+ '|' + src[NONNUMERICIDENTIFIER] + ')';
+
+
+// ## Pre-release Version
+// Hyphen, followed by one or more dot-separated pre-release version
+// identifiers.
+
+var PRERELEASE = R++;
+src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +
+ '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))';
+
+var PRERELEASELOOSE = R++;
+src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +
+ '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))';
+
+// ## Build Metadata Identifier
+// Any combination of digits, letters, or hyphens.
+
+var BUILDIDENTIFIER = R++;
+src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+';
+
+// ## Build Metadata
+// Plus sign, followed by one or more period-separated build metadata
+// identifiers.
+
+var BUILD = R++;
+src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
+ '(?:\\.' + src[BUILDIDENTIFIER] + ')*))';
+
+
+// ## Full Version String
+// A main version, followed optionally by a pre-release version and
+// build metadata.
+
+// Note that the only major, minor, patch, and pre-release sections of
+// the version string are capturing groups. The build metadata is not a
+// capturing group, because it should not ever be used in version
+// comparison.
+
+var FULL = R++;
+var FULLPLAIN = 'v?' + src[MAINVERSION] +
+ src[PRERELEASE] + '?' +
+ src[BUILD] + '?';
+
+src[FULL] = '^' + FULLPLAIN + '$';
+
+// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
+// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
+// common in the npm registry.
+var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] +
+ src[PRERELEASELOOSE] + '?' +
+ src[BUILD] + '?';
+
+var LOOSE = R++;
+src[LOOSE] = '^' + LOOSEPLAIN + '$';
+
+var GTLT = R++;
+src[GTLT] = '((?:<|>)?=?)';
+
+// Something like "2.*" or "1.2.x".
+// Note that "x.x" is a valid xRange identifer, meaning "any version"
+// Only the first item is strictly required.
+var XRANGEIDENTIFIERLOOSE = R++;
+src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
+var XRANGEIDENTIFIER = R++;
+src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*';
+
+var XRANGEPLAIN = R++;
+src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:(' + src[PRERELEASE] + ')' +
+ ')?)?)?';
+
+var XRANGEPLAINLOOSE = R++;
+src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:(' + src[PRERELEASELOOSE] + ')' +
+ ')?)?)?';
+
+// >=2.x, for example, means >=2.0.0-0
+// <1.x would be the same as "<1.0.0-0", though.
+var XRANGE = R++;
+src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$';
+var XRANGELOOSE = R++;
+src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$';
+
+// Tilde ranges.
+// Meaning is "reasonably at or greater than"
+var LONETILDE = R++;
+src[LONETILDE] = '(?:~>?)';
+
+var TILDETRIM = R++;
+src[TILDETRIM] = src[LONETILDE] + '\s+';
+var tildeTrimReplace = '$1';
+
+var TILDE = R++;
+src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$';
+var TILDELOOSE = R++;
+src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$';
+
+
+// A simple gt/lt/eq thing, or just "" to indicate "any version"
+var COMPARATORLOOSE = R++;
+src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$';
+var COMPARATOR = R++;
+src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$';
+
+
+// An expression to strip any whitespace between the gtlt and the thing
+// it modifies, so that `> 1.2.3` ==> `>1.2.3`
+var COMPARATORTRIM = R++;
+src[COMPARATORTRIM] = src[GTLT] +
+ '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')';
+
+// this one has to use the /g flag
+re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g');
+
+var comparatorTrimReplace = '$1$2 ';
+
+
+// Something like `1.2.3 - 1.2.4`
+// Note that these all use the loose form, because they'll be
+// checked against either the strict or loose comparator form
+// later.
+var HYPHENRANGE = R++;
+src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[XRANGEPLAIN] + ')' +
+ '\\s*$';
+
+var HYPHENRANGELOOSE = R++;
+src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[XRANGEPLAINLOOSE] + ')' +
+ '\\s*$';
+
+// Star ranges basically just allow anything at all.
+var STAR = R++;
+src[STAR] = '(<|>)?=?\\s*\\*';
+
+// Compile to actual regexp objects.
+// All are flag-free, unless they were created above with a flag.
+for (var i = 0; i < R; i++) {
+ debug(i, src[i]);
+ if (!re[i])
+ re[i] = new RegExp(src[i]);
+}
+
+exports.parse = parse;
+function parse(version, loose) {
+ var r = loose ? re[LOOSE] : re[FULL];
+ return (r.test(version)) ? new SemVer(version, loose) : null;
+}
+
+exports.valid = valid;
+function valid(version, loose) {
+ var v = parse(version, loose);
+ return v ? v.version : null;
+}
-Object.getOwnPropertyNames(expressions).forEach(function (i) {
- exports[i] = function (str) {
- return ("" + (str || "")).match(expressions[i])
+exports.clean = clean;
+function clean(version, loose) {
+ var s = parse(version, loose);
+ return s ? s.version : null;
+}
+
+exports.SemVer = SemVer;
+
+function SemVer(version, loose) {
+ if (version instanceof SemVer) {
+ if (version.loose === loose)
+ return version;
+ else
+ version = version.version;
}
-})
-
-exports.rangeReplace = ">=$1 <=$7"
-exports.clean = clean
-exports.compare = compare
-exports.rcompare = rcompare
-exports.satisfies = satisfies
-exports.gt = gt
-exports.gte = gte
-exports.lt = lt
-exports.lte = lte
-exports.eq = eq
-exports.neq = neq
-exports.cmp = cmp
-exports.inc = inc
-
-exports.valid = valid
-exports.validPackage = validPackage
-exports.validRange = validRange
-exports.maxSatisfying = maxSatisfying
-
-exports.replaceStars = replaceStars
-exports.toComparators = toComparators
-
-function stringify (version) {
- var v = version
- return [v[1]||'', v[2]||'', v[3]||''].join(".") + (v[4]||'') + (v[5]||'')
-}
-
-function clean (version) {
- version = exports.parse(version)
- if (!version) return version
- return stringify(version)
-}
-
-function valid (version) {
- if (typeof version !== "string") return null
- return exports.parse(version) && version.trim().replace(/^[v=]+/, '')
-}
-
-function validPackage (version) {
- if (typeof version !== "string") return null
- return version.match(expressions.parsePackage) && version.trim()
-}
-
-// range can be one of:
-// "1.0.3 - 2.0.0" range, inclusive, like ">=1.0.3 <=2.0.0"
-// ">1.0.2" like 1.0.3 - 9999.9999.9999
-// ">=1.0.2" like 1.0.2 - 9999.9999.9999
-// "<2.0.0" like 0.0.0 - 1.9999.9999
-// ">1.0.2 <2.0.0" like 1.0.3 - 1.9999.9999
-var starExpression = /(<|>)?=?\s*\*/g
- , starReplace = ""
- , compTrimExpression = new RegExp("((<|>)?=|<|>)\\s*("
- +semver+"|"+xRangePlain+")", "g")
- , compTrimReplace = "$1$3"
-
-function toComparators (range) {
- var ret = (range || "").trim()
- .replace(expressions.parseRange, exports.rangeReplace)
- .replace(compTrimExpression, compTrimReplace)
- .split(/\s+/)
- .join(" ")
- .split("||")
- .map(function (orchunk) {
- return orchunk
- .replace(new RegExp("(" + exprLoneSpermy + ")\\s+"), "$1")
- .split(" ")
- .map(replaceXRanges)
- .map(replaceSpermies)
- .map(replaceStars)
- .join(" ").trim()
- })
- .map(function (orchunk) {
- return orchunk
- .trim()
- .split(/\s+/)
- .filter(function (c) { return c.match(expressions.validComparator) })
- })
- .filter(function (c) { return c.length })
- return ret
-}
-
-function replaceStars (stars) {
- return stars.trim().replace(starExpression, starReplace)
-}
-
-// "2.x","2.x.x" --> ">=2.0.0- <2.1.0-"
-// "2.3.x" --> ">=2.3.0- <2.4.0-"
-function replaceXRanges (ranges) {
- return ranges.split(/\s+/)
- .map(replaceXRange)
- .join(" ")
-}
-
-function replaceXRange (version) {
- return version.trim().replace(expressions.parseXRange,
- function (v, gtlt, M, m, p, t) {
- var anyX = !M || M.toLowerCase() === "x" || M === "*"
- || !m || m.toLowerCase() === "x" || m === "*"
- || !p || p.toLowerCase() === "x" || p === "*"
- , ret = v
- if (gtlt && anyX) {
- // just replace x'es with zeroes
- ;(!M || M === "*" || M.toLowerCase() === "x") && (M = 0)
- ;(!m || m === "*" || m.toLowerCase() === "x") && (m = 0)
- ;(!p || p === "*" || p.toLowerCase() === "x") && (p = 0)
- ret = gtlt + M+"."+m+"."+p+"-"
- } else if (!M || M === "*" || M.toLowerCase() === "x") {
- ret = "*" // allow any
- } else if (!m || m === "*" || m.toLowerCase() === "x") {
- // append "-" onto the version, otherwise
- // "1.x.x" matches "2.0.0beta", since the tag
- // *lowers* the version value
- ret = ">="+M+".0.0- <"+(+M+1)+".0.0-"
- } else if (!p || p === "*" || p.toLowerCase() === "x") {
- ret = ">="+M+"."+m+".0- <"+M+"."+(+m+1)+".0-"
+ if (!(this instanceof SemVer))
+ return new SemVer(version, loose);
+
+ debug('SemVer', version, loose);
+ this.loose = loose;
+ var m = version.trim().match(loose ? re[LOOSE] : re[FULL]);
+
+ if (!m)
+ throw new TypeError('Invalid Version: ' + version);
+
+ this.raw = version;
+
+ // these are actually numbers
+ this.major = +m[1];
+ this.minor = +m[2];
+ this.patch = +m[3];
+
+ // numberify any prerelease numeric ids
+ if (!m[4])
+ this.prerelease = [];
+ else
+ this.prerelease = m[4].split('.').map(function(id) {
+ return (/^[0-9]+$/.test(id)) ? +id : id;
+ });
+
+ this.build = m[5] ? m[5].split('.') : [];
+ this.format();
+}
+
+SemVer.prototype.format = function() {
+ this.version = this.major + '.' + this.minor + '.' + this.patch;
+ if (this.prerelease.length)
+ this.version += '-' + this.prerelease.join('.');
+ return this.version;
+};
+
+SemVer.prototype.inspect = function() {
+ return '<SemVer "' + this + '">';
+};
+
+SemVer.prototype.toString = function() {
+ return this.version;
+};
+
+SemVer.prototype.compare = function(other) {
+ debug('SemVer.compare', this.version, this.loose, other);
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ return this.compareMain(other) || this.comparePre(other);
+};
+
+SemVer.prototype.compareMain = function(other) {
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ return compareIdentifiers(this.major, other.major) ||
+ compareIdentifiers(this.minor, other.minor) ||
+ compareIdentifiers(this.patch, other.patch);
+};
+
+SemVer.prototype.comparePre = function(other) {
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ // NOT having a prerelease is > having one
+ if (this.prerelease.length && !other.prerelease.length)
+ return -1;
+ else if (!this.prerelease.length && other.prerelease.length)
+ return 1;
+ else if (!this.prerelease.lenth && !other.prerelease.length)
+ return 0;
+
+ var i = 0;
+ do {
+ var a = this.prerelease[i];
+ var b = other.prerelease[i];
+ debug('prerelease compare', i, a, b);
+ if (a === undefined && b === undefined)
+ return 0;
+ else if (b === undefined)
+ return 1;
+ else if (a === undefined)
+ return -1;
+ else if (a === b)
+ continue;
+ else
+ return compareIdentifiers(a, b);
+ } while (++i);
+};
+
+SemVer.prototype.inc = function(release) {
+ switch (release) {
+ case 'major':
+ this.major++;
+ this.minor = -1;
+ case 'minor':
+ this.minor++;
+ this.patch = -1;
+ case 'patch':
+ this.patch++;
+ this.prerelease = [];
+ break;
+ case 'prerelease':
+ if (this.prerelease.length === 0)
+ this.prerelease = [0];
+ else {
+ var i = this.prerelease.length;
+ while (--i >= 0) {
+ if (typeof this.prerelease[i] === 'number') {
+ this.prerelease[i]++;
+ i = -2;
+ }
+ }
+ if (i === -1) // didn't increment anything
+ this.prerelease.push(0);
+ }
+ break;
+
+ default:
+ throw new Error('invalid increment argument: ' + release);
+ }
+ this.format();
+ return this;
+};
+
+exports.inc = inc;
+function inc(version, release, loose) {
+ try {
+ return new SemVer(version, loose).inc(release).version;
+ } catch (er) {
+ return null;
+ }
+}
+
+exports.compareIdentifiers = compareIdentifiers;
+
+var numeric = /^[0-9]+$/;
+function compareIdentifiers(a, b) {
+ var anum = numeric.test(a);
+ var bnum = numeric.test(b);
+
+ if (anum && bnum) {
+ a = +a;
+ b = +b;
+ }
+
+ return (anum && !bnum) ? -1 :
+ (bnum && !anum) ? 1 :
+ a < b ? -1 :
+ a > b ? 1 :
+ 0;
+}
+
+exports.rcompareIdentifiers = rcompareIdentifiers;
+function rcompareIdentifiers(a, b) {
+ return compareIdentifiers(b, a);
+}
+
+exports.compare = compare;
+function compare(a, b, loose) {
+ return new SemVer(a, loose).compare(b);
+}
+
+exports.compareLoose = compareLoose;
+function compareLoose(a, b) {
+ return compare(a, b, true);
+}
+
+exports.rcompare = rcompare;
+function rcompare(a, b, loose) {
+ return compare(b, a, loose);
+}
+
+exports.sort = sort;
+function sort(list, loose) {
+ return list.sort(function(a, b) {
+ return exports.compare(a, b, loose);
+ });
+}
+
+exports.rsort = rsort;
+function rsort(list, loose) {
+ return list.sort(function(a, b) {
+ return exports.rcompare(a, b, loose);
+ });
+}
+
+exports.gt = gt;
+function gt(a, b, loose) {
+ return compare(a, b, loose) > 0;
+}
+
+exports.lt = lt;
+function lt(a, b, loose) {
+ return compare(a, b, loose) < 0;
+}
+
+exports.eq = eq;
+function eq(a, b, loose) {
+ return compare(a, b, loose) === 0;
+}
+
+exports.neq = neq;
+function neq(a, b, loose) {
+ return compare(a, b, loose) !== 0;
+}
+
+exports.gte = gte;
+function gte(a, b, loose) {
+ return compare(a, b, loose) >= 0;
+}
+
+exports.lte = lte;
+function lte(a, b, loose) {
+ return compare(a, b, loose) <= 0;
+}
+
+exports.cmp = cmp;
+function cmp(a, op, b, loose) {
+ var ret;
+ switch (op) {
+ case '===': ret = a === b; break;
+ case '!==': ret = a !== b; break;
+ case '': case '=': case '==': ret = eq(a, b, loose); break;
+ case '!=': ret = neq(a, b, loose); break;
+ case '>': ret = gt(a, b, loose); break;
+ case '>=': ret = gte(a, b, loose); break;
+ case '<': ret = lt(a, b, loose); break;
+ case '<=': ret = lte(a, b, loose); break;
+ default: throw new TypeError('Invalid operator: ' + op);
+ }
+ return ret;
+}
+
+exports.Comparator = Comparator;
+function Comparator(comp, loose) {
+ if (comp instanceof Comparator) {
+ if (comp.loose === loose)
+ return comp;
+ else
+ comp = comp.value;
+ }
+
+ if (!(this instanceof Comparator))
+ return new Comparator(comp, loose);
+
+ debug('comparator', comp, loose);
+ this.loose = loose;
+ this.parse(comp);
+
+ if (this.semver === ANY)
+ this.value = '';
+ else
+ this.value = this.operator + this.semver.version;
+}
+
+var ANY = {};
+Comparator.prototype.parse = function(comp) {
+ var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
+ var m = comp.match(r);
+
+ if (!m)
+ throw new TypeError('Invalid comparator: ' + comp);
+
+ this.operator = m[1];
+ // if it literally is just '>' or '' then allow anything.
+ if (!m[2])
+ this.semver = ANY;
+ else {
+ this.semver = new SemVer(m[2], this.loose);
+
+ // <1.2.3-rc DOES allow 1.2.3-beta (has prerelease)
+ // >=1.2.3 DOES NOT allow 1.2.3-beta
+ // <=1.2.3 DOES allow 1.2.3-beta
+ // However, <1.2.3 does NOT allow 1.2.3-beta,
+ // even though `1.2.3-beta < 1.2.3`
+ // The assumption is that the 1.2.3 version has something you
+ // *don't* want, so we push the prerelease down to the minimum.
+ if (this.operator === '<' && !this.semver.prerelease.length) {
+ this.semver.prerelease = ['0'];
+ this.semver.format();
}
- return ret
- })
+ }
+};
+
+Comparator.prototype.inspect = function() {
+ return '<SemVer Comparator "' + this + '">';
+};
+
+Comparator.prototype.toString = function() {
+ return this.value;
+};
+
+Comparator.prototype.test = function(version) {
+ debug('Comparator.test', version, this.loose);
+ return (this.semver === ANY) ? true :
+ cmp(version, this.operator, this.semver, this.loose);
+};
+
+
+exports.Range = Range;
+function Range(range, loose) {
+ if ((range instanceof Range) && range.loose === loose)
+ return range;
+
+ if (!(this instanceof Range))
+ return new Range(range, loose);
+
+ this.loose = loose;
+
+ // First, split based on boolean or ||
+ this.raw = range;
+ this.set = range.split(/\s*\|\|\s*/).map(function(range) {
+ return this.parseRange(range.trim());
+ }, this).filter(function(c) {
+ // throw out any that are not relevant for whatever reason
+ return c.length;
+ });
+
+ if (!this.set.length) {
+ throw new TypeError('Invalid SemVer Range: ' + range);
+ }
+
+ this.format();
+}
+
+Range.prototype.inspect = function() {
+ return '<SemVer Range "' + this.range + '">';
+};
+
+Range.prototype.format = function() {
+ this.range = this.set.map(function(comps) {
+ return comps.join(' ').trim();
+ }).join('||').trim();
+ return this.range;
+};
+
+Range.prototype.toString = function() {
+ return this.range;
+};
+
+Range.prototype.parseRange = function(range) {
+ var loose = this.loose;
+ range = range.trim();
+ debug('range', range, loose);
+ // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
+ var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE];
+ range = range.replace(hr, hyphenReplace);
+ debug('hyphen replace', range);
+ // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
+ range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace);
+ debug('comparator trim', range);
+
+ // `~ 1.2.3` => `~1.2.3`
+ range = range.replace(re[TILDETRIM], tildeTrimReplace);
+
+ // normalize spaces
+ range = range.split(/\s+/).join(' ');
+
+ // At this point, the range is completely trimmed and
+ // ready to be split into comparators.
+
+ var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
+ var set = range.split(' ').map(function(comp) {
+ return parseComparator(comp, loose);
+ }).join(' ').split(/\s+/);
+ if (this.loose) {
+ // in loose mode, throw out any that are not valid comparators
+ set = set.filter(function(comp) {
+ return !!comp.match(compRe);
+ });
+ }
+ set = set.map(function(comp) {
+ return new Comparator(comp, loose);
+ });
+
+ return set;
+};
+
+// Mostly just for testing and legacy API reasons
+exports.toComparators = toComparators;
+function toComparators(range, loose) {
+ return new Range(range, loose).set.map(function(comp) {
+ return comp.map(function(c) {
+ return c.value;
+ }).join(' ').trim().split(' ');
+ });
+}
+
+// comprised of xranges, tildes, stars, and gtlt's at this point.
+// already replaced the hyphen ranges
+// turn into a set of JUST comparators.
+function parseComparator(comp, loose) {
+ debug('comp', comp);
+ comp = replaceTildes(comp, loose);
+ debug('tildes', comp);
+ comp = replaceXRanges(comp, loose);
+ debug('xrange', comp);
+ comp = replaceStars(comp, loose);
+ debug('stars', comp);
+ return comp;
+}
+
+function isX(id) {
+ return !id || id.toLowerCase() === 'x' || id === '*';
}
// ~, ~> --> * (any, kinda silly)
@@ -161,146 +660,195 @@ function replaceXRange (version) {
// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
-function replaceSpermies (version) {
- return version.trim().replace(expressions.parseSpermy,
- function (v, gtlt, M, m, p, t) {
- if (gtlt) throw new Error(
- "Using '"+gtlt+"' with ~ makes no sense. Don't do it.")
-
- if (!M || M.toLowerCase() === "x") {
- return ""
- }
- // ~1 == >=1.0.0- <2.0.0-
- if (!m || m.toLowerCase() === "x") {
- return ">="+M+".0.0- <"+(+M+1)+".0.0-"
- }
- // ~1.2 == >=1.2.0- <1.3.0-
- if (!p || p.toLowerCase() === "x") {
- return ">="+M+"."+m+".0- <"+M+"."+(+m+1)+".0-"
- }
- // ~1.2.3 == >=1.2.3- <1.3.0-
- t = t || "-"
- return ">="+M+"."+m+"."+p+t+" <"+M+"."+(+m+1)+".0-"
- })
-}
-
-function validRange (range) {
- range = replaceStars(range)
- var c = toComparators(range)
- return (c.length === 0)
- ? null
- : c.map(function (c) { return c.join(" ") }).join("||")
-}
-
-// returns the highest satisfying version in the list, or undefined
-function maxSatisfying (versions, range) {
- return versions
- .filter(function (v) { return satisfies(v, range) })
- .sort(compare)
- .pop()
-}
-function satisfies (version, range) {
- version = valid(version)
- if (!version) return false
- range = toComparators(range)
- for (var i = 0, l = range.length ; i < l ; i ++) {
- var ok = false
- for (var j = 0, ll = range[i].length ; j < ll ; j ++) {
- var r = range[i][j]
- , gtlt = r.charAt(0) === ">" ? gt
- : r.charAt(0) === "<" ? lt
- : false
- , eq = r.charAt(!!gtlt) === "="
- , sub = (!!eq) + (!!gtlt)
- if (!gtlt) eq = true
- r = r.substr(sub)
- r = (r === "") ? r : valid(r)
- ok = (r === "") || (eq && r === version) || (gtlt && gtlt(version, r))
- if (!ok) break
+function replaceTildes(comp, loose) {
+ return comp.trim().split(/\s+/).map(function(comp) {
+ return replaceTilde(comp, loose);
+ }).join(' ');
+}
+
+function replaceTilde(comp, loose) {
+ var r = loose ? re[TILDELOOSE] : re[TILDE];
+ return comp.replace(r, function(_, M, m, p, pr) {
+ debug('tilde', comp, _, M, m, p, pr);
+ var ret;
+
+ if (isX(M))
+ ret = '';
+ else if (isX(m))
+ ret = '>=' + M + '.0.0-0 <' + (+M + 1) + '.0.0-0';
+ else if (isX(p))
+ // ~1.2 == >=1.2.0- <1.3.0-
+ ret = '>=' + M + '.' + m + '.0-0 <' + M + '.' + (+m + 1) + '.0-0';
+ else if (pr) {
+ debug('replaceTilde pr', pr);
+ if (pr.charAt(0) !== '-')
+ pr = '-' + pr;
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + M + '.' + (+m + 1) + '.0-0';
+ } else
+ // ~1.2.3 == >=1.2.3-0 <1.3.0-0
+ ret = '>=' + M + '.' + m + '.' + p + '-0' +
+ ' <' + M + '.' + (+m + 1) + '.0-0';
+
+ debug('tilde return', ret);
+ return ret;
+ });
+}
+
+function replaceXRanges(comp, loose) {
+ debug('replaceXRanges', comp, loose);
+ return comp.split(/\s+/).map(function(comp) {
+ return replaceXRange(comp, loose);
+ }).join(' ');
+}
+
+function replaceXRange(comp, loose) {
+ comp = comp.trim();
+ var r = loose ? re[XRANGELOOSE] : re[XRANGE];
+ return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
+ debug('xRange', comp, ret, gtlt, M, m, p, pr);
+ var xM = isX(M);
+ var xm = xM || isX(m);
+ var xp = xm || isX(p);
+ var anyX = xp;
+
+ if (gtlt === '=' && anyX)
+ gtlt = '';
+
+ if (gtlt && anyX) {
+ // replace X with 0, and then append the -0 min-prerelease
+ if (xM)
+ M = 0;
+ if (xm)
+ m = 0;
+ if (xp)
+ p = 0;
+
+ if (gtlt === '>') {
+ // >1 => >=2.0.0-0
+ // >1.2 => >=1.3.0-0
+ // >1.2.3 => >= 1.2.4-0
+ gtlt = '>=';
+ if (xM) {
+ // no change
+ } else if (xm) {
+ M = +M + 1;
+ m = 0;
+ p = 0;
+ } else if (xp) {
+ m = +m + 1;
+ p = 0;
+ }
+ }
+
+
+ ret = gtlt + M + '.' + m + '.' + p + '-0';
+ } else if (xM) {
+ // allow any
+ ret = '*';
+ } else if (xm) {
+ // append '-0' onto the version, otherwise
+ // '1.x.x' matches '2.0.0-beta', since the tag
+ // *lowers* the version value
+ ret = '>=' + M + '.0.0-0 <' + (+M + 1) + '.0.0-0';
+ } else if (xp) {
+ ret = '>=' + M + '.' + m + '.0-0 <' + M + '.' + (+m + 1) + '.0-0';
}
- if (ok) return true
- }
- return false
-}
-
-// return v1 > v2 ? 1 : -1
-function compare (v1, v2) {
- var g = gt(v1, v2)
- return g === null ? 0 : g ? 1 : -1
-}
-
-function rcompare (v1, v2) {
- return compare(v2, v1)
-}
-
-function lt (v1, v2) { return gt(v2, v1) }
-function gte (v1, v2) { return !lt(v1, v2) }
-function lte (v1, v2) { return !gt(v1, v2) }
-function eq (v1, v2) { return gt(v1, v2) === null }
-function neq (v1, v2) { return gt(v1, v2) !== null }
-function cmp (v1, c, v2) {
- switch (c) {
- case ">": return gt(v1, v2)
- case "<": return lt(v1, v2)
- case ">=": return gte(v1, v2)
- case "<=": return lte(v1, v2)
- case "==": return eq(v1, v2)
- case "!=": return neq(v1, v2)
- case "===": return v1 === v2
- case "!==": return v1 !== v2
- default: throw new Error("Y U NO USE VALID COMPARATOR!? "+c)
- }
+
+ debug('xRange return', ret);
+
+ return ret;
+ });
}
-// return v1 > v2
-function num (v) {
- return v === undefined ? -1 : parseInt((v||"0").replace(/[^0-9]+/g, ''), 10)
+// Because * is AND-ed with everything else in the comparator,
+// and '' means "any version", just remove the *s entirely.
+function replaceStars(comp, loose) {
+ debug('replaceStars', comp, loose);
+ // Looseness is ignored here. star is always as loose as it gets!
+ return comp.trim().replace(re[STAR], '');
}
-function gt (v1, v2) {
- v1 = exports.parse(v1)
- v2 = exports.parse(v2)
- if (!v1 || !v2) return false
- for (var i = 1; i < 5; i ++) {
- v1[i] = num(v1[i])
- v2[i] = num(v2[i])
- if (v1[i] > v2[i]) return true
- else if (v1[i] !== v2[i]) return false
+// This function is passed to string.replace(re[HYPHENRANGE])
+// M, m, patch, prerelease, build
+// 1.2 - 3.4.5 => >=1.2.0-0 <=3.4.5
+// 1.2.3 - 3.4 => >=1.2.0-0 <3.5.0-0 Any 3.4.x will do
+// 1.2 - 3.4 => >=1.2.0-0 <3.5.0-0
+function hyphenReplace($0,
+ from, fM, fm, fp, fpr, fb,
+ to, tM, tm, tp, tpr, tb) {
+
+ if (isX(fM))
+ from = '';
+ else if (isX(fm))
+ from = '>=' + fM + '.0.0-0';
+ else if (isX(fp))
+ from = '>=' + fM + '.' + fm + '.0-0';
+ else
+ from = '>=' + from;
+
+ if (isX(tM))
+ to = '';
+ else if (isX(tm))
+ to = '<' + (+tM + 1) + '.0.0-0';
+ else if (isX(tp))
+ to = '<' + tM + '.' + (+tm + 1) + '.0-0';
+ else if (tpr)
+ to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;
+ else
+ to = '<=' + to;
+
+ return (from + ' ' + to).trim();
+}
+
+
+// if ANY of the sets match ALL of its comparators, then pass
+Range.prototype.test = function(version) {
+ if (!version)
+ return false;
+ for (var i = 0; i < this.set.length; i++) {
+ if (testSet(this.set[i], version))
+ return true;
+ }
+ return false;
+};
+
+function testSet(set, version) {
+ for (var i = 0; i < set.length; i++) {
+ if (!set[i].test(version))
+ return false;
}
- // no tag is > than any tag, or use lexicographical order.
- var tag1 = v1[5] || ""
- , tag2 = v2[5] || ""
-
- // kludge: null means they were equal. falsey, and detectable.
- // embarrassingly overclever, though, I know.
- return tag1 === tag2 ? null
- : !tag1 ? true
- : !tag2 ? false
- : tag1 > tag2
-}
-
-function inc (version, release) {
- version = exports.parse(version)
- if (!version) return null
-
- var parsedIndexLookup =
- { 'major': 1
- , 'minor': 2
- , 'patch': 3
- , 'build': 4 }
- var incIndex = parsedIndexLookup[release]
- if (incIndex === undefined) return null
-
- var current = num(version[incIndex])
- version[incIndex] = current === -1 ? 1 : current + 1
-
- for (var i = incIndex + 1; i < 5; i ++) {
- if (num(version[i]) !== -1) version[i] = "0"
+ return true;
+}
+
+exports.satisfies = satisfies;
+function satisfies(version, range, loose) {
+ try {
+ range = new Range(range, loose);
+ } catch (er) {
+ return false;
}
+ return range.test(version);
+}
- if (version[4]) version[4] = "-" + version[4]
- version[5] = ""
+exports.maxSatisfying = maxSatisfying;
+function maxSatisfying(versions, range, loose) {
+ return versions.filter(function(version) {
+ return satisfies(version, range, loose);
+ }).sort(compare)[0] || null;
+}
- return stringify(version)
+exports.validRange = validRange;
+function validRange(range, loose) {
+ try {
+ // Return '*' instead of '' so that truthiness works.
+ // This will throw if it's invalid anyway
+ return new Range(range, loose).range || '*';
+ } catch (er) {
+ return null;
+ }
}
-})(typeof exports === "object" ? exports : semver = {})
+
+// Use the define() function if we're in AMD land
+if (typeof define === 'function' && define.amd)
+ define(exports);
diff --git a/node_modules/semver/semver.min.js b/node_modules/semver/semver.min.js
new file mode 100644
index 000000000..3692c20ea
--- /dev/null
+++ b/node_modules/semver/semver.min.js
@@ -0,0 +1 @@
+!function(e){if(typeof module==="object"&&module.exports===e)e=module.exports=O;e.SEMVER_SPEC_VERSION="2.0.0";var r=e.re=[];var t=e.src=[];var n=0;var i=n++;t[i]="0|[1-9]\\d*";var s=n++;t[s]="[0-9]+";var o=n++;t[o]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var a=n++;t[a]="("+t[i]+")\\."+"("+t[i]+")\\."+"("+t[i]+")";var u=n++;t[u]="("+t[s]+")\\."+"("+t[s]+")\\."+"("+t[s]+")";var f=n++;t[f]="(?:"+t[i]+"|"+t[o]+")";var c=n++;t[c]="(?:"+t[s]+"|"+t[o]+")";var l=n++;t[l]="(?:-("+t[f]+"(?:\\."+t[f]+")*))";var p=n++;t[p]="(?:-?("+t[c]+"(?:\\."+t[c]+")*))";var h=n++;t[h]="[0-9A-Za-z-]+";var v=n++;t[v]="(?:\\+("+t[h]+"(?:\\."+t[h]+")*))";var m=n++;var g="v?"+t[a]+t[l]+"?"+t[v]+"?";t[m]="^"+g+"$";var d="[v=\\s]*"+t[u]+t[p]+"?"+t[v]+"?";var w=n++;t[w]="^"+d+"$";var y=n++;t[y]="((?:<|>)?=?)";var $=n++;t[$]=t[s]+"|x|X|\\*";var j=n++;t[j]=t[i]+"|x|X|\\*";var b=n++;t[b]="[v=\\s]*("+t[j]+")"+"(?:\\.("+t[j]+")"+"(?:\\.("+t[j]+")"+"(?:("+t[l]+")"+")?)?)?";var S=n++;t[S]="[v=\\s]*("+t[$]+")"+"(?:\\.("+t[$]+")"+"(?:\\.("+t[$]+")"+"(?:("+t[p]+")"+")?)?)?";var E=n++;t[E]="^"+t[y]+"\\s*"+t[b]+"$";var k=n++;t[k]="^"+t[y]+"\\s*"+t[S]+"$";var x=n++;t[x]="(?:~>?)";var R=n++;t[R]=t[x]+"s+";var V="$1";var I=n++;t[I]="^"+t[x]+t[b]+"$";var C=n++;t[C]="^"+t[x]+t[S]+"$";var A=n++;t[A]="^"+t[y]+"\\s*("+d+")$|^$";var T=n++;t[T]="^"+t[y]+"\\s*("+g+")$|^$";var z=n++;t[z]=t[y]+"\\s*("+d+"|"+t[b]+")";r[z]=new RegExp(t[z],"g");var M="$1$2 ";var P=n++;t[P]="^\\s*("+t[b]+")"+"\\s+-\\s+"+"("+t[b]+")"+"\\s*$";var Z=n++;t[Z]="^\\s*("+t[S]+")"+"\\s+-\\s+"+"("+t[S]+")"+"\\s*$";var q=n++;t[q]="(<|>)?=?\\s*\\*";for(var L=0;L<n;L++){if(!r[L])r[L]=new RegExp(t[L])}e.parse=X;function X(e,t){var n=t?r[w]:r[m];return n.test(e)?new O(e,t):null}e.valid=_;function _(e,r){var t=X(e,r);return t?t.version:null}e.clean=N;function N(e,r){var t=X(e,r);return t?t.version:null}e.SemVer=O;function O(e,t){if(e instanceof O){if(e.loose===t)return e;else e=e.version}if(!(this instanceof O))return new O(e,t);this.loose=t;var n=e.trim().match(t?r[w]:r[m]);if(!n)throw new TypeError("Invalid Version: "+e);this.raw=e;this.major=+n[1];this.minor=+n[2];this.patch=+n[3];if(!n[4])this.prerelease=[];else this.prerelease=n[4].split(".").map(function(e){return/^[0-9]+$/.test(e)?+e:e});this.build=n[5]?n[5].split("."):[];this.format()}O.prototype.format=function(){this.version=this.major+"."+this.minor+"."+this.patch;if(this.prerelease.length)this.version+="-"+this.prerelease.join(".");return this.version};O.prototype.inspect=function(){return'<SemVer "'+this+'">'};O.prototype.toString=function(){return this.version};O.prototype.compare=function(e){if(!(e instanceof O))e=new O(e,this.loose);return this.compareMain(e)||this.comparePre(e)};O.prototype.compareMain=function(e){if(!(e instanceof O))e=new O(e,this.loose);return F(this.major,e.major)||F(this.minor,e.minor)||F(this.patch,e.patch)};O.prototype.comparePre=function(e){if(!(e instanceof O))e=new O(e,this.loose);if(this.prerelease.length&&!e.prerelease.length)return-1;else if(!this.prerelease.length&&e.prerelease.length)return 1;else if(!this.prerelease.lenth&&!e.prerelease.length)return 0;var r=0;do{var t=this.prerelease[r];var n=e.prerelease[r];if(t===undefined&&n===undefined)return 0;else if(n===undefined)return 1;else if(t===undefined)return-1;else if(t===n)continue;else return F(t,n)}while(++r)};O.prototype.inc=function(e){switch(e){case"major":this.major++;this.minor=-1;case"minor":this.minor++;this.patch=-1;case"patch":this.patch++;this.prerelease=[];break;case"prerelease":if(this.prerelease.length===0)this.prerelease=[0];else{var r=this.prerelease.length;while(--r>=0){if(typeof this.prerelease[r]==="number"){this.prerelease[r]++;r=-2}}if(r===-1)this.prerelease.push(0)}break;default:throw new Error("invalid increment argument: "+e)}this.format();return this};e.inc=B;function B(e,r,t){try{return new O(e,t).inc(r).version}catch(n){return null}}e.compareIdentifiers=F;var D=/^[0-9]+$/;function F(e,r){var t=D.test(e);var n=D.test(r);if(t&&n){e=+e;r=+r}return t&&!n?-1:n&&!t?1:e<r?-1:e>r?1:0}e.rcompareIdentifiers=G;function G(e,r){return F(r,e)}e.compare=H;function H(e,r,t){return new O(e,t).compare(r)}e.compareLoose=J;function J(e,r){return H(e,r,true)}e.rcompare=K;function K(e,r,t){return H(r,e,t)}e.sort=Q;function Q(r,t){return r.sort(function(r,n){return e.compare(r,n,t)})}e.rsort=U;function U(r,t){return r.sort(function(r,n){return e.rcompare(r,n,t)})}e.gt=W;function W(e,r,t){return H(e,r,t)>0}e.lt=Y;function Y(e,r,t){return H(e,r,t)<0}e.eq=er;function er(e,r,t){return H(e,r,t)===0}e.neq=rr;function rr(e,r,t){return H(e,r,t)!==0}e.gte=tr;function tr(e,r,t){return H(e,r,t)>=0}e.lte=nr;function nr(e,r,t){return H(e,r,t)<=0}e.cmp=ir;function ir(e,r,t,n){var i;switch(r){case"===":i=e===t;break;case"!==":i=e!==t;break;case"":case"=":case"==":i=er(e,t,n);break;case"!=":i=rr(e,t,n);break;case">":i=W(e,t,n);break;case">=":i=tr(e,t,n);break;case"<":i=Y(e,t,n);break;case"<=":i=nr(e,t,n);break;default:throw new TypeError("Invalid operator: "+r)}return i}e.Comparator=sr;function sr(e,r){if(e instanceof sr){if(e.loose===r)return e;else e=e.value}if(!(this instanceof sr))return new sr(e,r);this.loose=r;this.parse(e);if(this.semver===or)this.value="";else this.value=this.operator+this.semver.version}var or={};sr.prototype.parse=function(e){var t=this.loose?r[A]:r[T];var n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1];if(!n[2])this.semver=or;else{this.semver=new O(n[2],this.loose);if(this.operator==="<"&&!this.semver.prerelease.length){this.semver.prerelease=["0"];this.semver.format()}}};sr.prototype.inspect=function(){return'<SemVer Comparator "'+this+'">'};sr.prototype.toString=function(){return this.value};sr.prototype.test=function(e){return this.semver===or?true:ir(e,this.operator,this.semver,this.loose)};e.Range=ar;function ar(e,r){if(e instanceof ar&&e.loose===r)return e;if(!(this instanceof ar))return new ar(e,r);this.loose=r;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length});if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+e)}this.format()}ar.prototype.inspect=function(){return'<SemVer Range "'+this.range+'">'};ar.prototype.format=function(){this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim();return this.range};ar.prototype.toString=function(){return this.range};ar.prototype.parseRange=function(e){var t=this.loose;e=e.trim();var n=t?r[Z]:r[P];e=e.replace(n,gr);e=e.replace(r[z],M);e=e.replace(r[R],V);e=e.split(/\s+/).join(" ");var i=t?r[A]:r[T];var s=e.split(" ").map(function(e){return fr(e,t)}).join(" ").split(/\s+/);if(this.loose){s=s.filter(function(e){return!!e.match(i)})}s=s.map(function(e){return new sr(e,t)});return s};e.toComparators=ur;function ur(e,r){return new ar(e,r).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function fr(e,r){e=lr(e,r);e=hr(e,r);e=mr(e,r);return e}function cr(e){return!e||e.toLowerCase()==="x"||e==="*"}function lr(e,r){return e.trim().split(/\s+/).map(function(e){return pr(e,r)}).join(" ")}function pr(e,t){var n=t?r[C]:r[I];return e.replace(n,function(e,r,t,n,i){var s;if(cr(r))s="";else if(cr(t))s=">="+r+".0.0-0 <"+(+r+1)+".0.0-0";else if(cr(n))s=">="+r+"."+t+".0-0 <"+r+"."+(+t+1)+".0-0";else if(i){if(i.charAt(0)!=="-")i="-"+i;s=">="+r+"."+t+"."+n+i+" <"+r+"."+(+t+1)+".0-0"}else s=">="+r+"."+t+"."+n+"-0"+" <"+r+"."+(+t+1)+".0-0";return s})}function hr(e,r){return e.split(/\s+/).map(function(e){return vr(e,r)}).join(" ")}function vr(e,t){e=e.trim();var n=t?r[k]:r[E];return e.replace(n,function(e,r,t,n,i,s){var o=cr(t);var a=o||cr(n);var u=a||cr(i);var f=u;if(r==="="&&f)r="";if(r&&f){if(o)t=0;if(a)n=0;if(u)i=0;if(r===">"){r=">=";if(o){}else if(a){t=+t+1;n=0;i=0}else if(u){n=+n+1;i=0}}e=r+t+"."+n+"."+i+"-0"}else if(o){e="*"}else if(a){e=">="+t+".0.0-0 <"+(+t+1)+".0.0-0"}else if(u){e=">="+t+"."+n+".0-0 <"+t+"."+(+n+1)+".0-0"}return e})}function mr(e,t){return e.trim().replace(r[q],"")}function gr(e,r,t,n,i,s,o,a,u,f,c,l,p){if(cr(t))r="";else if(cr(n))r=">="+t+".0.0-0";else if(cr(i))r=">="+t+"."+n+".0-0";else r=">="+r;if(cr(u))a="";else if(cr(f))a="<"+(+u+1)+".0.0-0";else if(cr(c))a="<"+u+"."+(+f+1)+".0-0";else if(l)a="<="+u+"."+f+"."+c+"-"+l;else a="<="+a;return(r+" "+a).trim()}ar.prototype.test=function(e){if(!e)return false;for(var r=0;r<this.set.length;r++){if(dr(this.set[r],e))return true}return false};function dr(e,r){for(var t=0;t<e.length;t++){if(!e[t].test(r))return false}return true}e.satisfies=wr;function wr(e,r,t){try{r=new ar(r,t)}catch(n){return false}return r.test(e)}e.maxSatisfying=yr;function yr(e,r,t){return e.filter(function(e){return wr(e,r,t)}).sort(H)[0]||null}e.validRange=$r;function $r(e,r){try{return new ar(e,r).range||"*"}catch(t){return null}}if(typeof define==="function"&&define.amd)define(e)}(typeof exports==="object"?exports:typeof define==="function"&&define.amd?{}:semver={}); \ No newline at end of file
diff --git a/node_modules/semver/semver.min.js.gz b/node_modules/semver/semver.min.js.gz
new file mode 100644
index 000000000..455d1df78
--- /dev/null
+++ b/node_modules/semver/semver.min.js.gz
Binary files differ
diff --git a/node_modules/semver/test/amd.js b/node_modules/semver/test/amd.js
new file mode 100644
index 000000000..a6041341b
--- /dev/null
+++ b/node_modules/semver/test/amd.js
@@ -0,0 +1,15 @@
+var tap = require('tap');
+var test = tap.test;
+
+test('amd', function(t) {
+ global.define = define;
+ define.amd = true;
+ var defined = null;
+ function define(stuff) {
+ defined = stuff;
+ }
+ var fromRequire = require('../');
+ t.ok(defined, 'amd function called');
+ t.equal(fromRequire, defined, 'amd stuff same as require stuff');
+ t.end();
+});
diff --git a/node_modules/semver/test/index.js b/node_modules/semver/test/index.js
new file mode 100644
index 000000000..2ac51deba
--- /dev/null
+++ b/node_modules/semver/test/index.js
@@ -0,0 +1,516 @@
+var tap = require('tap');
+var test = tap.test;
+var semver = require('../semver.js');
+var eq = semver.eq;
+var gt = semver.gt;
+var lt = semver.lt;
+var neq = semver.neq;
+var cmp = semver.cmp;
+var gte = semver.gte;
+var lte = semver.lte;
+var satisfies = semver.satisfies;
+var validRange = semver.validRange;
+var inc = semver.inc;
+var replaceStars = semver.replaceStars;
+var toComparators = semver.toComparators;
+var SemVer = semver.SemVer;
+var Range = semver.Range;
+
+test('\ncomparison tests', function(t) {
+ // [version1, version2]
+ // version1 should be greater than version2
+ [['0.0.0', '0.0.0-foo'],
+ ['0.0.1', '0.0.0'],
+ ['1.0.0', '0.9.9'],
+ ['0.10.0', '0.9.0'],
+ ['0.99.0', '0.10.0'],
+ ['2.0.0', '1.2.3'],
+ ['v0.0.0', '0.0.0-foo', true],
+ ['v0.0.1', '0.0.0', true],
+ ['v1.0.0', '0.9.9', true],
+ ['v0.10.0', '0.9.0', true],
+ ['v0.99.0', '0.10.0', true],
+ ['v2.0.0', '1.2.3', true],
+ ['0.0.0', 'v0.0.0-foo', true],
+ ['0.0.1', 'v0.0.0', true],
+ ['1.0.0', 'v0.9.9', true],
+ ['0.10.0', 'v0.9.0', true],
+ ['0.99.0', 'v0.10.0', true],
+ ['2.0.0', 'v1.2.3', true],
+ ['1.2.3', '1.2.3-asdf'],
+ ['1.2.3', '1.2.3-4'],
+ ['1.2.3', '1.2.3-4-foo'],
+ ['1.2.3-5-foo', '1.2.3-5'],
+ ['1.2.3-5', '1.2.3-4'],
+ ['1.2.3-5-foo', '1.2.3-5-Foo'],
+ ['3.0.0', '2.7.2+asdf'],
+ ['1.2.3-a.10', '1.2.3-a.5'],
+ ['1.2.3-a.b', '1.2.3-a.5'],
+ ['1.2.3-a.b', '1.2.3-a'],
+ ['1.2.3-a.b.c.10.d.5', '1.2.3-a.b.c.5.d.100']
+ ].forEach(function(v) {
+ var v0 = v[0];
+ var v1 = v[1];
+ var loose = v[2];
+ t.ok(gt(v0, v1, loose), "gt('" + v0 + "', '" + v1 + "')");
+ t.ok(lt(v1, v0, loose), "lt('" + v1 + "', '" + v0 + "')");
+ t.ok(!gt(v1, v0, loose), "!gt('" + v1 + "', '" + v0 + "')");
+ t.ok(!lt(v0, v1, loose), "!lt('" + v0 + "', '" + v1 + "')");
+ t.ok(eq(v0, v0, loose), "eq('" + v0 + "', '" + v0 + "')");
+ t.ok(eq(v1, v1, loose), "eq('" + v1 + "', '" + v1 + "')");
+ t.ok(neq(v0, v1, loose), "neq('" + v0 + "', '" + v1 + "')");
+ t.ok(cmp(v1, '==', v1, loose), "cmp('" + v1 + "' == '" + v1 + "')");
+ t.ok(cmp(v0, '>=', v1, loose), "cmp('" + v0 + "' >= '" + v1 + "')");
+ t.ok(cmp(v1, '<=', v0, loose), "cmp('" + v1 + "' <= '" + v0 + "')");
+ t.ok(cmp(v0, '!=', v1, loose), "cmp('" + v0 + "' != '" + v1 + "')");
+ });
+ t.end();
+});
+
+test('\nequality tests', function(t) {
+ // [version1, version2]
+ // version1 should be equivalent to version2
+ [['1.2.3', 'v1.2.3', true],
+ ['1.2.3', '=1.2.3', true],
+ ['1.2.3', 'v 1.2.3', true],
+ ['1.2.3', '= 1.2.3', true],
+ ['1.2.3', ' v1.2.3', true],
+ ['1.2.3', ' =1.2.3', true],
+ ['1.2.3', ' v 1.2.3', true],
+ ['1.2.3', ' = 1.2.3', true],
+ ['1.2.3-0', 'v1.2.3-0', true],
+ ['1.2.3-0', '=1.2.3-0', true],
+ ['1.2.3-0', 'v 1.2.3-0', true],
+ ['1.2.3-0', '= 1.2.3-0', true],
+ ['1.2.3-0', ' v1.2.3-0', true],
+ ['1.2.3-0', ' =1.2.3-0', true],
+ ['1.2.3-0', ' v 1.2.3-0', true],
+ ['1.2.3-0', ' = 1.2.3-0', true],
+ ['1.2.3-1', 'v1.2.3-1', true],
+ ['1.2.3-1', '=1.2.3-1', true],
+ ['1.2.3-1', 'v 1.2.3-1', true],
+ ['1.2.3-1', '= 1.2.3-1', true],
+ ['1.2.3-1', ' v1.2.3-1', true],
+ ['1.2.3-1', ' =1.2.3-1', true],
+ ['1.2.3-1', ' v 1.2.3-1', true],
+ ['1.2.3-1', ' = 1.2.3-1', true],
+ ['1.2.3-beta', 'v1.2.3-beta', true],
+ ['1.2.3-beta', '=1.2.3-beta', true],
+ ['1.2.3-beta', 'v 1.2.3-beta', true],
+ ['1.2.3-beta', '= 1.2.3-beta', true],
+ ['1.2.3-beta', ' v1.2.3-beta', true],
+ ['1.2.3-beta', ' =1.2.3-beta', true],
+ ['1.2.3-beta', ' v 1.2.3-beta', true],
+ ['1.2.3-beta', ' = 1.2.3-beta', true],
+ ['1.2.3-beta+build', ' = 1.2.3-beta+otherbuild', true],
+ ['1.2.3+build', ' = 1.2.3+otherbuild', true],
+ ['1.2.3-beta+build', '1.2.3-beta+otherbuild'],
+ ['1.2.3+build', '1.2.3+otherbuild'],
+ [' v1.2.3+build', '1.2.3+otherbuild']
+ ].forEach(function(v) {
+ var v0 = v[0];
+ var v1 = v[1];
+ var loose = v[2];
+ t.ok(eq(v0, v1, loose), "eq('" + v0 + "', '" + v1 + "')");
+ t.ok(!neq(v0, v1, loose), "!neq('" + v0 + "', '" + v1 + "')");
+ t.ok(cmp(v0, '==', v1, loose), 'cmp(' + v0 + '==' + v1 + ')');
+ t.ok(!cmp(v0, '!=', v1, loose), '!cmp(' + v0 + '!=' + v1 + ')');
+ t.ok(!cmp(v0, '===', v1, loose), '!cmp(' + v0 + '===' + v1 + ')');
+ t.ok(cmp(v0, '!==', v1, loose), 'cmp(' + v0 + '!==' + v1 + ')');
+ t.ok(!gt(v0, v1, loose), "!gt('" + v0 + "', '" + v1 + "')");
+ t.ok(gte(v0, v1, loose), "gte('" + v0 + "', '" + v1 + "')");
+ t.ok(!lt(v0, v1, loose), "!lt('" + v0 + "', '" + v1 + "')");
+ t.ok(lte(v0, v1, loose), "lte('" + v0 + "', '" + v1 + "')");
+ });
+ t.end();
+});
+
+
+test('\nrange tests', function(t) {
+ // [range, version]
+ // version should be included by range
+ [['1.0.0 - 2.0.0', '1.2.3'],
+ ['1.0.0', '1.0.0'],
+ ['>=*', '0.2.4'],
+ ['', '1.0.0'],
+ ['*', '1.2.3'],
+ ['*', 'v1.2.3-foo', true],
+ ['>=1.0.0', '1.0.0'],
+ ['>=1.0.0', '1.0.1'],
+ ['>=1.0.0', '1.1.0'],
+ ['>1.0.0', '1.0.1'],
+ ['>1.0.0', '1.1.0'],
+ ['<=2.0.0', '2.0.0'],
+ ['<=2.0.0', '1.9999.9999'],
+ ['<=2.0.0', '0.2.9'],
+ ['<2.0.0', '1.9999.9999'],
+ ['<2.0.0', '0.2.9'],
+ ['>= 1.0.0', '1.0.0'],
+ ['>= 1.0.0', '1.0.1'],
+ ['>= 1.0.0', '1.1.0'],
+ ['> 1.0.0', '1.0.1'],
+ ['> 1.0.0', '1.1.0'],
+ ['<= 2.0.0', '2.0.0'],
+ ['<= 2.0.0', '1.9999.9999'],
+ ['<= 2.0.0', '0.2.9'],
+ ['< 2.0.0', '1.9999.9999'],
+ ['<\t2.0.0', '0.2.9'],
+ ['>=0.1.97', 'v0.1.97', true],
+ ['>=0.1.97', '0.1.97'],
+ ['0.1.20 || 1.2.4', '1.2.4'],
+ ['>=0.2.3 || <0.0.1', '0.0.0'],
+ ['>=0.2.3 || <0.0.1', '0.2.3'],
+ ['>=0.2.3 || <0.0.1', '0.2.4'],
+ ['||', '1.3.4'],
+ ['2.x.x', '2.1.3'],
+ ['1.2.x', '1.2.3'],
+ ['1.2.x || 2.x', '2.1.3'],
+ ['1.2.x || 2.x', '1.2.3'],
+ ['x', '1.2.3'],
+ ['2.*.*', '2.1.3'],
+ ['1.2.*', '1.2.3'],
+ ['1.2.* || 2.*', '2.1.3'],
+ ['1.2.* || 2.*', '1.2.3'],
+ ['*', '1.2.3'],
+ ['2', '2.1.2'],
+ ['2.3', '2.3.1'],
+ ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0
+ ['~2.4', '2.4.5'],
+ ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0,
+ ['~1', '1.2.3'], // >=1.0.0 <2.0.0
+ ['~>1', '1.2.3'],
+ ['~> 1', '1.2.3'],
+ ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0,
+ ['~ 1.0', '1.0.2'],
+ ['~ 1.0.3', '1.0.12'],
+ ['>=1', '1.0.0'],
+ ['>= 1', '1.0.0'],
+ ['<1.2', '1.1.1'],
+ ['< 1.2', '1.1.1'],
+ ['1', '1.0.0beta', true],
+ ['~v0.5.4-pre', '0.5.5'],
+ ['~v0.5.4-pre', '0.5.4'],
+ ['=0.7.x', '0.7.2'],
+ ['>=0.7.x', '0.7.2'],
+ ['=0.7.x', '0.7.0-asdf'],
+ ['>=0.7.x', '0.7.0-asdf'],
+ ['<=0.7.x', '0.6.2'],
+ ['~1.2.1 >=1.2.3', '1.2.3'],
+ ['~1.2.1 =1.2.3', '1.2.3'],
+ ['~1.2.1 1.2.3', '1.2.3'],
+ ['~1.2.1 >=1.2.3 1.2.3', '1.2.3'],
+ ['~1.2.1 1.2.3 >=1.2.3', '1.2.3'],
+ ['~1.2.1 1.2.3', '1.2.3'],
+ ['>=1.2.1 1.2.3', '1.2.3'],
+ ['1.2.3 >=1.2.1', '1.2.3'],
+ ['>=1.2.3 >=1.2.1', '1.2.3'],
+ ['>=1.2.1 >=1.2.3', '1.2.3'],
+ ['<=1.2.3', '1.2.3-beta'],
+ ['>1.2', '1.3.0-beta'],
+ ['>=1.2', '1.2.8']
+ ].forEach(function(v) {
+ var range = v[0];
+ var ver = v[1];
+ var loose = v[2];
+ t.ok(satisfies(ver, range, loose), range + ' satisfied by ' + ver);
+ });
+ t.end();
+});
+
+test('\nnegative range tests', function(t) {
+ // [range, version]
+ // version should not be included by range
+ [['1.0.0 - 2.0.0', '2.2.3'],
+ ['1.0.0', '1.0.1'],
+ ['>=1.0.0', '0.0.0'],
+ ['>=1.0.0', '0.0.1'],
+ ['>=1.0.0', '0.1.0'],
+ ['>1.0.0', '0.0.1'],
+ ['>1.0.0', '0.1.0'],
+ ['<=2.0.0', '3.0.0'],
+ ['<=2.0.0', '2.9999.9999'],
+ ['<=2.0.0', '2.2.9'],
+ ['<2.0.0', '2.9999.9999'],
+ ['<2.0.0', '2.2.9'],
+ ['>=0.1.97', 'v0.1.93', true],
+ ['>=0.1.97', '0.1.93'],
+ ['0.1.20 || 1.2.4', '1.2.3'],
+ ['>=0.2.3 || <0.0.1', '0.0.3'],
+ ['>=0.2.3 || <0.0.1', '0.2.2'],
+ ['2.x.x', '1.1.3'],
+ ['2.x.x', '3.1.3'],
+ ['1.2.x', '1.3.3'],
+ ['1.2.x || 2.x', '3.1.3'],
+ ['1.2.x || 2.x', '1.1.3'],
+ ['2.*.*', '1.1.3'],
+ ['2.*.*', '3.1.3'],
+ ['1.2.*', '1.3.3'],
+ ['1.2.* || 2.*', '3.1.3'],
+ ['1.2.* || 2.*', '1.1.3'],
+ ['2', '1.1.2'],
+ ['2.3', '2.4.1'],
+ ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0
+ ['~2.4', '2.3.9'],
+ ['~>3.2.1', '3.3.2'], // >=3.2.1 <3.3.0
+ ['~>3.2.1', '3.2.0'], // >=3.2.1 <3.3.0
+ ['~1', '0.2.3'], // >=1.0.0 <2.0.0
+ ['~>1', '2.2.3'],
+ ['~1.0', '1.1.0'], // >=1.0.0 <1.1.0
+ ['<1', '1.0.0'],
+ ['>=1.2', '1.1.1'],
+ ['1', '2.0.0beta', true],
+ ['~v0.5.4-beta', '0.5.4-alpha'],
+ ['<1', '1.0.0beta', true],
+ ['< 1', '1.0.0beta', true],
+ ['=0.7.x', '0.8.2'],
+ ['>=0.7.x', '0.6.2'],
+ ['<=0.7.x', '0.7.2'],
+ ['<1.2.3', '1.2.3-beta'],
+ ['=1.2.3', '1.2.3-beta'],
+ ['>1.2', '1.2.8'],
+ // invalid ranges never satisfied!
+ ['blerg', '1.2.3']
+ ].forEach(function(v) {
+ var range = v[0];
+ var ver = v[1];
+ var loose = v[2];
+ var found = satisfies(ver, range, loose);
+ t.ok(!found, ver + ' not satisfied by ' + range);
+ });
+ t.end();
+});
+
+test('\nincrement versions test', function(t) {
+ // [version, inc, result]
+ // inc(version, inc) -> result
+ [['1.2.3', 'major', '2.0.0'],
+ ['1.2.3', 'minor', '1.3.0'],
+ ['1.2.3', 'patch', '1.2.4'],
+ ['1.2.3tag', 'major', '2.0.0', true],
+ ['1.2.3-tag', 'major', '2.0.0'],
+ ['1.2.3', 'fake', null],
+ ['fake', 'major', null],
+ ['1.2.3', 'prerelease', '1.2.3-0'],
+ ['1.2.3-0', 'prerelease', '1.2.3-1'],
+ ['1.2.3-alpha.0', 'prerelease', '1.2.3-alpha.1'],
+ ['1.2.3-alpha.1', 'prerelease', '1.2.3-alpha.2'],
+ ['1.2.3-alpha.2', 'prerelease', '1.2.3-alpha.3'],
+ ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-alpha.1.beta'],
+ ['1.2.3-alpha.1.beta', 'prerelease', '1.2.3-alpha.2.beta'],
+ ['1.2.3-alpha.2.beta', 'prerelease', '1.2.3-alpha.3.beta'],
+ ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-alpha.10.1.beta'],
+ ['1.2.3-alpha.10.1.beta', 'prerelease', '1.2.3-alpha.10.2.beta'],
+ ['1.2.3-alpha.10.2.beta', 'prerelease', '1.2.3-alpha.10.3.beta'],
+ ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-alpha.10.beta.1'],
+ ['1.2.3-alpha.10.beta.1', 'prerelease', '1.2.3-alpha.10.beta.2'],
+ ['1.2.3-alpha.10.beta.2', 'prerelease', '1.2.3-alpha.10.beta.3'],
+ ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-alpha.10.beta'],
+ ['1.2.3-alpha.10.beta', 'prerelease', '1.2.3-alpha.11.beta'],
+ ['1.2.3-alpha.11.beta', 'prerelease', '1.2.3-alpha.12.beta']
+ ].forEach(function(v) {
+ var pre = v[0];
+ var what = v[1];
+ var wanted = v[2];
+ var loose = v[3];
+ var found = inc(pre, what, loose);
+ t.equal(found, wanted, 'inc(' + pre + ', ' + what + ') === ' + wanted);
+ });
+
+ t.end();
+});
+
+test('\nvalid range test', function(t) {
+ // [range, result]
+ // validRange(range) -> result
+ // translate ranges into their canonical form
+ [['1.0.0 - 2.0.0', '>=1.0.0 <=2.0.0'],
+ ['1.0.0', '1.0.0'],
+ ['>=*', '>=0.0.0-0'],
+ ['', '*'],
+ ['*', '*'],
+ ['*', '*'],
+ ['>=1.0.0', '>=1.0.0'],
+ ['>1.0.0', '>1.0.0'],
+ ['<=2.0.0', '<=2.0.0'],
+ ['1', '>=1.0.0-0 <2.0.0-0'],
+ ['<=2.0.0', '<=2.0.0'],
+ ['<=2.0.0', '<=2.0.0'],
+ ['<2.0.0', '<2.0.0-0'],
+ ['<2.0.0', '<2.0.0-0'],
+ ['>= 1.0.0', '>=1.0.0'],
+ ['>= 1.0.0', '>=1.0.0'],
+ ['>= 1.0.0', '>=1.0.0'],
+ ['> 1.0.0', '>1.0.0'],
+ ['> 1.0.0', '>1.0.0'],
+ ['<= 2.0.0', '<=2.0.0'],
+ ['<= 2.0.0', '<=2.0.0'],
+ ['<= 2.0.0', '<=2.0.0'],
+ ['< 2.0.0', '<2.0.0-0'],
+ ['< 2.0.0', '<2.0.0-0'],
+ ['>=0.1.97', '>=0.1.97'],
+ ['>=0.1.97', '>=0.1.97'],
+ ['0.1.20 || 1.2.4', '0.1.20||1.2.4'],
+ ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1-0'],
+ ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1-0'],
+ ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1-0'],
+ ['||', '||'],
+ ['2.x.x', '>=2.0.0-0 <3.0.0-0'],
+ ['1.2.x', '>=1.2.0-0 <1.3.0-0'],
+ ['1.2.x || 2.x', '>=1.2.0-0 <1.3.0-0||>=2.0.0-0 <3.0.0-0'],
+ ['1.2.x || 2.x', '>=1.2.0-0 <1.3.0-0||>=2.0.0-0 <3.0.0-0'],
+ ['x', '*'],
+ ['2.*.*', '>=2.0.0-0 <3.0.0-0'],
+ ['1.2.*', '>=1.2.0-0 <1.3.0-0'],
+ ['1.2.* || 2.*', '>=1.2.0-0 <1.3.0-0||>=2.0.0-0 <3.0.0-0'],
+ ['*', '*'],
+ ['2', '>=2.0.0-0 <3.0.0-0'],
+ ['2.3', '>=2.3.0-0 <2.4.0-0'],
+ ['~2.4', '>=2.4.0-0 <2.5.0-0'],
+ ['~2.4', '>=2.4.0-0 <2.5.0-0'],
+ ['~>3.2.1', '>=3.2.1-0 <3.3.0-0'],
+ ['~1', '>=1.0.0-0 <2.0.0-0'],
+ ['~>1', '>=1.0.0-0 <2.0.0-0'],
+ ['~> 1', '>=1.0.0-0 <2.0.0-0'],
+ ['~1.0', '>=1.0.0-0 <1.1.0-0'],
+ ['~ 1.0', '>=1.0.0-0 <1.1.0-0'],
+ ['<1', '<1.0.0-0'],
+ ['< 1', '<1.0.0-0'],
+ ['>=1', '>=1.0.0-0'],
+ ['>= 1', '>=1.0.0-0'],
+ ['<1.2', '<1.2.0-0'],
+ ['< 1.2', '<1.2.0-0'],
+ ['1', '>=1.0.0-0 <2.0.0-0'],
+ ['>01.02.03', '>1.2.3', true],
+ ['>01.02.03', null],
+ ['~1.2.3beta', '>=1.2.3-beta <1.3.0-0', true],
+ ['~1.2.3beta', null]
+ ].forEach(function(v) {
+ var pre = v[0];
+ var wanted = v[1];
+ var loose = v[2];
+ var found = validRange(pre, loose);
+
+ t.equal(found, wanted, 'validRange(' + pre + ') === ' + wanted);
+ });
+
+ t.end();
+});
+
+test('\ncomparators test', function(t) {
+ // [range, comparators]
+ // turn range into a set of individual comparators
+ [['1.0.0 - 2.0.0', [['>=1.0.0', '<=2.0.0']]],
+ ['1.0.0', [['1.0.0']]],
+ ['>=*', [['>=0.0.0-0']]],
+ ['', [['']]],
+ ['*', [['']]],
+ ['*', [['']]],
+ ['>=1.0.0', [['>=1.0.0']]],
+ ['>=1.0.0', [['>=1.0.0']]],
+ ['>=1.0.0', [['>=1.0.0']]],
+ ['>1.0.0', [['>1.0.0']]],
+ ['>1.0.0', [['>1.0.0']]],
+ ['<=2.0.0', [['<=2.0.0']]],
+ ['1', [['>=1.0.0-0', '<2.0.0-0']]],
+ ['<=2.0.0', [['<=2.0.0']]],
+ ['<=2.0.0', [['<=2.0.0']]],
+ ['<2.0.0', [['<2.0.0-0']]],
+ ['<2.0.0', [['<2.0.0-0']]],
+ ['>= 1.0.0', [['>=1.0.0']]],
+ ['>= 1.0.0', [['>=1.0.0']]],
+ ['>= 1.0.0', [['>=1.0.0']]],
+ ['> 1.0.0', [['>1.0.0']]],
+ ['> 1.0.0', [['>1.0.0']]],
+ ['<= 2.0.0', [['<=2.0.0']]],
+ ['<= 2.0.0', [['<=2.0.0']]],
+ ['<= 2.0.0', [['<=2.0.0']]],
+ ['< 2.0.0', [['<2.0.0-0']]],
+ ['<\t2.0.0', [['<2.0.0-0']]],
+ ['>=0.1.97', [['>=0.1.97']]],
+ ['>=0.1.97', [['>=0.1.97']]],
+ ['0.1.20 || 1.2.4', [['0.1.20'], ['1.2.4']]],
+ ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1-0']]],
+ ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1-0']]],
+ ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1-0']]],
+ ['||', [[''], ['']]],
+ ['2.x.x', [['>=2.0.0-0', '<3.0.0-0']]],
+ ['1.2.x', [['>=1.2.0-0', '<1.3.0-0']]],
+ ['1.2.x || 2.x', [['>=1.2.0-0', '<1.3.0-0'], ['>=2.0.0-0', '<3.0.0-0']]],
+ ['1.2.x || 2.x', [['>=1.2.0-0', '<1.3.0-0'], ['>=2.0.0-0', '<3.0.0-0']]],
+ ['x', [['']]],
+ ['2.*.*', [['>=2.0.0-0', '<3.0.0-0']]],
+ ['1.2.*', [['>=1.2.0-0', '<1.3.0-0']]],
+ ['1.2.* || 2.*', [['>=1.2.0-0', '<1.3.0-0'], ['>=2.0.0-0', '<3.0.0-0']]],
+ ['1.2.* || 2.*', [['>=1.2.0-0', '<1.3.0-0'], ['>=2.0.0-0', '<3.0.0-0']]],
+ ['*', [['']]],
+ ['2', [['>=2.0.0-0', '<3.0.0-0']]],
+ ['2.3', [['>=2.3.0-0', '<2.4.0-0']]],
+ ['~2.4', [['>=2.4.0-0', '<2.5.0-0']]],
+ ['~2.4', [['>=2.4.0-0', '<2.5.0-0']]],
+ ['~>3.2.1', [['>=3.2.1-0', '<3.3.0-0']]],
+ ['~1', [['>=1.0.0-0', '<2.0.0-0']]],
+ ['~>1', [['>=1.0.0-0', '<2.0.0-0']]],
+ ['~> 1', [['>=1.0.0-0', '<2.0.0-0']]],
+ ['~1.0', [['>=1.0.0-0', '<1.1.0-0']]],
+ ['~ 1.0', [['>=1.0.0-0', '<1.1.0-0']]],
+ ['~ 1.0.3', [['>=1.0.3-0', '<1.1.0-0']]],
+ ['~> 1.0.3', [['>=1.0.3-0', '<1.1.0-0']]],
+ ['<1', [['<1.0.0-0']]],
+ ['< 1', [['<1.0.0-0']]],
+ ['>=1', [['>=1.0.0-0']]],
+ ['>= 1', [['>=1.0.0-0']]],
+ ['<1.2', [['<1.2.0-0']]],
+ ['< 1.2', [['<1.2.0-0']]],
+ ['1', [['>=1.0.0-0', '<2.0.0-0']]],
+ ['1 2', [['>=1.0.0-0', '<2.0.0-0', '>=2.0.0-0', '<3.0.0-0']]],
+ ['1.2 - 3.4.5', [['>=1.2.0-0', '<=3.4.5']]],
+ ['1.2.3 - 3.4', [['>=1.2.3', '<3.5.0-0']]]
+ ].forEach(function(v) {
+ var pre = v[0];
+ var wanted = v[1];
+ var found = toComparators(v[0]);
+ var jw = JSON.stringify(wanted);
+ t.equivalent(found, wanted, 'toComparators(' + pre + ') === ' + jw);
+ });
+
+ t.end();
+});
+
+test('\nstrict vs loose version numbers', function(t) {
+ [['=1.2.3', '1.2.3'],
+ ['01.02.03', '1.2.3'],
+ ['1.2.3-beta.01', '1.2.3-beta.1'],
+ [' =1.2.3', '1.2.3'],
+ ['1.2.3foo', '1.2.3-foo']
+ ].forEach(function(v) {
+ var loose = v[0];
+ var strict = v[1];
+ t.throws(function() {
+ new SemVer(loose);
+ });
+ var lv = new SemVer(loose, true);
+ t.equal(lv.version, strict);
+ t.ok(eq(loose, strict, true));
+ t.throws(function() {
+ eq(loose, strict);
+ });
+ t.throws(function() {
+ new SemVer(strict).compare(loose);
+ });
+ });
+ t.end();
+});
+
+test('\nstrict vs loose ranges', function(t) {
+ [['>=01.02.03', '>=1.2.3'],
+ ['~1.02.03beta', '>=1.2.3-beta <1.3.0-0']
+ ].forEach(function(v) {
+ var loose = v[0];
+ var comps = v[1];
+ t.throws(function() {
+ new Range(loose);
+ });
+ t.equal(new Range(loose, true).range, comps);
+ });
+ t.end();
+});
diff --git a/node_modules/semver/test/no-module.js b/node_modules/semver/test/no-module.js
new file mode 100644
index 000000000..96d1cd1fc
--- /dev/null
+++ b/node_modules/semver/test/no-module.js
@@ -0,0 +1,19 @@
+var tap = require('tap');
+var test = tap.test;
+
+test('no module system', function(t) {
+ var fs = require('fs');
+ var vm = require('vm');
+ var head = fs.readFileSync(require.resolve('../head.js'), 'utf8');
+ var src = fs.readFileSync(require.resolve('../'), 'utf8');
+ var foot = fs.readFileSync(require.resolve('../foot.js'), 'utf8');
+ vm.runInThisContext(head + src + foot, 'semver.js');
+
+ // just some basic poking to see if it did some stuff
+ t.type(global.semver, 'object');
+ t.type(global.semver.SemVer, 'function');
+ t.type(global.semver.Range, 'function');
+ t.ok(global.semver.satisfies('1.2.3', '1.2'));
+ t.end();
+});
+