diff options
author | Gar <gar+gh@danger.computer> | 2021-03-23 20:28:37 +0300 |
---|---|---|
committer | Gar <gar+gh@danger.computer> | 2021-03-24 20:27:01 +0300 |
commit | 98efadeb4b2ae9289f14ed6f42a169230faf7239 (patch) | |
tree | 0ed581cd1b0c649364655d4d893962db7e0fcb00 /lib | |
parent | 0379eab698b78ae4aa89bbe2043607f420e52f11 (diff) |
fix(audit-level): add `info` audit level
This is a valid level but wasn't configured to be allowed.
Also added this param to the usage output for `npm audit`
PR-URL: https://github.com/npm/cli/pull/2923
Credit: @wraithgar
Close: #2923
Reviewed-by: @ruyadorno
Diffstat (limited to 'lib')
-rw-r--r-- | lib/audit.js | 1 | ||||
-rw-r--r-- | lib/utils/config/definitions.js | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/audit.js b/lib/audit.js index f990e1fa5..9df269858 100644 --- a/lib/audit.js +++ b/lib/audit.js @@ -18,6 +18,7 @@ class Audit extends BaseCommand { /* istanbul ignore next - see test/lib/load-all-commands.js */ static get params () { return [ + 'audit-level', 'dry-run', 'force', 'json', diff --git a/lib/utils/config/definitions.js b/lib/utils/config/definitions.js index b8e021c52..e8cdbec3e 100644 --- a/lib/utils/config/definitions.js +++ b/lib/utils/config/definitions.js @@ -220,7 +220,7 @@ define('audit', { define('audit-level', { default: null, - type: ['low', 'moderate', 'high', 'critical', 'none', null], + type: ['info', 'low', 'moderate', 'high', 'critical', 'none', null], description: ` The minimum level of vulnerability for \`npm audit\` to exit with a non-zero exit code. |