Comparing version 2.0.7 to 2.0.8
@@ -19,3 +19,3 @@ // defaults, types, and shorthands. | ||
log = { warn: function (m) { | ||
console.warn(m + util.format.apply(util, [].slice.call(arguments, 1))) | ||
console.warn(m + ' ' + util.format.apply(util, [].slice.call(arguments, 1))) | ||
} } | ||
@@ -44,2 +44,8 @@ } | ||
function validateTag (data, k, val) { | ||
val = val.trim() | ||
if (!val || semver.validRange(val)) return false | ||
data[k] = val | ||
} | ||
function validateStream (data, k, val) { | ||
@@ -54,2 +60,6 @@ if (!(val instanceof Stream)) return false | ||
// Don't let --tag=1.2.3 ever be a thing | ||
var tag = {} | ||
nopt.typeDefs.tag = { type: tag, validate: validateTag } | ||
nopt.invalidHandler = function (k, val, type) { | ||
@@ -64,2 +74,5 @@ log.warn("invalid config", k + "=" + JSON.stringify(val)) | ||
switch (type) { | ||
case tag: | ||
log.warn("invalid config", "Tag must not be a SemVer range") | ||
break | ||
case Octal: | ||
@@ -308,3 +321,3 @@ log.warn("invalid config", "Must be octal number, starting with 0") | ||
, "strict-ssl": Boolean | ||
, tag : String | ||
, tag : tag | ||
, tmp : path | ||
@@ -311,0 +324,0 @@ , unicode : Boolean |
{ | ||
"name": "npmconf", | ||
"version": "2.0.7", | ||
"version": "2.0.8", | ||
"description": "The config thing npm uses", | ||
@@ -5,0 +5,0 @@ "main": "npmconf.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
48329
28
1422