diff options
-rw-r--r-- | lib/config/pacote.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/config/pacote.js b/lib/config/pacote.js index 705544fe3..9f2d35678 100644 --- a/lib/config/pacote.js +++ b/lib/config/pacote.js @@ -2,6 +2,7 @@ const Buffer = require('safe-buffer').Buffer +const crypto = require("crypto") const npm = require('../npm') const log = require('npmlog') let pack @@ -9,6 +10,9 @@ const path = require('path') let effectiveOwner +const npmSession = crypto.randomBytes(8).toString('hex') +log.verbose('npm-session', npmSession) + module.exports = pacoteOpts function pacoteOpts (moreOpts) { if (!pack) { @@ -24,6 +28,7 @@ function pacoteOpts (moreOpts) { log: log, maxAge: npm.config.get('cache-min'), maxSockets: npm.config.get('maxsockets'), + npmSession: npmSession, offline: npm.config.get('offline'), preferOffline: npm.config.get('prefer-offline') || npm.config.get('cache-min') > 9999, preferOnline: npm.config.get('prefer-online') || npm.config.get('cache-max') <= 0, |