diff options
author | Rebecca Turner <me@re-becca.org> | 2018-04-20 04:33:45 +0300 |
---|---|---|
committer | Kat Marchán <kzm@zkat.tech> | 2018-04-21 00:05:25 +0300 |
commit | be393a290a5207dc75d3d70a32973afb3322306c (patch) | |
tree | eaa377c13850cedc1cf028056e07ef1763835e9a /lib | |
parent | 8c77dde74a9d8f9007667cd1732c3329e0d52617 (diff) |
audit: Temporarily suppress git metadata till there's an opt-in
PR-URL: https://github.com/npm/npm/pull/20389
Credit: @iarna
Reviewed-By: @zkat
Diffstat (limited to 'lib')
-rw-r--r-- | lib/install/audit.js | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/install/audit.js b/lib/install/audit.js index 169f03ce0..d61a8945f 100644 --- a/lib/install/audit.js +++ b/lib/install/audit.js @@ -7,15 +7,11 @@ exports.printInstallReport = printInstallReport exports.printFullReport = printFullReport const Bluebird = require('bluebird') -const fs = require('graceful-fs') -const readFile = Bluebird.promisify(fs.readFile) const auditReport = require('npm-audit-report') const treeToShrinkwrap = require('../shrinkwrap.js').treeToShrinkwrap const packageId = require('../utils/package-id.js') const output = require('../utils/output.js') const npm = require('../npm.js') -const path = require('path') -const spawn = require('child_process').spawn const qw = require('qw') const registryFetch = require('npm-registry-fetch') const zlib = require('zlib') @@ -208,9 +204,9 @@ function generateMetadata () { meta.platform = process.platform meta.node_env = process.env.NODE_ENV - // TODO strip auth data from git: modules, paths from file:, resolved - // maybe more: top level name/version - + return Promise.resolve(meta) +} +/* const head = path.resolve(npm.prefix, '.git/HEAD') return readFile(head, 'utf8').then((head) => { if (!head.match(/^ref: /)) { @@ -231,7 +227,7 @@ function generateMetadata () { }) }) }).then(() => meta, () => meta) -} +*/ function generateFromInstall (tree, diffs, install, remove) { const requires = {} |