From 856bcac3c5d304fc9ac5ce403af8680b1edd2d53 Mon Sep 17 00:00:00 2001 From: gagik Date: Fri, 25 Oct 2024 14:58:57 +0200 Subject: [PATCH 1/4] WIP: service provider rename --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2a35a4935..b6664fe4e 100644 --- a/package.json +++ b/package.json @@ -1212,7 +1212,7 @@ "@mongodb-js/mongodb-constants": "^0.10.3", "@mongosh/browser-runtime-electron": "^2.3.2", "@mongosh/i18n": "^2.3.2", - "@mongosh/service-provider-server": "^2.3.2", + "@mongosh/service-provider-node-driver": "^2.3.2", "@mongosh/shell-api": "^2.3.2", "@segment/analytics-node": "^1.3.0", "bson": "^6.8.0", From 5eeddfb5c03ffcbd89aff87bd65eccfeb76da87b Mon Sep 17 00:00:00 2001 From: gagik Date: Fri, 25 Oct 2024 15:57:29 +0200 Subject: [PATCH 2/4] change references --- package-lock.json | 10 +++++----- src/language/mongoDBService.ts | 2 +- src/language/worker.ts | 2 +- src/types/playgroundType.ts | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2c8b0ba54..42585ee6b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "@mongodb-js/mongodb-constants": "^0.10.3", "@mongosh/browser-runtime-electron": "^2.3.2", "@mongosh/i18n": "^2.3.2", - "@mongosh/service-provider-server": "^2.3.2", + "@mongosh/service-provider-node-driver": "^2.3.2", "@mongosh/shell-api": "^2.3.2", "@segment/analytics-node": "^1.3.0", "bson": "^6.8.0", @@ -4126,9 +4126,9 @@ "mongodb-client-encryption": "^6.1.0" } }, - "node_modules/@mongosh/service-provider-server": { + "node_modules/@mongosh/service-provider-node-driver": { "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@mongosh/service-provider-server/-/service-provider-server-2.3.2.tgz", + "resolved": "https://registry.npmjs.org/@mongosh/service-provider-node-driver/-/service-provider-node-driver-2.3.2.tgz", "integrity": "sha512-nDrgmmA/JWyUEW551/m2O4btibc8E+kpOcTvp4LNNZwFO4flqKozMv4NKBMxnYrqTjxIEp+A4WzFEND7yesVHg==", "dependencies": { "@mongodb-js/devtools-connect": "^3.3.0", @@ -4149,7 +4149,7 @@ "mongodb-client-encryption": "^6.1.0" } }, - "node_modules/@mongosh/service-provider-server/node_modules/@mongodb-js/devtools-connect": { + "node_modules/@mongosh/service-provider-node-driver/node_modules/@mongodb-js/devtools-connect": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/@mongodb-js/devtools-connect/-/devtools-connect-3.3.1.tgz", "integrity": "sha512-z9TJtUbDakYBKEB+/7fmBjFRcMCtiK/fIi04BKBs8cv71KmbS+PU76y6/7rE/TQucQ7/mPEhWs7+Z9TuKHR20A==", @@ -4172,7 +4172,7 @@ "mongodb-log-writer": "^1.4.2" } }, - "node_modules/@mongosh/service-provider-server/node_modules/@mongodb-js/oidc-plugin": { + "node_modules/@mongosh/service-provider-node-driver/node_modules/@mongodb-js/oidc-plugin": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@mongodb-js/oidc-plugin/-/oidc-plugin-1.1.1.tgz", "integrity": "sha512-u2t3dvUpQJeTmMvXyZu730yJzqJ3aKraQ7ELlNwpKpl1AGxL6Dd9Z2AEu9ycExZjXhyjBW/lbaWuEhdNZHEgeg==", diff --git a/src/language/mongoDBService.ts b/src/language/mongoDBService.ts index 05ea14a8e..defa1b64b 100644 --- a/src/language/mongoDBService.ts +++ b/src/language/mongoDBService.ts @@ -14,7 +14,7 @@ import type { MarkupContent, Diagnostic, } from 'vscode-languageserver/node'; -import { CliServiceProvider } from '@mongosh/service-provider-server'; +import { CliServiceProvider } from '@mongosh/service-provider-node-driver'; import type { Document } from '@mongosh/service-provider-core'; import { getFilteredCompletions } from '@mongodb-js/mongodb-constants'; import parseSchema from 'mongodb-schema'; diff --git a/src/language/worker.ts b/src/language/worker.ts index 229b43ee3..548831cba 100644 --- a/src/language/worker.ts +++ b/src/language/worker.ts @@ -1,4 +1,4 @@ -import { CliServiceProvider } from '@mongosh/service-provider-server'; +import { CliServiceProvider } from '@mongosh/service-provider-node-driver'; import { ElectronRuntime } from '@mongosh/browser-runtime-electron'; import { parentPort } from 'worker_threads'; import { ServerCommands } from './serverCommands'; diff --git a/src/types/playgroundType.ts b/src/types/playgroundType.ts index 859b8a487..57d4968f5 100644 --- a/src/types/playgroundType.ts +++ b/src/types/playgroundType.ts @@ -1,5 +1,5 @@ import type * as vscode from 'vscode'; -import type { CliServiceProvider } from '@mongosh/service-provider-server'; +import type { CliServiceProvider } from '@mongosh/service-provider-node-driver'; export type OutputItem = { namespace: string | null; From f390facee170a677a69d685f952deb70092c6e60 Mon Sep 17 00:00:00 2001 From: gagik Date: Thu, 31 Oct 2024 13:21:10 +0100 Subject: [PATCH 3/4] update to 2.3.3 --- package-lock.json | 211 +++++++++++++++++++++++++--------------------- package.json | 10 +-- 2 files changed, 121 insertions(+), 100 deletions(-) diff --git a/package-lock.json b/package-lock.json index 42585ee6b..3b190ad6c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,10 +16,10 @@ "@mongodb-js/connection-form": "^1.42.0", "@mongodb-js/connection-info": "^0.9.1", "@mongodb-js/mongodb-constants": "^0.10.3", - "@mongosh/browser-runtime-electron": "^2.3.2", - "@mongosh/i18n": "^2.3.2", - "@mongosh/service-provider-node-driver": "^2.3.2", - "@mongosh/shell-api": "^2.3.2", + "@mongosh/browser-runtime-electron": "^2.3.3", + "@mongosh/i18n": "^2.3.3", + "@mongosh/service-provider-node-driver": "^2.3.3", + "@mongosh/shell-api": "^2.3.3", "@segment/analytics-node": "^1.3.0", "bson": "^6.8.0", "bson-transpilers": "^2.2.0", @@ -53,7 +53,7 @@ "@mongodb-js/prettier-config-devtools": "^1.0.1", "@mongodb-js/sbom-tools": "^0.7.2", "@mongodb-js/signing-utils": "^0.3.6", - "@mongosh/service-provider-core": "^2.3.2", + "@mongosh/service-provider-core": "^2.3.3", "@testing-library/react": "^14.3.1", "@testing-library/user-event": "^14.5.2", "@types/babel__traverse": "^7.20.6", @@ -1384,9 +1384,10 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.7.tgz", - "integrity": "sha512-eaPZai0PiqCi09pPs3pAFfl/zYgGaE6IdXtYvmf0qlcDTd3WCtO7JWCcRd64e0EQrcYgiHibEZnOGsSY4QSgaw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.9.tgz", + "integrity": "sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==", + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -1592,11 +1593,12 @@ } }, "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.25.7.tgz", - "integrity": "sha512-xKcfLTlJYUczdaM1+epcdh1UGewJqr9zATgrNHcLBcV2QmfvPPEixo/sK/syql9cEmbr7ulu5HMFG5vbbt/sEA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.25.9.tgz", + "integrity": "sha512-WkCGb/3ZxXepmMiX101nnGiU+1CAdut8oHyEOHxkKuS1qKpU2SMXE2uSvfz8PBuLd49V6LEsbtyPhWC7fnkgvQ==", + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1623,11 +1625,12 @@ } }, "node_modules/@babel/plugin-transform-parameters": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.25.7.tgz", - "integrity": "sha512-FYiTvku63me9+1Nz7TOx4YMtW3tWXzfANZtrzHhUZrz4d47EEtMQhzFoZWESfXuAMMT5mwzD4+y1N8ONAX6lMQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.25.9.tgz", + "integrity": "sha512-wzz6MKwpnshBAiRmn4jR8LYz/g8Ksg0o80XmwZDlordjwEk9SxBzTWC7F5ef1jhbrbOW2DJ5J6ayRukrJmnr0g==", + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1637,11 +1640,12 @@ } }, "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.25.7.tgz", - "integrity": "sha512-uBbxNwimHi5Bv3hUccmOFlUy3ATO6WagTApenHz9KzoIdn0XeACdB12ZJ4cjhuB2WSi80Ez2FWzJnarccriJeA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.25.9.tgz", + "integrity": "sha512-MUv6t0FhO5qHnS/W8XCbHmiRWOphNufpE1IVxhK5kuN3Td9FT1x4rx4K42s3RYdMXCXpfWkGSbCSd0Z64xA7Ng==", + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -4006,12 +4010,13 @@ } }, "node_modules/@mongosh/arg-parser": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@mongosh/arg-parser/-/arg-parser-2.3.2.tgz", - "integrity": "sha512-izy830Jvg1HxP7LnE68dhKvrhIALOCBf/GDI8egJZNfRcvR1VuzaquFhHyFtvhGeoqo+j9ujbaM/24v12+LLFg==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@mongosh/arg-parser/-/arg-parser-2.3.3.tgz", + "integrity": "sha512-CfRB87Tia64CaaxthfQazD3AlEVSXL8UlDvXdiIyMd2LorjSKZ505u1/eO2bEecRUY2TNk724HnQ7TVl8L78QA==", + "license": "Apache-2.0", "dependencies": { - "@mongosh/errors": "2.3.2", - "@mongosh/i18n": "2.3.2", + "@mongosh/errors": "2.3.3", + "@mongosh/i18n": "2.3.3", "mongodb-connection-string-url": "^3.0.1" }, "engines": { @@ -4019,9 +4024,10 @@ } }, "node_modules/@mongosh/async-rewriter2": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@mongosh/async-rewriter2/-/async-rewriter2-2.3.2.tgz", - "integrity": "sha512-VhqTUpv3q+Q/2kyOY37RrHaLyOnxTFyBqGz+wmaS9kADorsVTa6DuIO9GF+JLomVzdyFuIW3uaoNYbwq+mnPCA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@mongosh/async-rewriter2/-/async-rewriter2-2.3.3.tgz", + "integrity": "sha512-JWIQ0Uz5tm5Q7wJnXJMcCFK9G688YCXV6Z929Kwpel7GmAy3B3mvgY5p33sM2ysukcjIZL6g4nRuJ5LkeVJniw==", + "license": "Apache-2.0", "dependencies": { "@babel/core": "^7.22.8", "@babel/plugin-transform-destructuring": "^7.22.5", @@ -4037,12 +4043,13 @@ } }, "node_modules/@mongosh/autocomplete": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@mongosh/autocomplete/-/autocomplete-2.3.2.tgz", - "integrity": "sha512-bpqG9A/O9ILP0vdwEZwV0Wc0T+LzcyqnWx1RWrC3XvUqMz1kfj5IJNK6RI1D7WuueWfi+HF+GAkz4kLNfFkgrg==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@mongosh/autocomplete/-/autocomplete-2.3.3.tgz", + "integrity": "sha512-MtY9nPO+CTQeozjbUnTWYrH7DnvNEzp4lHdviHuf9mGzFlrtel+9WzyntzRTVxR+Zy5oMK5SZewY43Z8GCjpAg==", + "license": "Apache-2.0", "dependencies": { "@mongodb-js/mongodb-constants": "^0.10.1", - "@mongosh/shell-api": "2.3.2", + "@mongosh/shell-api": "2.3.3", "semver": "^7.5.4" }, "engines": { @@ -4050,44 +4057,48 @@ } }, "node_modules/@mongosh/browser-runtime-core": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@mongosh/browser-runtime-core/-/browser-runtime-core-2.3.2.tgz", - "integrity": "sha512-y1qPdNxu6f7A1s6mgBee/iGya0MOIBRBMTGZanlBZv4nDq+nVoskSzhgrBXx+/YB1+/J0anSnCglfdaGUaq8Kw==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@mongosh/browser-runtime-core/-/browser-runtime-core-2.3.3.tgz", + "integrity": "sha512-D5IomTWuV/f09mGttADjSM9FqCMgi9emxzZxJZjVlYoL9DTVd1Gt0Eg1IBnPU7XifaEHYbG7Ll3WnoYhrRlAYA==", + "license": "Apache-2.0", "dependencies": { - "@mongosh/autocomplete": "2.3.2", - "@mongosh/service-provider-core": "2.3.2", - "@mongosh/shell-api": "2.3.2", - "@mongosh/shell-evaluator": "2.3.2" + "@mongosh/autocomplete": "2.3.3", + "@mongosh/service-provider-core": "2.3.3", + "@mongosh/shell-api": "2.3.3", + "@mongosh/shell-evaluator": "2.3.3" }, "engines": { "node": ">=14.15.1" } }, "node_modules/@mongosh/browser-runtime-electron": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@mongosh/browser-runtime-electron/-/browser-runtime-electron-2.3.2.tgz", - "integrity": "sha512-sb47tfPANDSbXYeKxxmXYRveSa1PS7Z3Rv3Lb3N0WfVf4Q4BViGVods+dV5gb/nba09a5GO3xA6G67sG8vSFvw==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@mongosh/browser-runtime-electron/-/browser-runtime-electron-2.3.3.tgz", + "integrity": "sha512-vqazTDC4ROFTTq2reEvh5d2JQ0rbVt4U/C2GrdOnhPKYDnNAecmKLPvNuXFs/PIxplz1C37NaPVB2jFV/iffDw==", + "license": "Apache-2.0", "dependencies": { - "@mongosh/browser-runtime-core": "2.3.2", - "@mongosh/service-provider-core": "2.3.2", - "@mongosh/types": "2.3.2" + "@mongosh/browser-runtime-core": "2.3.3", + "@mongosh/service-provider-core": "2.3.3", + "@mongosh/types": "2.3.3" }, "engines": { "node": ">=14.15.1" } }, "node_modules/@mongosh/errors": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@mongosh/errors/-/errors-2.3.2.tgz", - "integrity": "sha512-TKjWgKmxVW16+3+IcQNgv7RxSE3XinRKapxhs9E5nM5FDAXEMRMQnrhhb4KR9Wtp6phAywPSfNjWhuAeI91efQ==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@mongosh/errors/-/errors-2.3.3.tgz", + "integrity": "sha512-rGeWzTOAkmrIobffPIoQMr79TPo8HbJh/7PAYJl3z8LQY2orS4SwJbZQsqrR0XgZE7ljVGSVigMjIy5KN79Qww==", + "license": "Apache-2.0", "engines": { "node": ">=14.15.1" } }, "node_modules/@mongosh/history": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@mongosh/history/-/history-2.3.2.tgz", - "integrity": "sha512-+XLO1kbTwJ1XJ5PKpyU4vn+gqwGtTXQcF4zZIXwxZPN7a0MnBF2DaoMOvEkUYalG0/rkLdVdhILh17HM0mNLsA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@mongosh/history/-/history-2.3.3.tgz", + "integrity": "sha512-NzXRXSwO1qZfZG76vwUmJvD2BAEgSvvrsuJVRMRV8XmypegLc0tKnB2gKBPzv65Y9km02usi7BhWpoa6OvQkiw==", + "license": "Apache-2.0", "dependencies": { "mongodb-connection-string-url": "^3.0.1", "mongodb-redact": "^1.1.2" @@ -4097,25 +4108,27 @@ } }, "node_modules/@mongosh/i18n": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@mongosh/i18n/-/i18n-2.3.2.tgz", - "integrity": "sha512-n/h/305TRPUAbBunhULKiqf9QyNHfgpj8WQjPI/2nZdfCKw29cdkiYjBNEMKl1j3jIGD51/wYgIUT4e51vZUwg==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@mongosh/i18n/-/i18n-2.3.3.tgz", + "integrity": "sha512-essiM0eMiMcmgDMjd8gYfiZSHhN+zRl//ykrKcZSHr/2Dhsz01ran2bFihkuqxqUhNS6zYwjglTVPHu7Mz+Z4w==", + "license": "Apache-2.0", "dependencies": { - "@mongosh/errors": "2.3.2" + "@mongosh/errors": "2.3.3" }, "engines": { "node": ">=14.15.1" } }, "node_modules/@mongosh/service-provider-core": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@mongosh/service-provider-core/-/service-provider-core-2.3.2.tgz", - "integrity": "sha512-lQqLuFojElKADTueYIE6gUPud31zrNwsFNk23mgH/PKDDYHGtYt5ZKQ7aAFe57HSMUZXk13SiANFukdoTcfvtA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@mongosh/service-provider-core/-/service-provider-core-2.3.3.tgz", + "integrity": "sha512-8LIl5tBgwuuUYT9VMxdPf7Aow1D9kCUbuTzTOO7vLVYoihxAPyLcR3+N85zV4wVvKSZH69lGoFW3xFDwdTyBGQ==", + "license": "Apache-2.0", "dependencies": { "@aws-sdk/credential-providers": "^3.525.0", - "@mongosh/errors": "2.3.2", - "bson": "^6.8.0", - "mongodb": "^6.9.0", + "@mongosh/errors": "2.3.3", + "bson": "^6.9.0", + "mongodb": "^6.10.0", "mongodb-build-info": "^1.7.2", "mongodb-connection-string-url": "^3.0.1" }, @@ -4127,17 +4140,18 @@ } }, "node_modules/@mongosh/service-provider-node-driver": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@mongosh/service-provider-node-driver/-/service-provider-node-driver-2.3.2.tgz", - "integrity": "sha512-nDrgmmA/JWyUEW551/m2O4btibc8E+kpOcTvp4LNNZwFO4flqKozMv4NKBMxnYrqTjxIEp+A4WzFEND7yesVHg==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@mongosh/service-provider-node-driver/-/service-provider-node-driver-2.3.3.tgz", + "integrity": "sha512-82ORgX2X0mLAsyOqsLjMOGN6A1nrVS76PVoL3X9oaegcGkMduShl7mAebpAusxdXl9nNBqtsnT7PDF0X/tOAOA==", + "license": "Apache-2.0", "dependencies": { "@mongodb-js/devtools-connect": "^3.3.0", "@mongodb-js/oidc-plugin": "^1.1.1", - "@mongosh/errors": "2.3.2", - "@mongosh/service-provider-core": "2.3.2", - "@mongosh/types": "2.3.2", + "@mongosh/errors": "2.3.3", + "@mongosh/service-provider-core": "2.3.3", + "@mongosh/types": "2.3.3", "aws4": "^1.12.0", - "mongodb": "^6.9.0", + "mongodb": "^6.10.0", "mongodb-connection-string-url": "^3.0.1", "socks": "^2.8.3" }, @@ -4186,15 +4200,16 @@ } }, "node_modules/@mongosh/shell-api": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@mongosh/shell-api/-/shell-api-2.3.2.tgz", - "integrity": "sha512-VDj6XVn7m6qHWphJAxPAnQ4HknJ2VZWwQFfQHm9u/6HFDnpAdnN/bubY9nawc55qdZTadpvg5m9YvmOZ3541rA==", - "dependencies": { - "@mongosh/arg-parser": "2.3.2", - "@mongosh/errors": "2.3.2", - "@mongosh/history": "2.3.2", - "@mongosh/i18n": "2.3.2", - "@mongosh/service-provider-core": "2.3.2", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@mongosh/shell-api/-/shell-api-2.3.3.tgz", + "integrity": "sha512-hXnjEhW1ISH4J8UZOY0zqeZ51rkRqwoy1xfqya65Oyn22vQkO9ZR5XL3HzNVsH5h2Axvope2jbJGNsRGk0LQOQ==", + "license": "Apache-2.0", + "dependencies": { + "@mongosh/arg-parser": "2.3.3", + "@mongosh/errors": "2.3.3", + "@mongosh/history": "2.3.3", + "@mongosh/i18n": "2.3.3", + "@mongosh/service-provider-core": "2.3.3", "mongodb-redact": "^1.1.2" }, "engines": { @@ -4202,22 +4217,24 @@ } }, "node_modules/@mongosh/shell-evaluator": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@mongosh/shell-evaluator/-/shell-evaluator-2.3.2.tgz", - "integrity": "sha512-dQPRrsi60SFrn/p0vHkcsR+i7hUSQagdwkj0JarqDtGFuowWn6f2t4crSklOjM0wie4Bi/bsXwtFyGEUl+YN2g==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@mongosh/shell-evaluator/-/shell-evaluator-2.3.3.tgz", + "integrity": "sha512-+TJxh3HgNmkApMNPsbZiZm/gqui3EYUuinZJtqWpZkisLA4dlTbuAGjkS4pKFS6CU1lLYk+7ytfj0oXFx9Ij2w==", + "license": "Apache-2.0", "dependencies": { - "@mongosh/async-rewriter2": "2.3.2", - "@mongosh/history": "2.3.2", - "@mongosh/shell-api": "2.3.2" + "@mongosh/async-rewriter2": "2.3.3", + "@mongosh/history": "2.3.3", + "@mongosh/shell-api": "2.3.3" }, "engines": { "node": ">=14.15.1" } }, "node_modules/@mongosh/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@mongosh/types/-/types-2.3.2.tgz", - "integrity": "sha512-QXKsjEVsz1X2WyvWNyGsI+8Zs3/Z+vbCiBOC3t95JrGJlbkz5uPjGbAwcXSZTheehdCd01spgedSNn3r5yQDtQ==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@mongosh/types/-/types-2.3.3.tgz", + "integrity": "sha512-Jw/SOOPlK+O7NpD6yrtNVqvUDs96Cilb5IFjbKAeBi4z+vfjdDjBsCtpD9HfI8dc5Wh9PMZtOsbjsVhdBvvqXA==", + "license": "Apache-2.0", "dependencies": { "@mongodb-js/devtools-connect": "^3.3.0" }, @@ -4226,9 +4243,10 @@ } }, "node_modules/@mongosh/types/node_modules/@mongodb-js/devtools-connect": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@mongodb-js/devtools-connect/-/devtools-connect-3.3.1.tgz", - "integrity": "sha512-z9TJtUbDakYBKEB+/7fmBjFRcMCtiK/fIi04BKBs8cv71KmbS+PU76y6/7rE/TQucQ7/mPEhWs7+Z9TuKHR20A==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@mongodb-js/devtools-connect/-/devtools-connect-3.3.2.tgz", + "integrity": "sha512-nrl6QL0c4OUX0ov1lceDalOttlsN56ST6A0lBXkhce7aDjYl5Q1+OR06C9npKOgw7QNOFzgCgNRgsd+e7kM2+Q==", + "license": "Apache-2.0", "dependencies": { "@mongodb-js/devtools-proxy-support": "^0.4.1", "@mongodb-js/oidc-http-server-pages": "1.1.3", @@ -4252,6 +4270,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/@mongodb-js/oidc-plugin/-/oidc-plugin-1.1.1.tgz", "integrity": "sha512-u2t3dvUpQJeTmMvXyZu730yJzqJ3aKraQ7ELlNwpKpl1AGxL6Dd9Z2AEu9ycExZjXhyjBW/lbaWuEhdNZHEgeg==", + "license": "Apache-2.0", "peer": true, "dependencies": { "express": "^4.18.2", @@ -7476,9 +7495,10 @@ } }, "node_modules/bson": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/bson/-/bson-6.8.0.tgz", - "integrity": "sha512-iOJg8pr7wq2tg/zSlCCHMi3hMm5JTOxLTagf3zxhcenHsFp+c6uOs6K7W5UE7A4QIJGtqh/ZovFNMP4mOPJynQ==", + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/bson/-/bson-6.9.0.tgz", + "integrity": "sha512-X9hJeyeM0//Fus+0pc5dSUMhhrrmWwQUtdavaQeF3Ta6m69matZkGWV/MrBcnwUeLC8W9kwwc2hfkZgUuCX3Ig==", + "license": "Apache-2.0", "engines": { "node": ">=16.20.1" } @@ -14440,9 +14460,9 @@ } }, "node_modules/mongodb": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.9.0.tgz", - "integrity": "sha512-UMopBVx1LmEUbW/QE0Hw18u583PEDVQmUmVzzBRH0o/xtE9DBRA5ZYLOjpLIa03i8FXjzvQECJcqoMvCXftTUA==", + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.10.0.tgz", + "integrity": "sha512-gP9vduuYWb9ZkDM546M+MP2qKVk5ZG2wPF63OvSRuUbqCR+11ZCAE1mOfllhlAG0wcoJY5yDL/rV3OmYEwXIzg==", "license": "Apache-2.0", "dependencies": { "@mongodb-js/saslprep": "^1.1.5", @@ -14739,6 +14759,7 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/mongodb-redact/-/mongodb-redact-1.1.4.tgz", "integrity": "sha512-UZT53VPCYq2W8KwlCBJGZHYo3k9eKhUZGZhhLfDqjiL64PnnR0Wp+LeaqsBdZtnV8BGiBGW8jPn87V1uStFqSg==", + "license": "Apache-2.0", "dependencies": { "lodash": "^4.17.21" } diff --git a/package.json b/package.json index b6664fe4e..5f139f439 100644 --- a/package.json +++ b/package.json @@ -1210,10 +1210,10 @@ "@mongodb-js/connection-form": "^1.42.0", "@mongodb-js/connection-info": "^0.9.1", "@mongodb-js/mongodb-constants": "^0.10.3", - "@mongosh/browser-runtime-electron": "^2.3.2", - "@mongosh/i18n": "^2.3.2", - "@mongosh/service-provider-node-driver": "^2.3.2", - "@mongosh/shell-api": "^2.3.2", + "@mongosh/browser-runtime-electron": "^2.3.3", + "@mongosh/i18n": "^2.3.3", + "@mongosh/service-provider-node-driver": "^2.3.3", + "@mongosh/shell-api": "^2.3.3", "@segment/analytics-node": "^1.3.0", "bson": "^6.8.0", "bson-transpilers": "^2.2.0", @@ -1248,7 +1248,7 @@ "mongodb-rag-core": "^0.4.1", "@mongodb-js/sbom-tools": "^0.7.2", "@mongodb-js/signing-utils": "^0.3.6", - "@mongosh/service-provider-core": "^2.3.2", + "@mongosh/service-provider-core": "^2.3.3", "@testing-library/react": "^14.3.1", "@testing-library/user-event": "^14.5.2", "@types/babel__traverse": "^7.20.6", From 638a0201ade3ac923088207f47c7ec20047f9bfa Mon Sep 17 00:00:00 2001 From: gagik Date: Thu, 31 Oct 2024 13:43:17 +0100 Subject: [PATCH 4/4] Rename CliServiceProvider to NodeDriverServiceProvider --- src/language/mongoDBService.ts | 28 +++++++++++++++------------- src/language/server.ts | 2 +- src/language/worker.ts | 4 ++-- src/types/playgroundType.ts | 6 +++--- 4 files changed, 21 insertions(+), 19 deletions(-) diff --git a/src/language/mongoDBService.ts b/src/language/mongoDBService.ts index defa1b64b..94315c2cb 100644 --- a/src/language/mongoDBService.ts +++ b/src/language/mongoDBService.ts @@ -14,7 +14,7 @@ import type { MarkupContent, Diagnostic, } from 'vscode-languageserver/node'; -import { CliServiceProvider } from '@mongosh/service-provider-node-driver'; +import { NodeDriverServiceProvider } from '@mongosh/service-provider-node-driver'; import type { Document } from '@mongosh/service-provider-core'; import { getFilteredCompletions } from '@mongodb-js/mongodb-constants'; import parseSchema from 'mongodb-schema'; @@ -73,7 +73,7 @@ export default class MongoDBService { _fields: { [namespace: string]: string[] } = {}; _visitor: Visitor; - _serviceProvider?: CliServiceProvider; + _serviceProvider?: NodeDriverServiceProvider; constructor(connection: Connection) { connection.console.log('MongoDBService initializing...'); @@ -120,7 +120,7 @@ export default class MongoDBService { } /** - * Change CliServiceProvider active connection. + * Change NodeDriverServiceProvider active connection. */ async activeConnectionChanged({ connectionId, @@ -132,12 +132,14 @@ export default class MongoDBService { connectionErrorMessage?: string; }> { this._connection.console.log( - `Changing CliServiceProvider active connection... ${JSON.stringify({ - currentConnectionId: this._currentConnectionId, - newConnectionId: connectionId, - hasConnectionString: !!connectionString, - hasConnectionOptions: !!connectionOptions, - })}` + `Changing NodeDriverServiceProvider active connection... ${JSON.stringify( + { + currentConnectionId: this._currentConnectionId, + newConnectionId: connectionId, + hasConnectionString: !!connectionString, + hasConnectionOptions: !!connectionOptions, + } + )}` ); // If already connected close the previous connection. @@ -160,7 +162,7 @@ export default class MongoDBService { if (connectionId && (!connectionString || !connectionOptions)) { this._connection.console.error( - 'Failed to change CliServiceProvider active connection: connectionString and connectionOptions are required' + 'Failed to change NodeDriverServiceProvider active connection: connectionString and connectionOptions are required' ); return { connectionId, @@ -171,7 +173,7 @@ export default class MongoDBService { } if (connectionString && connectionOptions) { - this._serviceProvider = await CliServiceProvider.connect( + this._serviceProvider = await NodeDriverServiceProvider.connect( connectionString, connectionOptions ); @@ -184,7 +186,7 @@ export default class MongoDBService { } this._connection.console.log( - `CliServiceProvider active connection has changed: { connectionId: ${connectionId} }` + `NodeDriverServiceProvider active connection has changed: { connectionId: ${connectionId} }` ); return { successfullyConnected: true, @@ -249,7 +251,7 @@ export default class MongoDBService { // We use cancelation tokens to handle users' requests to terminate // the current evaluation. // Each thread is responsible for one playground evaluation and then terminates. - // By doing this we ensure that the CliServiceProvider connection is up-to-date, + // By doing this we ensure that the NodeDriverServiceProvider connection is up-to-date, // and that multiple playground runs do not interfere with each other. // // There is an issue with support for `.ts` files. diff --git a/src/language/server.ts b/src/language/server.ts index b66793bb5..587e6096c 100644 --- a/src/language/server.ts +++ b/src/language/server.ts @@ -172,7 +172,7 @@ connection.onRequest(ServerCommands.INITIALIZE_MONGODB_SERVICE, (settings) => { mongoDBService.initialize(settings); }); -// Change CliServiceProvider active connection. +// Change NodeDriverServiceProvider active connection. connection.onRequest(ServerCommands.ACTIVE_CONNECTION_CHANGED, (params) => { return mongoDBService.activeConnectionChanged(params); }); diff --git a/src/language/worker.ts b/src/language/worker.ts index 548831cba..190d9755f 100644 --- a/src/language/worker.ts +++ b/src/language/worker.ts @@ -1,4 +1,4 @@ -import { CliServiceProvider } from '@mongosh/service-provider-node-driver'; +import { NodeDriverServiceProvider } from '@mongosh/service-provider-node-driver'; import { ElectronRuntime } from '@mongosh/browser-runtime-electron'; import { parentPort } from 'worker_threads'; import { ServerCommands } from './serverCommands'; @@ -71,7 +71,7 @@ export const execute = async ({ data: ShellEvaluateResult | null; error?: any; }> => { - const serviceProvider = await CliServiceProvider.connect( + const serviceProvider = await NodeDriverServiceProvider.connect( connectionString, connectionOptions ); diff --git a/src/types/playgroundType.ts b/src/types/playgroundType.ts index 57d4968f5..61ec2f613 100644 --- a/src/types/playgroundType.ts +++ b/src/types/playgroundType.ts @@ -1,5 +1,5 @@ import type * as vscode from 'vscode'; -import type { CliServiceProvider } from '@mongosh/service-provider-node-driver'; +import type { NodeDriverServiceProvider } from '@mongosh/service-provider-node-driver'; export type OutputItem = { namespace: string | null; @@ -60,9 +60,9 @@ export interface ExportToLanguageNamespace { collectionName: string | null; } -// MongoClientOptions is the second argument of CliServiceProvider.connect(connectionStr, options). +// MongoClientOptions is the second argument of NodeDriverServiceProvider.connect(connectionStr, options). export type MongoClientOptions = NonNullable< - Parameters<(typeof CliServiceProvider)['connect']>[1] + Parameters<(typeof NodeDriverServiceProvider)['connect']>[1] >; export interface WorkerEvaluate {