diff --git a/package-lock.json b/package-lock.json index c0e47f0e99..350f6d1eb3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,12 +19,10 @@ "decamelize": "6.0.0", "es6-error": "4.1.1", "firefox-profile": "4.6.0", - "fs-extra": "11.2.0", "fx-runner": "1.4.0", "https-proxy-agent": "^7.0.0", "jose": "5.6.3", "jszip": "3.10.1", - "mkdirp": "3.0.1", "multimatch": "6.0.0", "node-fetch": "3.3.2", "node-notifier": "10.0.1", @@ -63,6 +61,7 @@ "eslint": "8.57.0", "eslint-plugin-async-await": "0.0.0", "eslint-plugin-import": "2.29.1", + "fs-extra": "11.2.0", "git-rev-sync": "3.0.2", "html-entities": "2.5.2", "mocha": "10.7.0", @@ -3139,6 +3138,12 @@ "node": ">=12.22.0" } }, + "node_modules/@pnpm/network.ca-file/node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "license": "ISC" + }, "node_modules/@pnpm/npm-conf": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-1.0.5.tgz", @@ -6337,6 +6342,8 @@ "version": "11.2.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", + "dev": true, + "license": "MIT", "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", @@ -6683,9 +6690,10 @@ } }, "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC" }, "node_modules/graceful-readlink": { "version": "1.0.1", @@ -8318,20 +8326,6 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/mkdirp": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", - "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", - "bin": { - "mkdirp": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/mocha": { "version": "10.7.0", "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.0.tgz", @@ -13986,6 +13980,13 @@ "integrity": "sha512-gkINruT2KUhZLTaiHxwCOh1O4NVnFT0wLjWFBHmTz9vpKag/C/noIMJXBxFe4F0mYpUVX2puLwAieLYFg2NvoA==", "requires": { "graceful-fs": "4.2.10" + }, + "dependencies": { + "graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + } } }, "@pnpm/npm-conf": { @@ -16267,6 +16268,7 @@ "version": "11.2.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", + "dev": true, "requires": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", @@ -16519,9 +16521,9 @@ } }, "graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, "graceful-readlink": { "version": "1.0.1", @@ -17681,11 +17683,6 @@ "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==" }, - "mkdirp": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", - "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==" - }, "mocha": { "version": "10.7.0", "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.0.tgz", diff --git a/package.json b/package.json index 44fc566c13..932521ea54 100644 --- a/package.json +++ b/package.json @@ -68,12 +68,10 @@ "decamelize": "6.0.0", "es6-error": "4.1.1", "firefox-profile": "4.6.0", - "fs-extra": "11.2.0", "fx-runner": "1.4.0", "https-proxy-agent": "^7.0.0", "jose": "5.6.3", "jszip": "3.10.1", - "mkdirp": "3.0.1", "multimatch": "6.0.0", "node-fetch": "3.3.2", "node-notifier": "10.0.1", @@ -109,6 +107,7 @@ "eslint": "8.57.0", "eslint-plugin-async-await": "0.0.0", "eslint-plugin-import": "2.29.1", + "fs-extra": "11.2.0", "git-rev-sync": "3.0.2", "html-entities": "2.5.2", "mocha": "10.7.0", diff --git a/src/extension-runners/chromium.js b/src/extension-runners/chromium.js index f6337fc181..919a09d705 100644 --- a/src/extension-runners/chromium.js +++ b/src/extension-runners/chromium.js @@ -3,10 +3,9 @@ * in a Chromium-based browser instance. */ +import fs from 'fs/promises'; import path from 'path'; -import fs from 'fs-extra'; -import { mkdirp as asyncMkdirp } from 'mkdirp'; import { Launcher as ChromeLauncher, launch as defaultChromiumLaunch, @@ -179,12 +178,13 @@ export class ChromiumExtensionRunner { if (userDataDir && profileDirName) { // copy profile dir to this temp user data dir. - await fs.copy( + await fs.cp( path.join(userDataDir, profileDirName), path.join(tmpDirPath, profileDirName), + { recursive: true }, ); } else if (userDataDir) { - await fs.copy(userDataDir, tmpDirPath); + await fs.cp(userDataDir, tmpDirPath, { recursive: true }); } userDataDir = tmpDirPath; } @@ -273,7 +273,7 @@ export class ChromiumExtensionRunner { log.debug(`Creating reload-manager-extension in ${extPath}`); - await asyncMkdirp(extPath); + await fs.mkdir(extPath, { recursive: true }); await fs.writeFile( path.join(extPath, 'manifest.json'), diff --git a/src/util/artifacts.js b/src/util/artifacts.js index 8c6dc3aa84..e9ae6f837b 100644 --- a/src/util/artifacts.js +++ b/src/util/artifacts.js @@ -1,7 +1,5 @@ import fs from 'fs/promises'; -import { mkdirp as defaultAsyncMkdirp } from 'mkdirp'; - import { UsageError, isErrorWithCode } from '../errors.js'; import { createLogger } from './logger.js'; @@ -12,7 +10,7 @@ const defaultAsyncFsAccess = fs.access.bind(fs); export async function prepareArtifactsDir( artifactsDir, { - asyncMkdirp = defaultAsyncMkdirp, + asyncMkdirp = (dirPath) => fs.mkdir(dirPath, { recursive: true }), asyncFsAccess = defaultAsyncFsAccess, } = {}, ) {