@util.js/node-files 0.41.2 → 0.41.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Files.js +15 -3
- package/package.json +8 -8
package/lib/Files.js
CHANGED
|
@@ -432,7 +432,19 @@ module.exports = class Files {
|
|
|
432
432
|
}
|
|
433
433
|
|
|
434
434
|
rmrf() {
|
|
435
|
-
|
|
435
|
+
if (
|
|
436
|
+
arguments.length > 0 &&
|
|
437
|
+
typeof arguments[arguments.length - 1] !== "function"
|
|
438
|
+
)
|
|
439
|
+
return rimraf().apply(null, arguments);
|
|
440
|
+
const callback = arguments[arguments.length - 1];
|
|
441
|
+
const args = Array.from(arguments).slice(0, arguments.length - 1);
|
|
442
|
+
// As of 4.3, return/resolve value is boolean instead of undefined.
|
|
443
|
+
// We want to return undefined still.
|
|
444
|
+
rimraf()
|
|
445
|
+
.apply(null, args)
|
|
446
|
+
.then((_) => callback(null))
|
|
447
|
+
.catch(callback);
|
|
436
448
|
}
|
|
437
449
|
|
|
438
450
|
rmrfSync() {
|
|
@@ -580,7 +592,7 @@ function fs() {
|
|
|
580
592
|
return get("graceful-fs");
|
|
581
593
|
}
|
|
582
594
|
function mkdirp() {
|
|
583
|
-
return get("mkdirp");
|
|
595
|
+
return get("mkdirp").mkdirp;
|
|
584
596
|
}
|
|
585
597
|
function ncp() {
|
|
586
598
|
return get("ncp");
|
|
@@ -598,7 +610,7 @@ function readLastLines() {
|
|
|
598
610
|
return get("read-last-lines");
|
|
599
611
|
}
|
|
600
612
|
function rimraf() {
|
|
601
|
-
return get("rimraf");
|
|
613
|
+
return get("rimraf").rimraf;
|
|
602
614
|
}
|
|
603
615
|
function sanitizeFilename() {
|
|
604
616
|
return get("sanitize-filename");
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "Chris Topher <c@creemama.com>",
|
|
3
3
|
"dependencies": {
|
|
4
|
-
"@util.js/objects": "0.41.
|
|
5
|
-
"@util.js/promises": "0.41.
|
|
6
|
-
"@util.js/strings": "0.41.
|
|
7
|
-
"graceful-fs": "4.2.
|
|
8
|
-
"mkdirp": "
|
|
4
|
+
"@util.js/objects": "0.41.3",
|
|
5
|
+
"@util.js/promises": "0.41.3",
|
|
6
|
+
"@util.js/strings": "0.41.3",
|
|
7
|
+
"graceful-fs": "4.2.11",
|
|
8
|
+
"mkdirp": "3.0.0",
|
|
9
9
|
"ncp": "2.0.0",
|
|
10
10
|
"read-last-lines": "1.8.0",
|
|
11
|
-
"rimraf": "
|
|
11
|
+
"rimraf": "5.0.0",
|
|
12
12
|
"sanitize-filename": "1.6.3",
|
|
13
13
|
"touch": "3.1.0"
|
|
14
14
|
},
|
|
@@ -38,6 +38,6 @@
|
|
|
38
38
|
"type": "git",
|
|
39
39
|
"url": "https://github.com/creemama/utiljs/tree/master/packages/utiljs-node-files"
|
|
40
40
|
},
|
|
41
|
-
"version": "0.41.
|
|
42
|
-
"gitHead": "
|
|
41
|
+
"version": "0.41.3",
|
|
42
|
+
"gitHead": "e17139b7f85c3abec178d8facdacc2aa6c5bb553"
|
|
43
43
|
}
|