@parcel/workers 2.0.0-dev.1548 → 2.0.0-dev.1557
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/lib/Handle.js +1 -2
- package/lib/child.js +1 -2
- package/package.json +9 -9
- package/src/Worker.js +1 -1
- package/src/WorkerFarm.js +1 -1
- package/src/child.js +1 -1
- package/src/index.js +1 -1
- package/src/types.js +1 -1
package/lib/Handle.js
CHANGED
|
@@ -20,8 +20,7 @@ let HANDLE_ID = 0;
|
|
|
20
20
|
const handleById = new Map();
|
|
21
21
|
class Handle {
|
|
22
22
|
constructor(opts) {
|
|
23
|
-
|
|
24
|
-
this.id = (_opts$id = opts.id) !== null && _opts$id !== void 0 ? _opts$id : ++HANDLE_ID;
|
|
23
|
+
this.id = opts.id ?? ++HANDLE_ID;
|
|
25
24
|
this.fn = opts.fn;
|
|
26
25
|
this.childId = opts.childId;
|
|
27
26
|
handleById.set(this.id, this);
|
package/lib/child.js
CHANGED
|
@@ -232,7 +232,6 @@ class Child {
|
|
|
232
232
|
|
|
233
233
|
// Keep in mind to make sure responses to these calls are JSON.Stringify safe
|
|
234
234
|
addCall(request, awaitResponse = true) {
|
|
235
|
-
var _promise;
|
|
236
235
|
// $FlowFixMe
|
|
237
236
|
let call = {
|
|
238
237
|
...request,
|
|
@@ -252,7 +251,7 @@ class Child {
|
|
|
252
251
|
}
|
|
253
252
|
this.callQueue.push(call);
|
|
254
253
|
this.processQueue();
|
|
255
|
-
return
|
|
254
|
+
return promise ?? Promise.resolve();
|
|
256
255
|
}
|
|
257
256
|
sendRequest(call) {
|
|
258
257
|
let idx;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parcel/workers",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.1557+e87c13686",
|
|
4
4
|
"description": "Blazing fast, zero configuration web application bundler",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -18,23 +18,23 @@
|
|
|
18
18
|
"source": "src/index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"engines": {
|
|
21
|
-
"node": ">=
|
|
21
|
+
"node": ">= 16.0.0"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@parcel/diagnostic": "2.0.0-dev.
|
|
25
|
-
"@parcel/logger": "2.0.0-dev.
|
|
26
|
-
"@parcel/profiler": "2.12.1-dev.
|
|
27
|
-
"@parcel/types": "2.
|
|
28
|
-
"@parcel/utils": "2.0.0-dev.
|
|
24
|
+
"@parcel/diagnostic": "2.0.0-dev.1557+e87c13686",
|
|
25
|
+
"@parcel/logger": "2.0.0-dev.1557+e87c13686",
|
|
26
|
+
"@parcel/profiler": "2.12.1-dev.3204+e87c13686",
|
|
27
|
+
"@parcel/types-internal": "2.12.1-dev.3204+e87c13686",
|
|
28
|
+
"@parcel/utils": "2.0.0-dev.1557+e87c13686",
|
|
29
29
|
"nullthrows": "^1.1.1"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@parcel/core": "^2.0.0-dev.
|
|
32
|
+
"@parcel/core": "^2.0.0-dev.1555+e87c13686"
|
|
33
33
|
},
|
|
34
34
|
"browser": {
|
|
35
35
|
"./src/process/ProcessWorker.js": false,
|
|
36
36
|
"./src/threads/ThreadsWorker.js": false,
|
|
37
37
|
"./src/core-worker.js": "./src/core-worker.browser.js"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "e87c13686e8fa4ad96cc61c19d9e4fcf9c372f2e"
|
|
40
40
|
}
|
package/src/Worker.js
CHANGED
package/src/WorkerFarm.js
CHANGED
package/src/child.js
CHANGED
|
@@ -9,7 +9,7 @@ import type {
|
|
|
9
9
|
WorkerResponse,
|
|
10
10
|
ChildImpl,
|
|
11
11
|
} from './types';
|
|
12
|
-
import type {Async, IDisposable} from '@parcel/types';
|
|
12
|
+
import type {Async, IDisposable} from '@parcel/types-internal';
|
|
13
13
|
import type {SharedReference} from './WorkerFarm';
|
|
14
14
|
|
|
15
15
|
import * as coreWorker from './core-worker';
|
package/src/index.js
CHANGED