@jsenv/core 39.5.4 → 39.5.6

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.
Files changed (2) hide show
  1. package/dist/jsenv_core.js +14 -3
  2. package/package.json +2 -2
@@ -3973,7 +3973,7 @@ const registerDirectoryLifecycle = (
3973
3973
  stat: null,
3974
3974
  };
3975
3975
  }
3976
- if (e.code === "EACCES") {
3976
+ if (e.code === "EACCES" || e.code === "EPERM") {
3977
3977
  return {
3978
3978
  type: null,
3979
3979
  stat: null,
@@ -4107,13 +4107,24 @@ const registerDirectoryLifecycle = (
4107
4107
  infoMap.set(entryInfo.relativeUrl, entryInfo);
4108
4108
  if (entryInfo.type === "directory") {
4109
4109
  const directoryUrl = `${entryInfo.url}/`;
4110
- readdirSync(new URL(directoryUrl)).forEach((entryName) => {
4110
+ let entryNameArray;
4111
+ try {
4112
+ const directoryUrlObject = new URL(directoryUrl);
4113
+ entryNameArray = readdirSync(directoryUrlObject);
4114
+ } catch (e) {
4115
+ if (e.code === "ENOENT") {
4116
+ entryNameArray = [];
4117
+ } else {
4118
+ throw e;
4119
+ }
4120
+ }
4121
+ for (const entryName of entryNameArray) {
4111
4122
  const childEntryUrl = new URL(entryName, directoryUrl).href;
4112
4123
  const childEntryInfo = readEntryInfo(childEntryUrl);
4113
4124
  if (childEntryInfo.type !== null && childEntryInfo.patternValue) {
4114
4125
  handleEntryFound(childEntryInfo, { notify });
4115
4126
  }
4116
- });
4127
+ }
4117
4128
  // we must watch manually every directory we find
4118
4129
  if (!fsWatchSupportsRecursive) {
4119
4130
  const watcher = createWatcher(urlToFileSystemPath(entryInfo.url), {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/core",
3
- "version": "39.5.4",
3
+ "version": "39.5.6",
4
4
  "description": "Tool to develop, test and build js projects",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -70,7 +70,7 @@
70
70
  "@financial-times/polyfill-useragent-normaliser": "1.10.2",
71
71
  "@jsenv/abort": "4.3.0",
72
72
  "@jsenv/ast": "6.2.17",
73
- "@jsenv/filesystem": "4.10.4",
73
+ "@jsenv/filesystem": "4.10.6",
74
74
  "@jsenv/humanize": "1.2.8",
75
75
  "@jsenv/importmap": "1.2.1",
76
76
  "@jsenv/integrity": "0.0.2",