@jsenv/core 27.2.2 → 27.3.0
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/README.md
CHANGED
|
@@ -23,7 +23,7 @@ npm create jsenv@latest
|
|
|
23
23
|
npm install --save-dev @jsenv/core
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
_@jsenv/core_ is tested on Mac, Windows, Linux on Node.js
|
|
26
|
+
_@jsenv/core_ is tested on Mac, Windows, Linux on Node.js 18.5.0. Other operating systems and Node.js versions are not tested.
|
|
27
27
|
|
|
28
28
|
# Documentation
|
|
29
29
|
|
package/dist/main.js
CHANGED
|
@@ -26760,7 +26760,6 @@ nodeWorkerThread.run = async ({
|
|
|
26760
26760
|
env: envForWorkerThread,
|
|
26761
26761
|
execArgv: execArgvForWorkerThread,
|
|
26762
26762
|
// workerData: { options },
|
|
26763
|
-
// trackUnmanagedFds: true,
|
|
26764
26763
|
stdin: true,
|
|
26765
26764
|
stdout: true,
|
|
26766
26765
|
stderr: true
|
|
@@ -26778,7 +26777,6 @@ nodeWorkerThread.run = async ({
|
|
|
26778
26777
|
onceWorkerThreadMessage(workerThread, "ready", resolve);
|
|
26779
26778
|
});
|
|
26780
26779
|
const stop = memoize(async () => {
|
|
26781
|
-
await workerThreadReadyPromise;
|
|
26782
26780
|
await workerThread.terminate();
|
|
26783
26781
|
});
|
|
26784
26782
|
const winnerPromise = new Promise(resolve => {
|
|
@@ -26916,25 +26914,27 @@ nodeWorkerThread.run = async ({
|
|
|
26916
26914
|
const installWorkerThreadOutputListener = (workerThread, callback) => {
|
|
26917
26915
|
// beware that we may receive ansi output here, should not be a problem but keep that in mind
|
|
26918
26916
|
const stdoutDataCallback = chunk => {
|
|
26917
|
+
const text = String(chunk);
|
|
26919
26918
|
callback({
|
|
26920
26919
|
type: "log",
|
|
26921
|
-
text
|
|
26920
|
+
text
|
|
26922
26921
|
});
|
|
26923
26922
|
};
|
|
26924
26923
|
|
|
26925
26924
|
workerThread.stdout.on("data", stdoutDataCallback);
|
|
26926
26925
|
|
|
26927
26926
|
const stdErrorDataCallback = chunk => {
|
|
26927
|
+
const text = String(chunk);
|
|
26928
26928
|
callback({
|
|
26929
26929
|
type: "error",
|
|
26930
|
-
text
|
|
26930
|
+
text
|
|
26931
26931
|
});
|
|
26932
26932
|
};
|
|
26933
26933
|
|
|
26934
26934
|
workerThread.stderr.on("data", stdErrorDataCallback);
|
|
26935
26935
|
return () => {
|
|
26936
26936
|
workerThread.stdout.removeListener("data", stdoutDataCallback);
|
|
26937
|
-
workerThread.stderr.removeListener("data",
|
|
26937
|
+
workerThread.stderr.removeListener("data", stdErrorDataCallback);
|
|
26938
26938
|
};
|
|
26939
26939
|
};
|
|
26940
26940
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/core",
|
|
3
|
-
"version": "27.
|
|
3
|
+
"version": "27.3.0",
|
|
4
4
|
"description": "Tool to develop, test and build js projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"url": "https://github.com/jsenv/jsenv-core"
|
|
14
14
|
},
|
|
15
15
|
"engines": {
|
|
16
|
-
"node": ">=
|
|
16
|
+
"node": ">=18.5.0"
|
|
17
17
|
},
|
|
18
18
|
"publishConfig": {
|
|
19
19
|
"access": "public",
|
|
@@ -86,7 +86,6 @@ nodeWorkerThread.run = async ({
|
|
|
86
86
|
env: envForWorkerThread,
|
|
87
87
|
execArgv: execArgvForWorkerThread,
|
|
88
88
|
// workerData: { options },
|
|
89
|
-
// trackUnmanagedFds: true,
|
|
90
89
|
stdin: true,
|
|
91
90
|
stdout: true,
|
|
92
91
|
stderr: true,
|
|
@@ -103,7 +102,6 @@ nodeWorkerThread.run = async ({
|
|
|
103
102
|
})
|
|
104
103
|
|
|
105
104
|
const stop = memoize(async () => {
|
|
106
|
-
await workerThreadReadyPromise
|
|
107
105
|
await workerThread.terminate()
|
|
108
106
|
})
|
|
109
107
|
|
|
@@ -232,16 +230,18 @@ nodeWorkerThread.run = async ({
|
|
|
232
230
|
const installWorkerThreadOutputListener = (workerThread, callback) => {
|
|
233
231
|
// beware that we may receive ansi output here, should not be a problem but keep that in mind
|
|
234
232
|
const stdoutDataCallback = (chunk) => {
|
|
235
|
-
|
|
233
|
+
const text = String(chunk)
|
|
234
|
+
callback({ type: "log", text })
|
|
236
235
|
}
|
|
237
236
|
workerThread.stdout.on("data", stdoutDataCallback)
|
|
238
237
|
const stdErrorDataCallback = (chunk) => {
|
|
239
|
-
|
|
238
|
+
const text = String(chunk)
|
|
239
|
+
callback({ type: "error", text })
|
|
240
240
|
}
|
|
241
241
|
workerThread.stderr.on("data", stdErrorDataCallback)
|
|
242
242
|
return () => {
|
|
243
243
|
workerThread.stdout.removeListener("data", stdoutDataCallback)
|
|
244
|
-
workerThread.stderr.removeListener("data",
|
|
244
|
+
workerThread.stderr.removeListener("data", stdErrorDataCallback)
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
|