@jsenv/filesystem 4.10.8 → 4.10.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/filesystem",
3
- "version": "4.10.8",
3
+ "version": "4.10.10",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -106,13 +106,12 @@ export const registerDirectoryLifecycle = (
106
106
  patternValue,
107
107
  };
108
108
  } catch (e) {
109
- if (e.code === "ENOENT") {
110
- return {
111
- type: null,
112
- stat: null,
113
- };
114
- }
115
- if (e.code === "EACCES" || e.code === "EPERM") {
109
+ if (
110
+ e.code === "ENOENT" ||
111
+ e.code === "EACCES" ||
112
+ e.code === "EPERM" ||
113
+ e.code === "ENOTDIR" // happens on mac12 sometimes
114
+ ) {
116
115
  return {
117
116
  type: null,
118
117
  stat: null,
@@ -251,7 +250,7 @@ export const registerDirectoryLifecycle = (
251
250
  const directoryUrlObject = new URL(directoryUrl);
252
251
  entryNameArray = readdirSync(directoryUrlObject);
253
252
  } catch (e) {
254
- if (e.code === "ENOENT") {
253
+ if (e.code === "ENOENT" || e.code === "EACCES") {
255
254
  return;
256
255
  }
257
256
  throw e;
@@ -283,7 +282,7 @@ export const registerDirectoryLifecycle = (
283
282
  });
284
283
  });
285
284
  } catch (e) {
286
- if (e.code === "ENOENT") {
285
+ if (e.code === "ENOENT" || e.code === "EACCES") {
287
286
  return;
288
287
  }
289
288
  throw e;