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

Commit

Permalink
audit: Temporarily suppress git metadata till there's an opt-in
Browse files Browse the repository at this point in the history
PR-URL: #20389
Credit: @iarna
Reviewed-By: @zkat
  • Loading branch information
iarna authored and zkat committed Apr 20, 2018
1 parent 8c77dde commit be393a2
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions lib/install/audit.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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: /)) {
Expand All @@ -231,7 +227,7 @@ function generateMetadata () {
})
})
}).then(() => meta, () => meta)
}
*/

function generateFromInstall (tree, diffs, install, remove) {
const requires = {}
Expand Down

0 comments on commit be393a2

Please sign in to comment.