Revert "Update rimraf to version 4"

This reverts commit 32357e3d17.
This commit is contained in:
Jonas Jenwald 2023-03-06 19:47:18 +01:00
parent e11371c75f
commit 2f2f1e5088
5 changed files with 153 additions and 129 deletions

View File

@ -1486,19 +1486,22 @@ gulp.task(
)
);
gulp.task("jsdoc", async function (done) {
gulp.task("jsdoc", function (done) {
console.log();
console.log("### Generating documentation (JSDoc)");
const JSDOC_FILES = ["src/display/api.js"];
await rimraf(JSDOC_BUILD_DIR);
await mkdirp(JSDOC_BUILD_DIR);
const command = `"node_modules/.bin/jsdoc" -d ${JSDOC_BUILD_DIR} ${JSDOC_FILES.join(
" "
)}`;
rimraf(JSDOC_BUILD_DIR, function () {
mkdirp(JSDOC_BUILD_DIR).then(function () {
const command =
'"node_modules/.bin/jsdoc" -d ' +
JSDOC_BUILD_DIR +
" " +
JSDOC_FILES.join(" ");
exec(command, done);
});
});
});
gulp.task("types", function (done) {
@ -2076,12 +2079,11 @@ gulp.task(
)
);
gulp.task("clean", async function (done) {
gulp.task("clean", function (done) {
console.log();
console.log("### Cleaning up project builds");
await rimraf(BUILD_DIR);
done();
rimraf(BUILD_DIR, done);
});
gulp.task("importl10n", function (done) {
@ -2249,7 +2251,7 @@ gulp.task(
console.log();
console.log("### Overwriting all files");
rimraf.sync(DIST_DIR);
rimraf.sync(path.join(DIST_DIR, "*"));
return merge([
packageJson().pipe(gulp.dest(DIST_DIR)),
@ -2441,7 +2443,7 @@ gulp.task(
// The mozcentral baseline directory is a Git repository, so we
// remove all files and copy the current mozcentral build files
// into it to create the diff.
rimraf.sync(MOZCENTRAL_BASELINE_DIR);
rimraf.sync(MOZCENTRAL_BASELINE_DIR + "*");
gulp
.src([BUILD_DIR + "mozcentral/**/*"])

244
package-lock.json generated
View File

@ -51,7 +51,7 @@
"postcss-dir-pseudo-class": "^7.0.2",
"prettier": "^2.8.4",
"puppeteer": "^19.0.0",
"rimraf": "^4.1.2",
"rimraf": "^3.0.2",
"streamqueue": "^1.1.2",
"stylelint": "^15.1.0",
"stylelint-prettier": "^2.0.0",
@ -2160,21 +2160,6 @@
"node-pre-gyp": "bin/node-pre-gyp"
}
},
"node_modules/@mapbox/node-pre-gyp/node_modules/rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"dev": true,
"dependencies": {
"glob": "^7.1.3"
},
"bin": {
"rimraf": "bin.js"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/@mapbox/node-pre-gyp/node_modules/semver": {
"version": "7.3.5",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
@ -6929,21 +6914,6 @@
"node": "^10.12.0 || >=12.0.0"
}
},
"node_modules/flat-cache/node_modules/rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"dev": true,
"dependencies": {
"glob": "^7.1.3"
},
"bin": {
"rimraf": "bin.js"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/flatted": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz",
@ -7198,23 +7168,20 @@
}
},
"node_modules/glob": {
"version": "7.2.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
"integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
"dev": true,
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.1.1",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
},
"engines": {
"node": "*"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/glob-parent": {
@ -8741,6 +8708,26 @@
"integrity": "sha512-9PMzyvhtocxb3aXJVOPqBDswdgyAeSB81QnLop4npOpbqnheaTEwPc9ZloQeVswugPManznQBjD8kWDTjlnHuw==",
"dev": true
},
"node_modules/jasmine/node_modules/glob": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz",
"integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==",
"dev": true,
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
},
"engines": {
"node": "*"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/jest-worker": {
"version": "27.3.1",
"resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.3.1.tgz",
@ -12347,7 +12334,6 @@
},
"node_modules/npm/node_modules/lodash._baseindexof": {
"version": "3.1.0",
"dev": true,
"inBundle": true,
"license": "MIT"
},
@ -12363,19 +12349,16 @@
},
"node_modules/npm/node_modules/lodash._bindcallback": {
"version": "3.0.1",
"dev": true,
"inBundle": true,
"license": "MIT"
},
"node_modules/npm/node_modules/lodash._cacheindexof": {
"version": "3.0.2",
"dev": true,
"inBundle": true,
"license": "MIT"
},
"node_modules/npm/node_modules/lodash._createcache": {
"version": "3.1.2",
"dev": true,
"inBundle": true,
"license": "MIT",
"dependencies": {
@ -12390,7 +12373,6 @@
},
"node_modules/npm/node_modules/lodash._getnative": {
"version": "3.9.1",
"dev": true,
"inBundle": true,
"license": "MIT"
},
@ -12408,7 +12390,6 @@
},
"node_modules/npm/node_modules/lodash.restparam": {
"version": "3.6.1",
"dev": true,
"inBundle": true,
"license": "MIT"
},
@ -15548,21 +15529,6 @@
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"dev": true
},
"node_modules/puppeteer-core/node_modules/rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"dev": true,
"dependencies": {
"glob": "^7.1.3"
},
"bin": {
"rimraf": "bin.js"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/queue-microtask": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
@ -16155,15 +16121,35 @@
}
},
"node_modules/rimraf": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.1.2.tgz",
"integrity": "sha512-BlIbgFryTbw3Dz6hyoWFhKk+unCcHMSkZGrTFVAx2WmttdBSonsdtRlwiuTbDqTKr+UlXIUqJVS4QT5tUzGENQ==",
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"dev": true,
"dependencies": {
"glob": "^7.1.3"
},
"bin": {
"rimraf": "dist/cjs/src/bin.js"
"rimraf": "bin.js"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/rimraf/node_modules/glob": {
"version": "7.1.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
"integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
"dev": true,
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
},
"engines": {
"node": ">=14"
"node": "*"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
@ -18740,6 +18726,26 @@
"lodash": "^4.17.14"
}
},
"node_modules/wintersmith/node_modules/glob": {
"version": "7.1.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
"integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
"dev": true,
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
},
"engines": {
"node": "*"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/wintersmith/node_modules/marked": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/marked/-/marked-0.5.2.tgz",
@ -20563,15 +20569,6 @@
"tar": "^6.1.0"
},
"dependencies": {
"rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"dev": true,
"requires": {
"glob": "^7.1.3"
}
},
"semver": {
"version": "7.3.5",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
@ -24281,17 +24278,6 @@
"requires": {
"flatted": "^3.1.0",
"rimraf": "^3.0.2"
},
"dependencies": {
"rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"dev": true,
"requires": {
"glob": "^7.1.3"
}
}
}
},
"flatted": {
@ -24500,15 +24486,15 @@
"dev": true
},
"glob": {
"version": "7.2.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
"integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.1.1",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
@ -25646,6 +25632,22 @@
"requires": {
"glob": "^7.1.6",
"jasmine-core": "^4.5.0"
},
"dependencies": {
"glob": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz",
"integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
}
}
},
"jasmine-core": {
@ -28413,8 +28415,7 @@
},
"lodash._baseindexof": {
"version": "3.1.0",
"bundled": true,
"dev": true
"bundled": true
},
"lodash._baseuniq": {
"version": "4.6.0",
@ -28427,18 +28428,15 @@
},
"lodash._bindcallback": {
"version": "3.0.1",
"bundled": true,
"dev": true
"bundled": true
},
"lodash._cacheindexof": {
"version": "3.0.2",
"bundled": true,
"dev": true
"bundled": true
},
"lodash._createcache": {
"version": "3.1.2",
"bundled": true,
"dev": true,
"requires": {
"lodash._getnative": "^3.0.0"
}
@ -28450,8 +28448,7 @@
},
"lodash._getnative": {
"version": "3.9.1",
"bundled": true,
"dev": true
"bundled": true
},
"lodash._root": {
"version": "3.0.1",
@ -28465,8 +28462,7 @@
},
"lodash.restparam": {
"version": "3.6.1",
"bundled": true,
"dev": true
"bundled": true
},
"lodash.union": {
"version": "4.6.0",
@ -30889,15 +30885,6 @@
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"dev": true
},
"rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"dev": true,
"requires": {
"glob": "^7.1.3"
}
}
}
},
@ -31356,10 +31343,29 @@
}
},
"rimraf": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.1.2.tgz",
"integrity": "sha512-BlIbgFryTbw3Dz6hyoWFhKk+unCcHMSkZGrTFVAx2WmttdBSonsdtRlwiuTbDqTKr+UlXIUqJVS4QT5tUzGENQ==",
"dev": true
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"dev": true,
"requires": {
"glob": "^7.1.3"
},
"dependencies": {
"glob": {
"version": "7.1.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
"integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
}
}
},
"run-parallel": {
"version": "1.2.0",
@ -33422,6 +33428,20 @@
"lodash": "^4.17.14"
}
},
"glob": {
"version": "7.1.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
"integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"marked": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/marked/-/marked-0.5.2.tgz",

View File

@ -44,7 +44,7 @@
"postcss-dir-pseudo-class": "^7.0.2",
"prettier": "^2.8.4",
"puppeteer": "^19.0.0",
"rimraf": "^4.1.2",
"rimraf": "^3.0.2",
"streamqueue": "^1.1.2",
"stylelint": "^15.1.0",
"stylelint-prettier": "^2.0.0",

View File

@ -22,7 +22,6 @@ var path = require("path");
var fs = require("fs");
var os = require("os");
var puppeteer = require("puppeteer");
const rimraf = require("rimraf");
var url = require("url");
var testUtils = require("./testutils.js");
const dns = require("dns");
@ -1044,6 +1043,7 @@ async function closeSession(browser) {
});
if (allClosed) {
if (tempDir) {
const rimraf = require("rimraf");
rimraf.sync(tempDir);
}
onAllSessionsClosed?.();

View File

@ -18,11 +18,13 @@
const fs = require("fs");
const path = require("path");
const rimraf = require("rimraf");
const rimrafSync = require("rimraf").sync;
exports.removeDirSync = function removeDirSync(dir) {
fs.readdirSync(dir); // Will throw if dir is not a directory
rimraf.sync(dir);
rimrafSync(dir, {
disableGlob: true,
});
};
exports.copySubtreeSync = function copySubtreeSync(src, dest) {