@npmcli/config
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -375,5 +375,13 @@ // TODO: set the scope config from package.json or explicit cli config | ||
const mustBe = typeDescription(type) | ||
const msg = 'Must be' + (mustBe.length > 1 ? ' one of:' : '') | ||
const desc = mustBe.length === 1 ? mustBe[0] : mustBe | ||
const typeDesc = typeDescription(type) | ||
const oneOrMore = typeDesc.indexOf(Array) !== -1 | ||
const mustBe = typeDesc | ||
.filter(m => m !== undefined && m !== Array) | ||
const oneOf = mustBe.length === 1 && oneOrMore ? ' one or more' | ||
: mustBe.length > 1 && oneOrMore ? ' one or more of:' | ||
: mustBe.length > 1 ? ' one of:' | ||
: '' | ||
const msg = 'Must be' + oneOf | ||
const desc = mustBe.length === 1 ? mustBe[0] | ||
: mustBe.filter(m => m !== Array).join(', ') | ||
this.log.warn('invalid config', msg, desc) | ||
@@ -380,0 +388,0 @@ } |
{ | ||
"name": "@npmcli/config", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"files": [ | ||
@@ -5,0 +5,0 @@ "lib" |
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
904
41820
12