@utoo/pack 1.0.8-alpha.1 → 1.0.9
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/cjs/loaderWorkerPool.js +5 -0
- package/cjs/types.d.ts +1 -1
- package/esm/loaderWorkerPool.js +5 -0
- package/esm/types.d.ts +1 -1
- package/package.json +8 -8
package/cjs/loaderWorkerPool.js
CHANGED
|
@@ -6,7 +6,11 @@ const loaderWorkers = {};
|
|
|
6
6
|
function getPoolId(cwd, filename) {
|
|
7
7
|
return `${cwd}:${filename}`;
|
|
8
8
|
}
|
|
9
|
+
let workerSchedulerRegistered = false;
|
|
9
10
|
async function runLoaderWorkerPool(binding, bindingPath) {
|
|
11
|
+
if (workerSchedulerRegistered) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
10
14
|
binding.registerWorkerScheduler((creation) => {
|
|
11
15
|
const { options: { filename, cwd }, } = creation;
|
|
12
16
|
let poolId = getPoolId(cwd, filename);
|
|
@@ -27,4 +31,5 @@ async function runLoaderWorkerPool(binding, bindingPath) {
|
|
|
27
31
|
(_a = workers.get(workerId)) === null || _a === void 0 ? void 0 : _a.terminate();
|
|
28
32
|
workers.delete(workerId);
|
|
29
33
|
});
|
|
34
|
+
workerSchedulerRegistered = true;
|
|
30
35
|
}
|
package/cjs/types.d.ts
CHANGED
package/esm/loaderWorkerPool.js
CHANGED
|
@@ -3,7 +3,11 @@ const loaderWorkers = {};
|
|
|
3
3
|
function getPoolId(cwd, filename) {
|
|
4
4
|
return `${cwd}:${filename}`;
|
|
5
5
|
}
|
|
6
|
+
let workerSchedulerRegistered = false;
|
|
6
7
|
export async function runLoaderWorkerPool(binding, bindingPath) {
|
|
8
|
+
if (workerSchedulerRegistered) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
7
11
|
binding.registerWorkerScheduler((creation) => {
|
|
8
12
|
const { options: { filename, cwd }, } = creation;
|
|
9
13
|
let poolId = getPoolId(cwd, filename);
|
|
@@ -24,4 +28,5 @@ export async function runLoaderWorkerPool(binding, bindingPath) {
|
|
|
24
28
|
(_a = workers.get(workerId)) === null || _a === void 0 ? void 0 : _a.terminate();
|
|
25
29
|
workers.delete(workerId);
|
|
26
30
|
});
|
|
31
|
+
workerSchedulerRegistered = true;
|
|
27
32
|
}
|
package/esm/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@utoo/pack",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"main": "cjs/index.js",
|
|
5
5
|
"module": "esm/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -85,12 +85,12 @@
|
|
|
85
85
|
},
|
|
86
86
|
"repository": "git@github.com:utooland/utoo.git",
|
|
87
87
|
"optionalDependencies": {
|
|
88
|
-
"@utoo/pack-darwin-arm64": "1.0.
|
|
89
|
-
"@utoo/pack-darwin-x64": "1.0.
|
|
90
|
-
"@utoo/pack-linux-arm64-gnu": "1.0.
|
|
91
|
-
"@utoo/pack-linux-arm64-musl": "1.0.
|
|
92
|
-
"@utoo/pack-linux-x64-gnu": "1.0.
|
|
93
|
-
"@utoo/pack-linux-x64-musl": "1.0.
|
|
94
|
-
"@utoo/pack-win32-x64-msvc": "1.0.
|
|
88
|
+
"@utoo/pack-darwin-arm64": "1.0.9",
|
|
89
|
+
"@utoo/pack-darwin-x64": "1.0.9",
|
|
90
|
+
"@utoo/pack-linux-arm64-gnu": "1.0.9",
|
|
91
|
+
"@utoo/pack-linux-arm64-musl": "1.0.9",
|
|
92
|
+
"@utoo/pack-linux-x64-gnu": "1.0.9",
|
|
93
|
+
"@utoo/pack-linux-x64-musl": "1.0.9",
|
|
94
|
+
"@utoo/pack-win32-x64-msvc": "1.0.9"
|
|
95
95
|
}
|
|
96
96
|
}
|