Skip to content

Commit

Permalink
Enables rimraf renovate PR to 5.x by replacing rimraf with native fs …
Browse files Browse the repository at this point in the history
…rm (#1243)
  • Loading branch information
trevoring-okta authored Aug 18, 2023
1 parent 3205ef2 commit b8cc6b3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@
"@babel/runtime": "7.22.10",
"oblivious-set": "1.1.1",
"p-queue": "6.6.2",
"rimraf": "3.0.2",
"unload": "2.4.1"
},
"devDependencies": {
Expand Down Expand Up @@ -139,6 +138,7 @@
"pre-commit": "1.2.2",
"random-int": "3.0.0",
"random-token": "0.0.8",
"rimraf": "5.0.1",
"rollup": "3.28.0",
"@rollup/plugin-terser": "0.4.3",
"testcafe": "3.2.0",
Expand Down
17 changes: 15 additions & 2 deletions src/methods/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import os from 'os';
import events from 'events';
import net from 'net';
import path from 'path';
import rimraf from 'rimraf';
import PQueue from 'p-queue';
import {
add as unloadAdd
Expand Down Expand Up @@ -47,7 +46,21 @@ const readFile = util.promisify(fs.readFile);
const unlink = util.promisify(fs.unlink);
const readdir = util.promisify(fs.readdir);
const chmod = util.promisify(fs.chmod);
const removeDir = util.promisify(rimraf);
const rmDir = util.promisify(fs.rm);

const removeDir = async (p) => {
try {
return await rmDir(p,
{
recursive: true
}
);
} catch (err) {
if (err.code !== 'ENOENT') {
throw err;
}
}
};

const OTHER_INSTANCES = {};
const TMP_FOLDER_NAME = 'pubkey.bc';
Expand Down

0 comments on commit b8cc6b3

Please sign in to comment.