diff options
author | Myles Borins <myles.borins@gmail.com> | 2017-10-26 22:35:25 -0400 |
---|---|---|
committer | Myles Borins <myles.borins@gmail.com> | 2017-10-29 21:32:15 -0400 |
commit | ace4fe566fc3af4876c7458f983feeb5eae3df26 (patch) | |
tree | 458d847e9bd56199cd0d8b34cec126c7410fb6ca /deps/npm/lib/install/action/extract.js | |
parent | 64168eb9b43e30e4c0b986c9b29c41be63e85df6 (diff) | |
download | android-node-v8-ace4fe566fc3af4876c7458f983feeb5eae3df26.tar.gz android-node-v8-ace4fe566fc3af4876c7458f983feeb5eae3df26.tar.bz2 android-node-v8-ace4fe566fc3af4876c7458f983feeb5eae3df26.zip |
deps: update npm to 5.5.1
Closes: https://github.com/nodejs/node/pull/16280
PR-URL: https://github.com/nodejs/node/pull/16509
Fixes: https://github.com/nodejs/node/issues/14161
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Diffstat (limited to 'deps/npm/lib/install/action/extract.js')
-rw-r--r-- | deps/npm/lib/install/action/extract.js | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/deps/npm/lib/install/action/extract.js b/deps/npm/lib/install/action/extract.js index 5534e8b28a..8e80d4adda 100644 --- a/deps/npm/lib/install/action/extract.js +++ b/deps/npm/lib/install/action/extract.js @@ -20,16 +20,34 @@ const workerFarm = require('worker-farm') const WORKER_PATH = require.resolve('./extract-worker.js') let workers +// NOTE: temporarily disabled on non-OSX due to ongoing issues: +// +// * Seems to make Windows antivirus issues much more common +// * Messes with Docker (I think) +// +// There are other issues that should be fixed that affect OSX too: +// +// * Logging is messed up right now because pacote does its own thing +// * Global deduplication in pacote breaks due to multiple procs +// +// As these get fixed, we can start experimenting with re-enabling it +// at least on some platforms. +const ENABLE_WORKERS = process.platform === 'darwin' + extract.init = () => { - workers = workerFarm({ - maxConcurrentCallsPerWorker: npm.limit.fetch, - maxRetries: 1 - }, WORKER_PATH) + if (ENABLE_WORKERS) { + workers = workerFarm({ + maxConcurrentCallsPerWorker: npm.limit.fetch, + maxRetries: 1 + }, WORKER_PATH) + } return BB.resolve() } extract.teardown = () => { - workerFarm.end(workers) - workers = null + if (ENABLE_WORKERS) { + workerFarm.end(workers) + workers = null + } return BB.resolve() } module.exports = extract @@ -54,7 +72,7 @@ function extract (staging, pkg, log) { let msg = args const spec = typeof args[0] === 'string' ? npa(args[0]) : args[0] args[0] = spec.raw - if (spec.registry || spec.type === 'remote') { + if (ENABLE_WORKERS && (spec.registry || spec.type === 'remote')) { // We can't serialize these options opts.loglevel = opts.log.level opts.log = null |