diff --git a/index.js b/index.js index 92b8422d..f7079166 100755 --- a/index.js +++ b/index.js @@ -16,7 +16,7 @@ const mkdirp = require('make-dir') const Module = require('module') const onExit = require('signal-exit') const path = require('path') -const rimraf = require('rimraf') +const { rimraf } = require('rimraf') const SourceMaps = require('./lib/source-maps') const TestExclude = require('test-exclude') const pMap = require('p-map') diff --git a/lib/commands/instrument.js b/lib/commands/instrument.js index f8d8ca9a..59018ee9 100644 --- a/lib/commands/instrument.js +++ b/lib/commands/instrument.js @@ -3,7 +3,7 @@ const NYC = require('../../index.js') const path = require('path') const resolveFrom = require('resolve-from') -const rimraf = require('rimraf') +const { rimraf } = require('rimraf') const { cliWrapper, setupOptions } = require('./helpers.js') exports.command = 'instrument [output]' diff --git a/npm-run-clean.js b/npm-run-clean.js index 8bfa1f9a..1b62ba2f 100644 --- a/npm-run-clean.js +++ b/npm-run-clean.js @@ -2,7 +2,7 @@ 'use strict' const glob = require('glob') -const rimraf = require('rimraf') +const { rimraf } = require('rimraf') const patterns = [ '**/.nyc_output', diff --git a/package-lock.json b/package-lock.json index b0a80f71..0f665a20 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,7 +31,7 @@ "p-map": "^4.0.0", "process-on-spawn": "^1.0.0", "resolve-from": "^5.0.0", - "rimraf": "^4.1.2", + "rimraf": "^5.0.1", "signal-exit": "^3.0.2", "spawn-wrap": "^2.0.0", "test-exclude": "^6.0.0", @@ -5952,9 +5952,12 @@ } }, "node_modules/rimraf": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.1.2.tgz", - "integrity": "sha512-BlIbgFryTbw3Dz6hyoWFhKk+unCcHMSkZGrTFVAx2WmttdBSonsdtRlwiuTbDqTKr+UlXIUqJVS4QT5tUzGENQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.1.tgz", + "integrity": "sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg==", + "dependencies": { + "glob": "^10.2.5" + }, "bin": { "rimraf": "dist/cjs/src/bin.js" }, @@ -5965,6 +5968,100 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/rimraf/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/rimraf/node_modules/foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.2.6.tgz", + "integrity": "sha512-U/rnDpXJGF414QQQZv5uVsabTVxMSwzS5CH0p3DRCIV6ownl4f7PzGnkGmvlum2wB+9RlJWJZ6ACU1INnBqiPA==", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.0.3", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2", + "path-scurry": "^1.7.0" + }, + "bin": { + "glob": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/jackspeak": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.2.1.tgz", + "integrity": "sha512-MXbxovZ/Pm42f6cDIDkl3xpwv1AGwObKwfmjs2nQePiy85tP3fatofl3FC1aBsOtP/6fq5SbtgHwWcMsLP+bDw==", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.1.tgz", + "integrity": "sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minipass": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-6.0.2.tgz", + "integrity": "sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/rimraf/node_modules/signal-exit": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.0.2.tgz", + "integrity": "sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -13542,9 +13639,70 @@ "dev": true }, "rimraf": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.1.2.tgz", - "integrity": "sha512-BlIbgFryTbw3Dz6hyoWFhKk+unCcHMSkZGrTFVAx2WmttdBSonsdtRlwiuTbDqTKr+UlXIUqJVS4QT5tUzGENQ==" + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.1.tgz", + "integrity": "sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg==", + "requires": { + "glob": "^10.2.5" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "requires": { + "balanced-match": "^1.0.0" + } + }, + "foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "requires": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + } + }, + "glob": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.2.6.tgz", + "integrity": "sha512-U/rnDpXJGF414QQQZv5uVsabTVxMSwzS5CH0p3DRCIV6ownl4f7PzGnkGmvlum2wB+9RlJWJZ6ACU1INnBqiPA==", + "requires": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.0.3", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2", + "path-scurry": "^1.7.0" + } + }, + "jackspeak": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.2.1.tgz", + "integrity": "sha512-MXbxovZ/Pm42f6cDIDkl3xpwv1AGwObKwfmjs2nQePiy85tP3fatofl3FC1aBsOtP/6fq5SbtgHwWcMsLP+bDw==", + "requires": { + "@isaacs/cliui": "^8.0.2", + "@pkgjs/parseargs": "^0.11.0" + } + }, + "minimatch": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.1.tgz", + "integrity": "sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==", + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "minipass": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-6.0.2.tgz", + "integrity": "sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w==" + }, + "signal-exit": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.0.2.tgz", + "integrity": "sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==" + } + } }, "run-parallel": { "version": "1.2.0", diff --git a/package.json b/package.json index 06106ae9..db29e855 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "p-map": "^4.0.0", "process-on-spawn": "^1.0.0", "resolve-from": "^5.0.0", - "rimraf": "^4.1.2", + "rimraf": "^5.0.1", "signal-exit": "^3.0.2", "spawn-wrap": "^2.0.0", "test-exclude": "^6.0.0", diff --git a/test/cache.js b/test/cache.js index dca75cc2..966d4263 100644 --- a/test/cache.js +++ b/test/cache.js @@ -3,7 +3,7 @@ const path = require('path') const t = require('tap') -const rimraf = require('rimraf') +const { rimraf } = require('rimraf') const NYC = require('../self-coverage') diff --git a/test/helpers/reset-state.js b/test/helpers/reset-state.js index 36fc9e3d..6257f854 100644 --- a/test/helpers/reset-state.js +++ b/test/helpers/reset-state.js @@ -4,7 +4,7 @@ const extensions = Object.assign({}, require.extensions) // eslint-disable-line const { glob } = require('glob') -const rimraf = require('rimraf') +const { rimraf } = require('rimraf') module.exports = async function () { // nuke any temporary files created during test runs. diff --git a/test/helpers/temp-dir-setup.js b/test/helpers/temp-dir-setup.js index bcc76c51..f632d306 100644 --- a/test/helpers/temp-dir-setup.js +++ b/test/helpers/temp-dir-setup.js @@ -3,7 +3,7 @@ const path = require('path') const fs = require('fs') const makeDir = require('make-dir') -const rimraf = require('rimraf') +const { rimraf } = require('rimraf') const { promisify } = require('util') const mkdtemp = promisify(fs.mkdtemp) diff --git a/test/instrument.js b/test/instrument.js index 5951d91d..fd95b524 100644 --- a/test/instrument.js +++ b/test/instrument.js @@ -6,7 +6,7 @@ const path = require('path') const t = require('tap') const makeDir = require('make-dir') const isWindows = require('is-windows')() -const rimraf = require('rimraf') +const { rimraf } = require('rimraf') const { runNYC, testSuccess, fixturesCLI } = require('./helpers') diff --git a/test/nyc-integration.js b/test/nyc-integration.js index 47f3b2b0..3957f809 100644 --- a/test/nyc-integration.js +++ b/test/nyc-integration.js @@ -6,7 +6,7 @@ const os = require('os') const t = require('tap') const { glob } = require('glob') -const rimraf = require('rimraf') +const { rimraf } = require('rimraf') const { fixturesCLI, nycBin, runNYC, tempDirSetup, testSuccess, testFailure, envCheckConfig } = require('./helpers') diff --git a/test/processinfo.js b/test/processinfo.js index 3a8159ff..4c83ecc8 100644 --- a/test/processinfo.js +++ b/test/processinfo.js @@ -3,7 +3,7 @@ const { resolve } = require('path') const { spawn } = require('child_process') const t = require('tap') -const rimraf = require('rimraf') +const { rimraf } = require('rimraf') const fs = require('../lib/fs-promises') const node = process.execPath diff --git a/test/report.js b/test/report.js index 988c93b9..1e5b8e77 100644 --- a/test/report.js +++ b/test/report.js @@ -5,7 +5,7 @@ const path = require('path') const t = require('tap') const isWindows = require('is-windows')() -const rimraf = require('rimraf') +const { rimraf } = require('rimraf') const NYC = require('../self-coverage') diff --git a/test/temp-dir.js b/test/temp-dir.js index eea89dd2..e5032195 100644 --- a/test/temp-dir.js +++ b/test/temp-dir.js @@ -4,7 +4,7 @@ const fs = require('../lib/fs-promises') const path = require('path') const t = require('tap') -const rimraf = require('rimraf') +const { rimraf } = require('rimraf') const { runNYC, fixturesCLI } = require('./helpers')