Skip to content

Commit

Permalink
Change lsStreamOpts to a single value lsStreamConcurrency.
Browse files Browse the repository at this point in the history
According to review in #7631
  • Loading branch information
oikumene committed Jul 8, 2024
1 parent 4055fbf commit e6883c1
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions node_modules/cacache/lib/entry-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit e6883c1

Please # to comment.