From 6808e6ffab2dcaf6c41f89cae3f30743b0dfcdf6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 3 Dec 2023 09:28:36 +0000 Subject: [PATCH] chore(deps): bump p-map from 4.0.0 to 6.0.0 (#46) --- index.js | 4 +++- lib/source-maps.js | 2 +- package-lock.json | 24 +++++++++--------------- package.json | 2 +- 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/index.js b/index.js index c5aa25ab..61efafab 100755 --- a/index.js +++ b/index.js @@ -19,7 +19,6 @@ const path = require('path') const { rimraf } = require('rimraf') const SourceMaps = require('./lib/source-maps') const TestExclude = require('test-exclude') -const pMap = require('p-map') const getPackageType = require('get-package-type') const debugLog = debuglog('nyc') @@ -233,6 +232,7 @@ class NYC { this._loadAdditionalModules() const stats = await fs.lstat(input) + const { default: pMap } = await import('p-map') if (stats.isDirectory()) { inputDir = input @@ -421,6 +421,7 @@ class NYC { async getCoverageMapFromAllCoverageFiles (baseDirectory) { const map = libCoverage.createCoverageMap({}) const files = await this.coverageFiles(baseDirectory) + const { default: pMap } = await import('p-map') await pMap( files, @@ -523,6 +524,7 @@ class NYC { // TODO: Remove from nyc v16 async coverageData (baseDirectory) { const files = await this.coverageFiles(baseDirectory) + const { default: pMap } = await import('p-map') return pMap( files, f => this.coverageFileLoad(f, baseDirectory), diff --git a/lib/source-maps.js b/lib/source-maps.js index 9b8c2932..03d3e8b8 100644 --- a/lib/source-maps.js +++ b/lib/source-maps.js @@ -6,7 +6,6 @@ const libSourceMaps = require('istanbul-lib-source-maps') const fs = require('./fs-promises') const os = require('os') const path = require('path') -const pMap = require('p-map') class SourceMaps { constructor (opts) { @@ -57,6 +56,7 @@ class SourceMaps { } async reloadCachedSourceMaps (report) { + const { default: pMap } = await import('p-map') await pMap( Object.entries(report), async ([absFile, fileReport]) => { diff --git a/package-lock.json b/package-lock.json index 3f5fa1d8..be3f3f70 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,7 @@ "istanbul-reports": "^3.0.2", "make-dir": "^3.0.0", "node-preload": "^0.2.1", - "p-map": "^4.0.0", + "p-map": "^6.0.0", "process-on-spawn": "^1.0.0", "resolve-from": "^5.0.0", "rimraf": "^5.0.1", @@ -53,7 +53,7 @@ "which": "^4.0.0" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -5507,14 +5507,11 @@ } }, "node_modules/p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", - "dependencies": { - "aggregate-error": "^3.0.0" - }, + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-6.0.0.tgz", + "integrity": "sha512-T8BatKGY+k5rU+Q/GTYgrEf2r4xRMevAN5mtXc2aPc4rS1j3s+vWTaO2Wag94neXuCAUAs8cxBL9EeB5EA6diw==", "engines": { - "node": ">=10" + "node": ">=16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -13441,12 +13438,9 @@ } }, "p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", - "requires": { - "aggregate-error": "^3.0.0" - } + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-6.0.0.tgz", + "integrity": "sha512-T8BatKGY+k5rU+Q/GTYgrEf2r4xRMevAN5mtXc2aPc4rS1j3s+vWTaO2Wag94neXuCAUAs8cxBL9EeB5EA6diw==" }, "p-try": { "version": "2.2.0", diff --git a/package.json b/package.json index 5abb483b..7004e920 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "istanbul-reports": "^3.0.2", "make-dir": "^3.0.0", "node-preload": "^0.2.1", - "p-map": "^4.0.0", + "p-map": "^6.0.0", "process-on-spawn": "^1.0.0", "resolve-from": "^5.0.0", "rimraf": "^5.0.1",