Skip to content

Commit 6808e6f

Browse files
chore(deps): bump p-map from 4.0.0 to 6.0.0 (#46)
1 parent 334f0a1 commit 6808e6f

File tree

4 files changed

+14
-18
lines changed

4 files changed

+14
-18
lines changed

index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ const path = require('path')
1919
const { rimraf } = require('rimraf')
2020
const SourceMaps = require('./lib/source-maps')
2121
const TestExclude = require('test-exclude')
22-
const pMap = require('p-map')
2322
const getPackageType = require('get-package-type')
2423

2524
const debugLog = debuglog('nyc')
@@ -233,6 +232,7 @@ class NYC {
233232
this._loadAdditionalModules()
234233

235234
const stats = await fs.lstat(input)
235+
const { default: pMap } = await import('p-map')
236236
if (stats.isDirectory()) {
237237
inputDir = input
238238

@@ -421,6 +421,7 @@ class NYC {
421421
async getCoverageMapFromAllCoverageFiles (baseDirectory) {
422422
const map = libCoverage.createCoverageMap({})
423423
const files = await this.coverageFiles(baseDirectory)
424+
const { default: pMap } = await import('p-map')
424425

425426
await pMap(
426427
files,
@@ -523,6 +524,7 @@ class NYC {
523524
// TODO: Remove from nyc v16
524525
async coverageData (baseDirectory) {
525526
const files = await this.coverageFiles(baseDirectory)
527+
const { default: pMap } = await import('p-map')
526528
return pMap(
527529
files,
528530
f => this.coverageFileLoad(f, baseDirectory),

lib/source-maps.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ const libSourceMaps = require('istanbul-lib-source-maps')
66
const fs = require('./fs-promises')
77
const os = require('os')
88
const path = require('path')
9-
const pMap = require('p-map')
109

1110
class SourceMaps {
1211
constructor (opts) {
@@ -57,6 +56,7 @@ class SourceMaps {
5756
}
5857

5958
async reloadCachedSourceMaps (report) {
59+
const { default: pMap } = await import('p-map')
6060
await pMap(
6161
Object.entries(report),
6262
async ([absFile, fileReport]) => {

package-lock.json

+9-15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"istanbul-reports": "^3.0.2",
7979
"make-dir": "^3.0.0",
8080
"node-preload": "^0.2.1",
81-
"p-map": "^4.0.0",
81+
"p-map": "^6.0.0",
8282
"process-on-spawn": "^1.0.0",
8383
"resolve-from": "^5.0.0",
8484
"rimraf": "^5.0.1",

0 commit comments

Comments
 (0)