From e6883c1f6483dd8f2ac0c00b7a0de829ae0713df Mon Sep 17 00:00:00 2001 From: Hiroo Ono Date: Tue, 9 Jul 2024 05:42:53 +0900 Subject: [PATCH] Change lsStreamOpts to a single value lsStreamConcurrency. According to review in https://github.com/npm/cli/pull/7631 --- node_modules/cacache/lib/entry-index.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/node_modules/cacache/lib/entry-index.js b/node_modules/cacache/lib/entry-index.js index ace910c113c73..f73a11ca29ddf 100644 --- a/node_modules/cacache/lib/entry-index.js +++ b/node_modules/cacache/lib/entry-index.js @@ -20,9 +20,7 @@ const indexV = require('../package.json')['cache-version'].index const { moveFile } = require('@npmcli/fs') const pMap = require('p-map') -const lsStreamOpts = { - concurrency: 5, -} +const lsStreamConcurrency = 5 module.exports.NotFoundError = class NotFoundError extends Error { @@ -220,11 +218,11 @@ function lsStream (cache) { throw err } }, - { concurrency: lsStreamOpts.concurrency }) + { concurrency: lsStreamConcurrency }) }, - { concurrency: lsStreamOpts.concurrency }) + { concurrency: lsStreamConcurrency }) }, - { concurrency: lsStreamOpts.concurrency }) + { concurrency: lsStreamConcurrency }) stream.end() return stream }).catch(err => stream.emit('error', err))