@util.js/node-files 0.41.2 → 0.41.4

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/README.md CHANGED
@@ -4,7 +4,6 @@
4
4
 
5
5
  <p>
6
6
  <a href="https://www.npmjs.com/package/@util.js/node-files"><img alt="NPM Status" src="https://img.shields.io/npm/v/@util.js/node-files.svg?style=flat"></a>
7
- <a href="https://travis-ci.org/creemama/utiljs"><img alt="Travis CI Build Status" src="https://img.shields.io/travis/creemama/utiljs/master.svg?style=flat-square&label=Travis+CI"></a>
8
7
  </p>
9
8
 
10
9
  @util.js/node-files is part of [Util.js](https://github.com/creemama/utiljs).
package/lib/Files.js CHANGED
@@ -432,7 +432,19 @@ module.exports = class Files {
432
432
  }
433
433
 
434
434
  rmrf() {
435
- return promises().applyCallback(null, rimraf(), arguments);
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.2",
5
- "@util.js/promises": "0.41.2",
6
- "@util.js/strings": "0.41.2",
7
- "graceful-fs": "4.2.10",
8
- "mkdirp": "1.0.4",
4
+ "@util.js/objects": "0.41.4",
5
+ "@util.js/promises": "0.41.4",
6
+ "@util.js/strings": "0.41.4",
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": "3.0.2",
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.2",
42
- "gitHead": "174b81ec0ead0221b9bb6617bc254b025bd20a5a"
41
+ "version": "0.41.4",
42
+ "gitHead": "2119863a175cf7095ca3a2417e61af32974add15"
43
43
  }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright 2018 Chris Topher (c@creemama.com)
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of
6
- this software and associated documentation files (the "Software"), to deal in
7
- the Software without restriction, including without limitation the rights to
8
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9
- of the Software, and to permit persons to whom the Software is furnished to do
10
- so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.