@jsenv/core 39.5.6 → 39.5.8
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/jsenv_core.js +24 -18
- package/package.json +2 -2
package/dist/jsenv_core.js
CHANGED
|
@@ -4113,10 +4113,9 @@ const registerDirectoryLifecycle = (
|
|
|
4113
4113
|
entryNameArray = readdirSync(directoryUrlObject);
|
|
4114
4114
|
} catch (e) {
|
|
4115
4115
|
if (e.code === "ENOENT") {
|
|
4116
|
-
|
|
4117
|
-
} else {
|
|
4118
|
-
throw e;
|
|
4116
|
+
return;
|
|
4119
4117
|
}
|
|
4118
|
+
throw e;
|
|
4120
4119
|
}
|
|
4121
4120
|
for (const entryName of entryNameArray) {
|
|
4122
4121
|
const childEntryUrl = new URL(entryName, directoryUrl).href;
|
|
@@ -4127,22 +4126,29 @@ const registerDirectoryLifecycle = (
|
|
|
4127
4126
|
}
|
|
4128
4127
|
// we must watch manually every directory we find
|
|
4129
4128
|
if (!fsWatchSupportsRecursive) {
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
tracker.registerCleanupCallback(() => {
|
|
4134
|
-
watcher.close();
|
|
4135
|
-
});
|
|
4136
|
-
watcher.on("change", (eventType, filename) => {
|
|
4137
|
-
handleDirectoryEvent({
|
|
4138
|
-
directoryRelativeUrl: entryInfo.relativeUrl,
|
|
4139
|
-
filename: filename
|
|
4140
|
-
? // replace back slashes with slashes
|
|
4141
|
-
filename.replace(/\\/g, "/")
|
|
4142
|
-
: "",
|
|
4143
|
-
eventType,
|
|
4129
|
+
try {
|
|
4130
|
+
const watcher = createWatcher(urlToFileSystemPath(entryInfo.url), {
|
|
4131
|
+
persistent: keepProcessAlive,
|
|
4144
4132
|
});
|
|
4145
|
-
|
|
4133
|
+
tracker.registerCleanupCallback(() => {
|
|
4134
|
+
watcher.close();
|
|
4135
|
+
});
|
|
4136
|
+
watcher.on("change", (eventType, filename) => {
|
|
4137
|
+
handleDirectoryEvent({
|
|
4138
|
+
directoryRelativeUrl: entryInfo.relativeUrl,
|
|
4139
|
+
filename: filename
|
|
4140
|
+
? // replace back slashes with slashes
|
|
4141
|
+
filename.replace(/\\/g, "/")
|
|
4142
|
+
: "",
|
|
4143
|
+
eventType,
|
|
4144
|
+
});
|
|
4145
|
+
});
|
|
4146
|
+
} catch (e) {
|
|
4147
|
+
if (e.code === "ENOENT") {
|
|
4148
|
+
return;
|
|
4149
|
+
}
|
|
4150
|
+
throw e;
|
|
4151
|
+
}
|
|
4146
4152
|
}
|
|
4147
4153
|
}
|
|
4148
4154
|
if (added && entryInfo.patternValue && notify) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/core",
|
|
3
|
-
"version": "39.5.
|
|
3
|
+
"version": "39.5.8",
|
|
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.
|
|
73
|
+
"@jsenv/filesystem": "4.10.8",
|
|
74
74
|
"@jsenv/humanize": "1.2.8",
|
|
75
75
|
"@jsenv/importmap": "1.2.1",
|
|
76
76
|
"@jsenv/integrity": "0.0.2",
|