@mongosh/node-runtime-worker-thread 1.1.2 → 1.1.7
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/child-process-proxy.js +1 -1
- package/dist/index.js +1 -1
- package/dist/worker-runtime.js +8 -8
- package/package.json +8 -8
- package/src/worker-runtime.ts +10 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mongosh/node-runtime-worker-thread",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"description": "MongoDB shell runtime that lives in a worker thread",
|
|
5
5
|
"homepage": "https://github.com/mongodb-js/mongosh",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"prepublish": "npm run webpack-build"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@mongosh/browser-runtime-core": "1.1.
|
|
32
|
-
"@mongosh/browser-runtime-electron": "1.1.
|
|
33
|
-
"@mongosh/service-provider-core": "1.1.
|
|
34
|
-
"@mongosh/service-provider-server": "1.1.
|
|
35
|
-
"@mongosh/types": "1.1.
|
|
36
|
-
"bson": "^4.
|
|
31
|
+
"@mongosh/browser-runtime-core": "1.1.7",
|
|
32
|
+
"@mongosh/browser-runtime-electron": "1.1.7",
|
|
33
|
+
"@mongosh/service-provider-core": "1.1.7",
|
|
34
|
+
"@mongosh/service-provider-server": "1.1.7",
|
|
35
|
+
"@mongosh/types": "1.1.7",
|
|
36
|
+
"bson": "^4.6.0",
|
|
37
37
|
"mocha": "^7.1.2",
|
|
38
38
|
"postmsg-rpc": "^2.4.0",
|
|
39
39
|
"terser-webpack-plugin": "^4.2.3",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"interruptor": "^1.0.1"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "01997aba3b8e001c8668656731e12d491972756a"
|
|
48
48
|
}
|
package/src/worker-runtime.ts
CHANGED
|
@@ -85,13 +85,21 @@ const workerRuntime: WorkerRuntime = {
|
|
|
85
85
|
driverOptions: MongoClientOptions = {},
|
|
86
86
|
cliOptions: { nodb?: boolean } = {}
|
|
87
87
|
) {
|
|
88
|
-
|
|
88
|
+
// XXX The types here work out fine, and tsc accepts this code
|
|
89
|
+
// without 'as any'. However, since a change to the driver's
|
|
90
|
+
// .find() method signature (https://github.com/mongodb/node-mongodb-native/commit/307d623ea597c5d89c548b6731bd692fec7a8047)
|
|
91
|
+
// the webpack integration build fails with:
|
|
92
|
+
// [tsl] ERROR in /home/addaleax/src/mongosh/packages/node-runtime-worker-thread/src/worker-runtime.ts(88,5)
|
|
93
|
+
// TS2589: Type instantiation is excessively deep and possibly infinite.
|
|
94
|
+
// I could not figure out why exactly that was the case, so 'as any'
|
|
95
|
+
// will have to do for now.
|
|
96
|
+
provider = await (CompassServiceProvider as any).connect(
|
|
89
97
|
uri,
|
|
90
98
|
driverOptions,
|
|
91
99
|
cliOptions,
|
|
92
100
|
messageBus
|
|
93
101
|
);
|
|
94
|
-
runtime = new ElectronRuntime(provider, messageBus);
|
|
102
|
+
runtime = new ElectronRuntime(provider as ServiceProvider, messageBus);
|
|
95
103
|
runtime.setEvaluationListener(evaluationListener);
|
|
96
104
|
},
|
|
97
105
|
|