pkgprn-internal 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/dist/index.mjs +9 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1125,8 +1125,15 @@ async function isEmptyDir(dir) {
|
|
|
1125
1125
|
}
|
|
1126
1126
|
|
|
1127
1127
|
async function isDirectory(file) {
|
|
1128
|
-
|
|
1129
|
-
|
|
1128
|
+
try {
|
|
1129
|
+
const fileStat = await stat(file);
|
|
1130
|
+
return fileStat.isDirectory();
|
|
1131
|
+
} catch (e) {
|
|
1132
|
+
if (typeof e === 'object' && e != null && 'code' in e && e.code === 'ENOENT') {
|
|
1133
|
+
return false;
|
|
1134
|
+
}
|
|
1135
|
+
throw e;
|
|
1136
|
+
}
|
|
1130
1137
|
}
|
|
1131
1138
|
|
|
1132
1139
|
async function walkDir(dir, ignoreDirs = []) {
|
package/package.json
CHANGED