semver 1.0.13 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/semver.js +1 -1
- package/test.js +8 -0
package/package.json
CHANGED
package/semver.js
CHANGED
|
@@ -14,7 +14,7 @@ var semver = "\\s*[v=]*\\s*([0-9]+)" // major
|
|
|
14
14
|
+ "(?:\\.([0-9]+|x|X|\\*)"
|
|
15
15
|
+ "(?:\\.([0-9]+|x|X|\\*)"
|
|
16
16
|
+ "([a-zA-Z-][a-zA-Z0-9-\.:]*)?)?)?"
|
|
17
|
-
, xRange = "((?:<|>)
|
|
17
|
+
, xRange = "((?:<|>)=?)?\\s*" + xRangePlain
|
|
18
18
|
, exprSpermy = "(?:~>?)"+xRange
|
|
19
19
|
, expressions = exports.expressions =
|
|
20
20
|
{ parse : new RegExp("^\\s*"+semver+"\\s*$")
|
package/test.js
CHANGED
|
@@ -171,6 +171,11 @@ test("\nrange tests", function (t) {
|
|
|
171
171
|
, ["1", "1.0.0beta"]
|
|
172
172
|
, ["~v0.5.4-pre", "0.5.5"]
|
|
173
173
|
, ["~v0.5.4-pre", "0.5.4"]
|
|
174
|
+
, ["=0.7.x", "0.7.2"]
|
|
175
|
+
, [">=0.7.x", "0.7.2"]
|
|
176
|
+
, ["=0.7.x", "0.7.0-asdf"]
|
|
177
|
+
, [">=0.7.x", "0.7.0-asdf"]
|
|
178
|
+
, ["<=0.7.x", "0.6.2"]
|
|
174
179
|
].forEach(function (v) {
|
|
175
180
|
t.ok(satisfies(v[1], v[0]), v[0]+" satisfied by "+v[1])
|
|
176
181
|
})
|
|
@@ -220,6 +225,9 @@ test("\nnegative range tests", function (t) {
|
|
|
220
225
|
, ["~v0.5.4-beta", "0.5.4-alpha"]
|
|
221
226
|
, ["<1", "1.0.0beta"]
|
|
222
227
|
, ["< 1", "1.0.0beta"]
|
|
228
|
+
, ["=0.7.x", "0.8.2"]
|
|
229
|
+
, [">=0.7.x", "0.6.2"]
|
|
230
|
+
, ["<=0.7.x", "0.7.2"]
|
|
223
231
|
].forEach(function (v) {
|
|
224
232
|
t.ok(!satisfies(v[1], v[0]), v[0]+" not satisfied by "+v[1])
|
|
225
233
|
})
|