@jsenv/filesystem 4.10.9 → 4.10.11

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.9",
3
+ "version": "4.10.11",
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,12 @@ export const registerDirectoryLifecycle = (
251
250
  const directoryUrlObject = new URL(directoryUrl);
252
251
  entryNameArray = readdirSync(directoryUrlObject);
253
252
  } catch (e) {
254
- if (e.code === "ENOENT" || e.code === "EACCES") {
253
+ if (
254
+ e.code === "ENOENT" ||
255
+ e.code === "EACCES" ||
256
+ e.code === "EPERM" ||
257
+ e.code === "ENOTDIR"
258
+ ) {
255
259
  return;
256
260
  }
257
261
  throw e;