feat: limit network concurrency

This commit is contained in:
zkochan
2017-02-02 22:08:19 +02:00
committed by Zoltan Kochan
parent 5f07768d2d
commit 400f6bed21
7 changed files with 18 additions and 7 deletions

View File

@@ -23,6 +23,7 @@ const defaults = () => (<StrictPnpmOptions>{
depth: 0,
engineStrict: false,
metaCache: new Map(),
networkConcurrency: 16,
})
export default (opts?: PnpmOptions): StrictPnpmOptions => {

View File

@@ -87,7 +87,7 @@ async function installInContext (installType: string, packagesToInstall: Depende
tag: opts.tag,
engineStrict: opts.engineStrict,
nodeVersion: opts.nodeVersion,
got: createGot(client),
got: createGot(client, {networkConcurrency: opts.networkConcurrency}),
fetchingFiles: Promise.resolve(),
baseNodeModules: nodeModulesPath,
metaCache: opts.metaCache,