summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/npm-audit-report/reporters/detail.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/npm-audit-report/reporters/detail.js')
-rw-r--r--deps/npm/node_modules/npm-audit-report/reporters/detail.js15
1 files changed, 3 insertions, 12 deletions
diff --git a/deps/npm/node_modules/npm-audit-report/reporters/detail.js b/deps/npm/node_modules/npm-audit-report/reporters/detail.js
index f4f96b6771..2cbb8fea50 100644
--- a/deps/npm/node_modules/npm-audit-report/reporters/detail.js
+++ b/deps/npm/node_modules/npm-audit-report/reporters/detail.js
@@ -1,7 +1,7 @@
'use strict'
const summary = require('./install.js').summary
-const Table = require('cli-table2')
+const Table = require('cli-table3')
const Utils = require('../lib/utils')
const report = function (data, options) {
@@ -37,17 +37,8 @@ const report = function (data, options) {
}
const footer = function (data) {
- let total = 0
- const sev = []
-
- const keys = Object.keys(data.metadata.vulnerabilities)
- for (let key of keys) {
- const value = data.metadata.vulnerabilities[key]
- total = total + value
- if (value > 0) {
- sev.push([key, value])
- }
- }
+ const total = Utils.totalVulnCount(data.metadata.vulnerabilities)
+
if (total > 0) {
exit = 1
}