pkgprn 0.5.2 → 0.5.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/README.md +1 -1
- package/package.json +4 -3
- package/prune.js +9 -2
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pkgprn",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Konstantin Shutkin",
|
|
6
6
|
"bin": "./index.js",
|
|
@@ -21,13 +21,14 @@
|
|
|
21
21
|
"pack",
|
|
22
22
|
"prepack"
|
|
23
23
|
],
|
|
24
|
-
"homepage": "https://github.com/kshutkin/package-prune
|
|
24
|
+
"homepage": "https://github.com/kshutkin/package-prune/blob/main/pkgprn/README.md",
|
|
25
25
|
"bugs": {
|
|
26
26
|
"url": "https://github.com/kshutkin/package-prune/issues"
|
|
27
27
|
},
|
|
28
28
|
"repository": {
|
|
29
29
|
"type": "git",
|
|
30
|
-
"url": "git+https://github.com/kshutkin/package-prune.git"
|
|
30
|
+
"url": "git+https://github.com/kshutkin/package-prune.git",
|
|
31
|
+
"directory": "pkgprn"
|
|
31
32
|
},
|
|
32
33
|
"main": "prune.js",
|
|
33
34
|
"dependencies": {
|
package/prune.js
CHANGED
|
@@ -487,8 +487,15 @@ async function isEmptyDir(dir) {
|
|
|
487
487
|
}
|
|
488
488
|
|
|
489
489
|
async function isDirectory(file) {
|
|
490
|
-
|
|
491
|
-
|
|
490
|
+
try {
|
|
491
|
+
const fileStat = await stat(file);
|
|
492
|
+
return fileStat.isDirectory();
|
|
493
|
+
} catch (e) {
|
|
494
|
+
if (typeof e === 'object' && e != null && 'code' in e && e.code === 'ENOENT') {
|
|
495
|
+
return false;
|
|
496
|
+
}
|
|
497
|
+
throw e;
|
|
498
|
+
}
|
|
492
499
|
}
|
|
493
500
|
|
|
494
501
|
async function walkDir(dir, ignoreDirs = []) {
|