Skip to content

Commit e56c7fc

Browse files
authored
deps: update p-map from ^4.0.0 to ^7.0.2 (#302)
1 parent b52d649 commit e56c7fc

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

lib/entry-index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ const hashToSegments = require('./util/hash-to-segments')
1919
const indexV = require('../package.json')['cache-version'].index
2020
const { moveFile } = require('@npmcli/fs')
2121

22-
const pMap = require('p-map')
2322
const lsStreamConcurrency = 5
2423

2524
module.exports.NotFoundError = class NotFoundError extends Error {
@@ -184,6 +183,7 @@ function lsStream (cache) {
184183

185184
// Set all this up to run on the stream and then just return the stream
186185
Promise.resolve().then(async () => {
186+
const { default: pMap } = await import('p-map')
187187
const buckets = await readdirOrEmpty(indexDir)
188188
await pMap(buckets, async (bucket) => {
189189
const bucketPath = path.join(indexDir, bucket)

lib/verify.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const {
88
truncate,
99
writeFile,
1010
} = require('fs/promises')
11-
const pMap = require('p-map')
1211
const contentPath = require('./content/path')
1312
const fsm = require('fs-minipass')
1413
const glob = require('./util/glob.js')
@@ -93,6 +92,7 @@ async function fixPerms (cache, opts) {
9392
//
9493
async function garbageCollect (cache, opts) {
9594
opts.log.silly('verify', 'garbage collecting content')
95+
const { default: pMap } = await import('p-map')
9696
const indexStream = index.lsStream(cache)
9797
const liveContent = new Set()
9898
indexStream.on('data', (entry) => {
@@ -176,6 +176,7 @@ async function verifyContent (filepath, sri) {
176176

177177
async function rebuildIndex (cache, opts) {
178178
opts.log.silly('verify', 'rebuilding index')
179+
const { default: pMap } = await import('p-map')
179180
const entries = await index.ls(cache)
180181
const stats = {
181182
missingContent: 0,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"minipass-collect": "^2.0.1",
5555
"minipass-flush": "^1.0.5",
5656
"minipass-pipeline": "^1.2.4",
57-
"p-map": "^4.0.0",
57+
"p-map": "^7.0.2",
5858
"ssri": "^12.0.0",
5959
"tar": "^7.4.3",
6060
"unique-filename": "^4.0.0"

0 commit comments

Comments
 (0)