Skip to content

Commit

Permalink
deps: update p-map from ^4.0.0 to ^7.0.2 (#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar authored Sep 26, 2024
1 parent b52d649 commit e56c7fc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/entry-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const hashToSegments = require('./util/hash-to-segments')
const indexV = require('../package.json')['cache-version'].index
const { moveFile } = require('@npmcli/fs')

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

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

// Set all this up to run on the stream and then just return the stream
Promise.resolve().then(async () => {
const { default: pMap } = await import('p-map')
const buckets = await readdirOrEmpty(indexDir)
await pMap(buckets, async (bucket) => {
const bucketPath = path.join(indexDir, bucket)
Expand Down
3 changes: 2 additions & 1 deletion lib/verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const {
truncate,
writeFile,
} = require('fs/promises')
const pMap = require('p-map')
const contentPath = require('./content/path')
const fsm = require('fs-minipass')
const glob = require('./util/glob.js')
Expand Down Expand Up @@ -93,6 +92,7 @@ async function fixPerms (cache, opts) {
//
async function garbageCollect (cache, opts) {
opts.log.silly('verify', 'garbage collecting content')
const { default: pMap } = await import('p-map')
const indexStream = index.lsStream(cache)
const liveContent = new Set()
indexStream.on('data', (entry) => {
Expand Down Expand Up @@ -176,6 +176,7 @@ async function verifyContent (filepath, sri) {

async function rebuildIndex (cache, opts) {
opts.log.silly('verify', 'rebuilding index')
const { default: pMap } = await import('p-map')
const entries = await index.ls(cache)
const stats = {
missingContent: 0,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"minipass-collect": "^2.0.1",
"minipass-flush": "^1.0.5",
"minipass-pipeline": "^1.2.4",
"p-map": "^4.0.0",
"p-map": "^7.0.2",
"ssri": "^12.0.0",
"tar": "^7.4.3",
"unique-filename": "^4.0.0"
Expand Down

0 comments on commit e56c7fc

Please sign in to comment.