Comparing version 6.0.1 to 6.1.0
@@ -20,3 +20,3 @@ { | ||
], | ||
"version": "6.0.1", | ||
"version": "6.1.0", | ||
"license": "Apache-2.0", | ||
@@ -40,3 +40,3 @@ "homepage": "https://github.com/mozilla/node-convict", | ||
}, | ||
"gitHead": "7e068d8e41375b065ffe3c14376092d9342a4475" | ||
"gitHead": "41e8c4ad755483e31c5a602bb4856d82318c0ab6" | ||
} |
@@ -81,2 +81,8 @@ # Convict | ||
} | ||
}, | ||
admins: { | ||
doc: 'Users with write access, or null to grant full access without login.', | ||
format: Array, | ||
nullable: true, | ||
default: null | ||
} | ||
@@ -165,2 +171,3 @@ }); | ||
* **Sensitive values and secrets**: If `sensitive` is set to `true`, this value will be masked to `"[Sensitive]"` when `config.toString()` is called. This helps avoid disclosing secret keys when printing configuration at application start for debugging purposes. | ||
* **Null values**: If `nullable` is set to `true`, the value counts as valid not only if it matches the specified `format`, but also when it is `null`. | ||
@@ -185,2 +192,4 @@ | ||
If `nullable` is set to true, `null` will be a valid value as well. | ||
#### Custom format checking | ||
@@ -187,0 +196,0 @@ |
@@ -297,2 +297,7 @@ /** | ||
o._format = function(x) { | ||
// accept null if allowed before calling any format function | ||
if (this.nullable && x === null) { | ||
return | ||
} | ||
try { | ||
@@ -567,3 +572,3 @@ newFormat(x, this) | ||
const parent = walk(this._instance, parentKey, true) | ||
parent[childKey] = v | ||
parent[childKey] = v | ||
} | ||
@@ -570,0 +575,0 @@ return this |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
41428
678
627
0