Skip to content
This repository was archived by the owner on Aug 11, 2022. It is now read-only.

Commit be393a2

Browse files
iarnazkat
authored andcommitted
audit: Temporarily suppress git metadata till there's an opt-in
PR-URL: #20389 Credit: @iarna Reviewed-By: @zkat
1 parent 8c77dde commit be393a2

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

lib/install/audit.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,11 @@ exports.printInstallReport = printInstallReport
77
exports.printFullReport = printFullReport
88

99
const Bluebird = require('bluebird')
10-
const fs = require('graceful-fs')
11-
const readFile = Bluebird.promisify(fs.readFile)
1210
const auditReport = require('npm-audit-report')
1311
const treeToShrinkwrap = require('../shrinkwrap.js').treeToShrinkwrap
1412
const packageId = require('../utils/package-id.js')
1513
const output = require('../utils/output.js')
1614
const npm = require('../npm.js')
17-
const path = require('path')
18-
const spawn = require('child_process').spawn
1915
const qw = require('qw')
2016
const registryFetch = require('npm-registry-fetch')
2117
const zlib = require('zlib')
@@ -208,9 +204,9 @@ function generateMetadata () {
208204
meta.platform = process.platform
209205
meta.node_env = process.env.NODE_ENV
210206

211-
// TODO strip auth data from git: modules, paths from file:, resolved
212-
// maybe more: top level name/version
213-
207+
return Promise.resolve(meta)
208+
}
209+
/*
214210
const head = path.resolve(npm.prefix, '.git/HEAD')
215211
return readFile(head, 'utf8').then((head) => {
216212
if (!head.match(/^ref: /)) {
@@ -231,7 +227,7 @@ function generateMetadata () {
231227
})
232228
})
233229
}).then(() => meta, () => meta)
234-
}
230+
*/
235231

236232
function generateFromInstall (tree, diffs, install, remove) {
237233
const requires = {}

0 commit comments

Comments
 (0)