diff --git a/package-lock.json b/package-lock.json index cd0d52f5e65a..b360528c4fe6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,6 @@ "dependencies": { "@iarna/toml": "^2.2.5", "@vscode/extension-telemetry": "^0.8.4", - "@vscode/jupyter-lsp-middleware": "^0.2.50", "arch": "^2.1.0", "fs-extra": "^10.0.1", "glob": "^7.2.0", @@ -34,9 +33,9 @@ "unicode": "^14.0.0", "untildify": "^4.0.0", "vscode-debugprotocol": "^1.28.0", - "vscode-jsonrpc": "^9.0.0-next.2", - "vscode-languageclient": "^10.0.0-next.2", - "vscode-languageserver-protocol": "^3.17.6-next.3", + "vscode-jsonrpc": "^9.0.0-next.4", + "vscode-languageclient": "^10.0.0-next.8", + "vscode-languageserver-protocol": "^3.17.6-next.6", "vscode-tas-client": "^0.1.84", "which": "^2.0.2", "winreg": "^1.2.4", @@ -1983,89 +1982,6 @@ "vscode": "^1.75.0" } }, - "node_modules/@vscode/jupyter-lsp-middleware": { - "version": "0.2.50", - "resolved": "https://registry.npmjs.org/@vscode/jupyter-lsp-middleware/-/jupyter-lsp-middleware-0.2.50.tgz", - "integrity": "sha512-oOEpRZOJdKjByRMkUDVdGlQDiEO4/Mjr88u5zqktaS/4h0NtX8Hk6+HNQwENp4ur3Dpu47gD8wOTCrkOWzbHlA==", - "dependencies": { - "@vscode/lsp-notebook-concat": "^0.1.16", - "fast-myers-diff": "^3.0.1", - "sha.js": "^2.4.11", - "vscode-languageclient": "^8.0.2-next.4", - "vscode-languageserver-protocol": "^3.17.2-next.5", - "vscode-uri": "^3.0.2" - }, - "engines": { - "vscode": "^1.67.0-insider" - } - }, - "node_modules/@vscode/jupyter-lsp-middleware/node_modules/vscode-jsonrpc": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.1.0.tgz", - "integrity": "sha512-6TDy/abTQk+zDGYazgbIPc+4JoXdwC8NHU9Pbn4UJP1fehUyZmM4RHp5IthX7A6L5KS30PRui+j+tbbMMMafdw==", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@vscode/jupyter-lsp-middleware/node_modules/vscode-languageclient": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-8.1.0.tgz", - "integrity": "sha512-GL4QdbYUF/XxQlAsvYWZRV3V34kOkpRlvV60/72ghHfsYFnS/v2MANZ9P6sHmxFcZKOse8O+L9G7Czg0NUWing==", - "dependencies": { - "minimatch": "^5.1.0", - "semver": "^7.3.7", - "vscode-languageserver-protocol": "3.17.3" - }, - "engines": { - "vscode": "^1.67.0" - } - }, - "node_modules/@vscode/jupyter-lsp-middleware/node_modules/vscode-languageserver-protocol": { - "version": "3.17.3", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.3.tgz", - "integrity": "sha512-924/h0AqsMtA5yK22GgMtCYiMdCOtWTSGgUOkgEDX+wk2b0x4sAfLiO4NxBxqbiVtz7K7/1/RgVrVI0NClZwqA==", - "dependencies": { - "vscode-jsonrpc": "8.1.0", - "vscode-languageserver-types": "3.17.3" - } - }, - "node_modules/@vscode/jupyter-lsp-middleware/node_modules/vscode-languageserver-types": { - "version": "3.17.3", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.3.tgz", - "integrity": "sha512-SYU4z1dL0PyIMd4Vj8YOqFvHu7Hz/enbWtpfnVbJHU4Nd1YNYx8u0ennumc6h48GQNeOLxmwySmnADouT/AuZA==" - }, - "node_modules/@vscode/lsp-notebook-concat": { - "version": "0.1.16", - "resolved": "https://registry.npmjs.org/@vscode/lsp-notebook-concat/-/lsp-notebook-concat-0.1.16.tgz", - "integrity": "sha512-jN2ut22GR/xelxHx2W9U+uZoylHGCezsNmsMYn20LgVHTcJMGL+4bL5PJeh63yo6P5XjAPtoeeymvp5EafJV+w==", - "dependencies": { - "object-hash": "^3.0.0", - "vscode-languageserver-protocol": "^3.17.2-next.5", - "vscode-uri": "^3.0.2" - } - }, - "node_modules/@vscode/lsp-notebook-concat/node_modules/vscode-jsonrpc": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", - "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@vscode/lsp-notebook-concat/node_modules/vscode-languageserver-protocol": { - "version": "3.17.5", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", - "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", - "dependencies": { - "vscode-jsonrpc": "8.2.0", - "vscode-languageserver-types": "3.17.5" - } - }, - "node_modules/@vscode/lsp-notebook-concat/node_modules/vscode-languageserver-types": { - "version": "3.17.5", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", - "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==" - }, "node_modules/@vscode/test-electron": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.3.8.tgz", @@ -5971,11 +5887,6 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, - "node_modules/fast-myers-diff": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/fast-myers-diff/-/fast-myers-diff-3.0.1.tgz", - "integrity": "sha512-e8p26utONwDXeSDkDqu4jaR3l3r6ZgQO2GWB178ePZxCfFoRPNTJVZylUEHHG6uZeRikL1zCc2sl4sIAs9c0UQ==" - }, "node_modules/fastest-levenshtein": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz", @@ -9923,14 +9834,6 @@ "node": ">=0.10.0" } }, - "node_modules/object-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", - "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", - "engines": { - "node": ">= 6" - } - }, "node_modules/object-inspect": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", @@ -11225,7 +11128,8 @@ "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true }, "node_modules/safer-buffer": { "version": "2.1.2", @@ -11348,6 +11252,7 @@ "version": "2.4.11", "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, "dependencies": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -13162,24 +13067,24 @@ "deprecated": "This package has been renamed to @vscode/debugprotocol, please update to the new name" }, "node_modules/vscode-jsonrpc": { - "version": "9.0.0-next.2", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-9.0.0-next.2.tgz", - "integrity": "sha512-meIaXAgChCHzWy45QGU8YpCNyqnZQ/sYeCj32OLDDbUYsCF7AvgpdXx3nnZn9yzr8ed0Od9bW+NGphEmXsqvIQ==", + "version": "9.0.0-next.4", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-9.0.0-next.4.tgz", + "integrity": "sha512-zSVIr58lJSMYKIsZ5P7GtBbv1eEx25eNyOf0NmEzxmn1GhUNJAVAb5hkA1poKUwj1FRMwN6CeyWxZypmr8SsQQ==", "engines": { "node": ">=14.0.0" } }, "node_modules/vscode-languageclient": { - "version": "10.0.0-next.2", - "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-10.0.0-next.2.tgz", - "integrity": "sha512-ERKtgOkto4pHCxC2u1K3FfsYHSt8AeuZJjg1u/3TvnrCbBkMxrpn5mHWkh4m3rl6qo2Wk4m9YFgU6F7KCWQNZw==", + "version": "10.0.0-next.8", + "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-10.0.0-next.8.tgz", + "integrity": "sha512-D9inIHgqKayO9Tv0MeLb3XIL76yTuWmKdHqcGZKzjtQrMGJgASJDYWTapu+yAjEpDp0gmVOaCYyIlLB86ncDoQ==", "dependencies": { "minimatch": "^9.0.3", "semver": "^7.6.0", - "vscode-languageserver-protocol": "3.17.6-next.3" + "vscode-languageserver-protocol": "3.17.6-next.6" }, "engines": { - "vscode": "^1.86.0" + "vscode": "^1.89.0" } }, "node_modules/vscode-languageclient/node_modules/brace-expansion": { @@ -13205,18 +13110,18 @@ } }, "node_modules/vscode-languageserver-protocol": { - "version": "3.17.6-next.3", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.6-next.3.tgz", - "integrity": "sha512-H8ATH5SAvc3JzttS+AL6g681PiBOZM/l34WP2JZk4akY3y7NqTP+f9cJ+MhrVBbD3aDS8bdAKewZgbFLW6M8Pg==", + "version": "3.17.6-next.6", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.6-next.6.tgz", + "integrity": "sha512-naxM9kc/phpl0kAFNVPejMUWUtzFXdPYY/BtQTYtfbBbHf8sceHOrKkmf6yynZRu1A4oFtRZNqV3wyFRTWqUHw==", "dependencies": { - "vscode-jsonrpc": "9.0.0-next.2", - "vscode-languageserver-types": "3.17.6-next.3" + "vscode-jsonrpc": "9.0.0-next.4", + "vscode-languageserver-types": "3.17.6-next.4" } }, "node_modules/vscode-languageserver-types": { - "version": "3.17.6-next.3", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.6-next.3.tgz", - "integrity": "sha512-l5kNFXFRQGuzriXpuBqFpRmkf6f6A4VoU3h95OsVkqIOoi1k7KbwSo600cIdsKSJWrPg/+vX+QMPcMw1oI7ItA==" + "version": "3.17.6-next.4", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.6-next.4.tgz", + "integrity": "sha512-SeJTpH/S14EbxOAVaOUoGVqPToqpRTld5QO5Ghig3AlbFJTFF9Wu7srHMfa85L0SX1RYAuuCSFKJVVCxDIk1/Q==" }, "node_modules/vscode-tas-client": { "version": "0.1.84", @@ -13229,11 +13134,6 @@ "vscode": "^1.85.0" } }, - "node_modules/vscode-uri": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.6.tgz", - "integrity": "sha512-fmL7V1eiDBFRRnu+gfRWTzyPpNIHJTc4mWnFkwBUmO9U3KPgJAmTx7oxi2bl/Rh6HLdU7+4C9wlj0k2E4AdKFQ==" - }, "node_modules/watchpack": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", @@ -15486,81 +15386,6 @@ "applicationinsights": "^2.7.1" } }, - "@vscode/jupyter-lsp-middleware": { - "version": "0.2.50", - "resolved": "https://registry.npmjs.org/@vscode/jupyter-lsp-middleware/-/jupyter-lsp-middleware-0.2.50.tgz", - "integrity": "sha512-oOEpRZOJdKjByRMkUDVdGlQDiEO4/Mjr88u5zqktaS/4h0NtX8Hk6+HNQwENp4ur3Dpu47gD8wOTCrkOWzbHlA==", - "requires": { - "@vscode/lsp-notebook-concat": "^0.1.16", - "fast-myers-diff": "^3.0.1", - "sha.js": "^2.4.11", - "vscode-languageclient": "^8.0.2-next.4", - "vscode-languageserver-protocol": "^3.17.2-next.5", - "vscode-uri": "^3.0.2" - }, - "dependencies": { - "vscode-jsonrpc": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.1.0.tgz", - "integrity": "sha512-6TDy/abTQk+zDGYazgbIPc+4JoXdwC8NHU9Pbn4UJP1fehUyZmM4RHp5IthX7A6L5KS30PRui+j+tbbMMMafdw==" - }, - "vscode-languageclient": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-8.1.0.tgz", - "integrity": "sha512-GL4QdbYUF/XxQlAsvYWZRV3V34kOkpRlvV60/72ghHfsYFnS/v2MANZ9P6sHmxFcZKOse8O+L9G7Czg0NUWing==", - "requires": { - "minimatch": "^5.1.0", - "semver": "^7.3.7", - "vscode-languageserver-protocol": "3.17.3" - } - }, - "vscode-languageserver-protocol": { - "version": "3.17.3", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.3.tgz", - "integrity": "sha512-924/h0AqsMtA5yK22GgMtCYiMdCOtWTSGgUOkgEDX+wk2b0x4sAfLiO4NxBxqbiVtz7K7/1/RgVrVI0NClZwqA==", - "requires": { - "vscode-jsonrpc": "8.1.0", - "vscode-languageserver-types": "3.17.3" - } - }, - "vscode-languageserver-types": { - "version": "3.17.3", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.3.tgz", - "integrity": "sha512-SYU4z1dL0PyIMd4Vj8YOqFvHu7Hz/enbWtpfnVbJHU4Nd1YNYx8u0ennumc6h48GQNeOLxmwySmnADouT/AuZA==" - } - } - }, - "@vscode/lsp-notebook-concat": { - "version": "0.1.16", - "resolved": "https://registry.npmjs.org/@vscode/lsp-notebook-concat/-/lsp-notebook-concat-0.1.16.tgz", - "integrity": "sha512-jN2ut22GR/xelxHx2W9U+uZoylHGCezsNmsMYn20LgVHTcJMGL+4bL5PJeh63yo6P5XjAPtoeeymvp5EafJV+w==", - "requires": { - "object-hash": "^3.0.0", - "vscode-languageserver-protocol": "^3.17.2-next.5", - "vscode-uri": "^3.0.2" - }, - "dependencies": { - "vscode-jsonrpc": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", - "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==" - }, - "vscode-languageserver-protocol": { - "version": "3.17.5", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", - "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", - "requires": { - "vscode-jsonrpc": "8.2.0", - "vscode-languageserver-types": "3.17.5" - } - }, - "vscode-languageserver-types": { - "version": "3.17.5", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", - "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==" - } - } - }, "@vscode/test-electron": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.3.8.tgz", @@ -18631,11 +18456,6 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, - "fast-myers-diff": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/fast-myers-diff/-/fast-myers-diff-3.0.1.tgz", - "integrity": "sha512-e8p26utONwDXeSDkDqu4jaR3l3r6ZgQO2GWB178ePZxCfFoRPNTJVZylUEHHG6uZeRikL1zCc2sl4sIAs9c0UQ==" - }, "fastest-levenshtein": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz", @@ -21692,11 +21512,6 @@ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true }, - "object-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", - "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==" - }, "object-inspect": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", @@ -22683,7 +22498,8 @@ "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -22782,6 +22598,7 @@ "version": "2.4.11", "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -24176,18 +23993,18 @@ "integrity": "sha512-+OMm11R1bGYbpIJ5eQIkwoDGFF4GvBz3Ztl6/VM+/RNNb2Gjk2c0Ku+oMmfhlTmTlPCpgHBsH4JqVCbUYhu5bA==" }, "vscode-jsonrpc": { - "version": "9.0.0-next.2", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-9.0.0-next.2.tgz", - "integrity": "sha512-meIaXAgChCHzWy45QGU8YpCNyqnZQ/sYeCj32OLDDbUYsCF7AvgpdXx3nnZn9yzr8ed0Od9bW+NGphEmXsqvIQ==" + "version": "9.0.0-next.4", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-9.0.0-next.4.tgz", + "integrity": "sha512-zSVIr58lJSMYKIsZ5P7GtBbv1eEx25eNyOf0NmEzxmn1GhUNJAVAb5hkA1poKUwj1FRMwN6CeyWxZypmr8SsQQ==" }, "vscode-languageclient": { - "version": "10.0.0-next.2", - "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-10.0.0-next.2.tgz", - "integrity": "sha512-ERKtgOkto4pHCxC2u1K3FfsYHSt8AeuZJjg1u/3TvnrCbBkMxrpn5mHWkh4m3rl6qo2Wk4m9YFgU6F7KCWQNZw==", + "version": "10.0.0-next.8", + "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-10.0.0-next.8.tgz", + "integrity": "sha512-D9inIHgqKayO9Tv0MeLb3XIL76yTuWmKdHqcGZKzjtQrMGJgASJDYWTapu+yAjEpDp0gmVOaCYyIlLB86ncDoQ==", "requires": { "minimatch": "^9.0.3", "semver": "^7.6.0", - "vscode-languageserver-protocol": "3.17.6-next.3" + "vscode-languageserver-protocol": "3.17.6-next.6" }, "dependencies": { "brace-expansion": { @@ -24209,18 +24026,18 @@ } }, "vscode-languageserver-protocol": { - "version": "3.17.6-next.3", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.6-next.3.tgz", - "integrity": "sha512-H8ATH5SAvc3JzttS+AL6g681PiBOZM/l34WP2JZk4akY3y7NqTP+f9cJ+MhrVBbD3aDS8bdAKewZgbFLW6M8Pg==", + "version": "3.17.6-next.6", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.6-next.6.tgz", + "integrity": "sha512-naxM9kc/phpl0kAFNVPejMUWUtzFXdPYY/BtQTYtfbBbHf8sceHOrKkmf6yynZRu1A4oFtRZNqV3wyFRTWqUHw==", "requires": { - "vscode-jsonrpc": "9.0.0-next.2", - "vscode-languageserver-types": "3.17.6-next.3" + "vscode-jsonrpc": "9.0.0-next.4", + "vscode-languageserver-types": "3.17.6-next.4" } }, "vscode-languageserver-types": { - "version": "3.17.6-next.3", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.6-next.3.tgz", - "integrity": "sha512-l5kNFXFRQGuzriXpuBqFpRmkf6f6A4VoU3h95OsVkqIOoi1k7KbwSo600cIdsKSJWrPg/+vX+QMPcMw1oI7ItA==" + "version": "3.17.6-next.4", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.6-next.4.tgz", + "integrity": "sha512-SeJTpH/S14EbxOAVaOUoGVqPToqpRTld5QO5Ghig3AlbFJTFF9Wu7srHMfa85L0SX1RYAuuCSFKJVVCxDIk1/Q==" }, "vscode-tas-client": { "version": "0.1.84", @@ -24230,11 +24047,6 @@ "tas-client": "0.2.33" } }, - "vscode-uri": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.6.tgz", - "integrity": "sha512-fmL7V1eiDBFRRnu+gfRWTzyPpNIHJTc4mWnFkwBUmO9U3KPgJAmTx7oxi2bl/Rh6HLdU7+4C9wlj0k2E4AdKFQ==" - }, "watchpack": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", diff --git a/package.json b/package.json index fcb7dbbbb805..b936cf59fe45 100644 --- a/package.json +++ b/package.json @@ -1506,7 +1506,6 @@ "dependencies": { "@iarna/toml": "^2.2.5", "@vscode/extension-telemetry": "^0.8.4", - "@vscode/jupyter-lsp-middleware": "^0.2.50", "arch": "^2.1.0", "fs-extra": "^10.0.1", "glob": "^7.2.0", @@ -1529,9 +1528,9 @@ "unicode": "^14.0.0", "untildify": "^4.0.0", "vscode-debugprotocol": "^1.28.0", - "vscode-jsonrpc": "^9.0.0-next.2", - "vscode-languageclient": "^10.0.0-next.2", - "vscode-languageserver-protocol": "^3.17.6-next.3", + "vscode-jsonrpc": "^9.0.0-next.4", + "vscode-languageclient": "^10.0.0-next.8", + "vscode-languageserver-protocol": "^3.17.6-next.6", "vscode-tas-client": "^0.1.84", "which": "^2.0.2", "winreg": "^1.2.4", diff --git a/src/client/activation/hidingMiddleware.ts b/src/client/activation/hidingMiddleware.ts new file mode 100644 index 000000000000..91258b7d844c --- /dev/null +++ b/src/client/activation/hidingMiddleware.ts @@ -0,0 +1,500 @@ +/* eslint-disable consistent-return */ +/* eslint-disable class-methods-use-this */ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { + CallHierarchyIncomingCall, + CallHierarchyItem, + CallHierarchyOutgoingCall, + CancellationToken, + CodeAction, + CodeActionContext, + CodeLens, + Color, + ColorInformation, + ColorPresentation, + Command, + CompletionContext, + CompletionItem, + Declaration as VDeclaration, + Definition, + DefinitionLink, + Diagnostic, + Disposable, + DocumentHighlight, + DocumentLink, + DocumentSymbol, + FoldingContext, + FoldingRange, + FormattingOptions, + LinkedEditingRanges, + Location, + Position, + Position as VPosition, + ProviderResult, + Range, + SelectionRange, + SemanticTokens, + SemanticTokensEdits, + SignatureHelp, + SignatureHelpContext, + SymbolInformation, + TextDocument, + TextDocumentChangeEvent, + TextEdit, + Uri, + WorkspaceEdit, +} from 'vscode'; +import { HandleDiagnosticsSignature, Middleware } from 'vscode-languageclient/node'; + +import { ProvideDeclarationSignature } from 'vscode-languageclient/lib/common/declaration'; +import { + PrepareCallHierarchySignature, + CallHierarchyIncomingCallsSignature, + CallHierarchyOutgoingCallsSignature, +} from 'vscode-languageclient/lib/common/callHierarchy'; +import { + ProvideDocumentColorsSignature, + ProvideColorPresentationSignature, +} from 'vscode-languageclient/lib/common/colorProvider'; +import { ProvideFoldingRangeSignature } from 'vscode-languageclient/lib/common/foldingRange'; +import { ProvideImplementationSignature } from 'vscode-languageclient/lib/common/implementation'; +import { ProvideLinkedEditingRangeSignature } from 'vscode-languageclient/lib/common/linkedEditingRange'; +import { ProvideSelectionRangeSignature } from 'vscode-languageclient/lib/common/selectionRange'; +import { + DocumentSemanticsTokensSignature, + DocumentSemanticsTokensEditsSignature, + DocumentRangeSemanticTokensSignature, +} from 'vscode-languageclient/lib/common/semanticTokens'; +import { ProvideTypeDefinitionSignature } from 'vscode-languageclient/lib/common/typeDefinition'; +import { ProvideHoverSignature } from 'vscode-languageclient/lib/common/hover'; +import { + ProvideCompletionItemsSignature, + ResolveCompletionItemSignature, +} from 'vscode-languageclient/lib/common/completion'; +import { ProvideDefinitionSignature } from 'vscode-languageclient/lib/common/definition'; +import { ProvideDocumentHighlightsSignature } from 'vscode-languageclient/lib/common/documentHighlight'; +import { ProvideReferencesSignature } from 'vscode-languageclient/lib/common/reference'; +import { ProvideDocumentSymbolsSignature } from 'vscode-languageclient/lib/common/documentSymbol'; +import { ProvideCodeActionsSignature } from 'vscode-languageclient/lib/common/codeAction'; +import { ProvideCodeLensesSignature } from 'vscode-languageclient/lib/common/codeLens'; +import { ProvideDocumentLinksSignature } from 'vscode-languageclient/lib/common/documentLink'; +import { + ProvideDocumentFormattingEditsSignature, + ProvideDocumentRangeFormattingEditsSignature, + ProvideOnTypeFormattingEditsSignature, +} from 'vscode-languageclient/lib/common/formatting'; +import { ProvideRenameEditsSignature, PrepareRenameSignature } from 'vscode-languageclient/lib/common/rename'; +import { ProvideSignatureHelpSignature } from 'vscode-languageclient/lib/common/signatureHelp'; +import { isNotebookCell } from '../common/utils/misc'; + +/** + * This class is used to hide all intellisense requests for notebook cells. + */ +class HidingMiddlewareAddon implements Middleware, Disposable { + constructor() { + // Make sure a bunch of functions are bound to this. VS code can call them without a this context + this.handleDiagnostics = this.handleDiagnostics.bind(this); + this.didOpen = this.didOpen.bind(this); + this.didSave = this.didSave.bind(this); + this.didChange = this.didChange.bind(this); + this.didClose = this.didClose.bind(this); + } + + public dispose(): void { + // Nothing to dispose at the moment + } + + public async didChange(event: TextDocumentChangeEvent, next: (ev: TextDocumentChangeEvent) => void): Promise { + if (!isNotebookCell(event.document.uri)) { + return next(event); + } + } + + public async didOpen(document: TextDocument, next: (ev: TextDocument) => void): Promise { + if (!isNotebookCell(document.uri)) { + return next(document); + } + } + + public async didClose(document: TextDocument, next: (ev: TextDocument) => void): Promise { + if (!isNotebookCell(document.uri)) { + return next(document); + } + } + + // eslint-disable-next-line class-methods-use-this + public async didSave(event: TextDocument, next: (ev: TextDocument) => void): Promise { + if (!isNotebookCell(event.uri)) { + return next(event); + } + } + + // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types + public provideCompletionItem( + document: TextDocument, + position: Position, + context: CompletionContext, + token: CancellationToken, + next: ProvideCompletionItemsSignature, + ) { + if (!isNotebookCell(document.uri)) { + return next(document, position, context, token); + } + } + + // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types + public provideHover( + document: TextDocument, + position: Position, + token: CancellationToken, + next: ProvideHoverSignature, + ) { + if (!isNotebookCell(document.uri)) { + return next(document, position, token); + } + } + + // eslint-disable-next-line class-methods-use-this + public resolveCompletionItem( + item: CompletionItem, + token: CancellationToken, + next: ResolveCompletionItemSignature, + ): ProviderResult { + // Range should have already been remapped. + + // TODO: What if the LS needs to read the range? It won't make sense. This might mean + // doing this at the extension level is not possible. + return next(item, token); + } + + public provideSignatureHelp( + document: TextDocument, + position: Position, + context: SignatureHelpContext, + token: CancellationToken, + next: ProvideSignatureHelpSignature, + ): ProviderResult { + if (!isNotebookCell(document.uri)) { + return next(document, position, context, token); + } + } + + public provideDefinition( + document: TextDocument, + position: Position, + token: CancellationToken, + next: ProvideDefinitionSignature, + ): ProviderResult { + if (!isNotebookCell(document.uri)) { + return next(document, position, token); + } + } + + public provideReferences( + document: TextDocument, + position: Position, + options: { + includeDeclaration: boolean; + }, + token: CancellationToken, + next: ProvideReferencesSignature, + ): ProviderResult { + if (!isNotebookCell(document.uri)) { + return next(document, position, options, token); + } + } + + public provideDocumentHighlights( + document: TextDocument, + position: Position, + token: CancellationToken, + next: ProvideDocumentHighlightsSignature, + ): ProviderResult { + if (!isNotebookCell(document.uri)) { + return next(document, position, token); + } + } + + public provideDocumentSymbols( + document: TextDocument, + token: CancellationToken, + next: ProvideDocumentSymbolsSignature, + ): ProviderResult { + if (!isNotebookCell(document.uri)) { + return next(document, token); + } + } + + // eslint-disable-next-line class-methods-use-this + public provideCodeActions( + document: TextDocument, + range: Range, + context: CodeActionContext, + token: CancellationToken, + next: ProvideCodeActionsSignature, + ): ProviderResult<(Command | CodeAction)[]> { + if (!isNotebookCell(document.uri)) { + return next(document, range, context, token); + } + } + + // eslint-disable-next-line class-methods-use-this + public provideCodeLenses( + document: TextDocument, + token: CancellationToken, + next: ProvideCodeLensesSignature, + ): ProviderResult { + if (!isNotebookCell(document.uri)) { + return next(document, token); + } + } + + // eslint-disable-next-line class-methods-use-this + public provideDocumentFormattingEdits( + document: TextDocument, + options: FormattingOptions, + token: CancellationToken, + next: ProvideDocumentFormattingEditsSignature, + ): ProviderResult { + if (!isNotebookCell(document.uri)) { + return next(document, options, token); + } + } + + // eslint-disable-next-line class-methods-use-this + public provideDocumentRangeFormattingEdits( + document: TextDocument, + range: Range, + options: FormattingOptions, + token: CancellationToken, + next: ProvideDocumentRangeFormattingEditsSignature, + ): ProviderResult { + if (!isNotebookCell(document.uri)) { + return next(document, range, options, token); + } + } + + // eslint-disable-next-line class-methods-use-this + public provideOnTypeFormattingEdits( + document: TextDocument, + position: Position, + ch: string, + options: FormattingOptions, + token: CancellationToken, + next: ProvideOnTypeFormattingEditsSignature, + ): ProviderResult { + if (!isNotebookCell(document.uri)) { + return next(document, position, ch, options, token); + } + } + + // eslint-disable-next-line class-methods-use-this + public provideRenameEdits( + document: TextDocument, + position: Position, + newName: string, + token: CancellationToken, + next: ProvideRenameEditsSignature, + ): ProviderResult { + if (!isNotebookCell(document.uri)) { + return next(document, position, newName, token); + } + } + + // eslint-disable-next-line class-methods-use-this + public prepareRename( + document: TextDocument, + position: Position, + token: CancellationToken, + next: PrepareRenameSignature, + ): ProviderResult< + | Range + | { + range: Range; + placeholder: string; + } + > { + if (!isNotebookCell(document.uri)) { + return next(document, position, token); + } + } + + // eslint-disable-next-line class-methods-use-this + public provideDocumentLinks( + document: TextDocument, + token: CancellationToken, + next: ProvideDocumentLinksSignature, + ): ProviderResult { + if (!isNotebookCell(document.uri)) { + return next(document, token); + } + } + + // eslint-disable-next-line class-methods-use-this + public provideDeclaration( + document: TextDocument, + position: VPosition, + token: CancellationToken, + next: ProvideDeclarationSignature, + ): ProviderResult { + if (!isNotebookCell(document.uri)) { + return next(document, position, token); + } + } + + public handleDiagnostics(uri: Uri, diagnostics: Diagnostic[], next: HandleDiagnosticsSignature): void { + if (isNotebookCell(uri)) { + // Swallow all diagnostics for cells + next(uri, []); + } else { + next(uri, diagnostics); + } + } + + public provideTypeDefinition( + document: TextDocument, + position: Position, + token: CancellationToken, + next: ProvideTypeDefinitionSignature, + ): ProviderResult { + if (!isNotebookCell(document.uri)) { + return next(document, position, token); + } + } + + public provideImplementation( + document: TextDocument, + position: VPosition, + token: CancellationToken, + next: ProvideImplementationSignature, + ): ProviderResult { + if (!isNotebookCell(document.uri)) { + return next(document, position, token); + } + } + + public provideDocumentColors( + document: TextDocument, + token: CancellationToken, + next: ProvideDocumentColorsSignature, + ): ProviderResult { + if (!isNotebookCell(document.uri)) { + return next(document, token); + } + } + + public provideColorPresentations( + color: Color, + context: { + document: TextDocument; + range: Range; + }, + token: CancellationToken, + next: ProvideColorPresentationSignature, + ): ProviderResult { + if (!isNotebookCell(context.document.uri)) { + return next(color, context, token); + } + } + + public provideFoldingRanges( + document: TextDocument, + context: FoldingContext, + token: CancellationToken, + next: ProvideFoldingRangeSignature, + ): ProviderResult { + if (!isNotebookCell(document.uri)) { + return next(document, context, token); + } + } + + public provideSelectionRanges( + document: TextDocument, + positions: readonly Position[], + token: CancellationToken, + next: ProvideSelectionRangeSignature, + ): ProviderResult { + if (!isNotebookCell(document.uri)) { + return next(document, positions, token); + } + } + + public prepareCallHierarchy( + document: TextDocument, + positions: Position, + token: CancellationToken, + next: PrepareCallHierarchySignature, + ): ProviderResult { + if (!isNotebookCell(document.uri)) { + return next(document, positions, token); + } + } + + public provideCallHierarchyIncomingCalls( + item: CallHierarchyItem, + token: CancellationToken, + next: CallHierarchyIncomingCallsSignature, + ): ProviderResult { + if (!isNotebookCell(item.uri)) { + return next(item, token); + } + } + + public provideCallHierarchyOutgoingCalls( + item: CallHierarchyItem, + token: CancellationToken, + next: CallHierarchyOutgoingCallsSignature, + ): ProviderResult { + if (!isNotebookCell(item.uri)) { + return next(item, token); + } + } + + public provideDocumentSemanticTokens( + document: TextDocument, + token: CancellationToken, + next: DocumentSemanticsTokensSignature, + ): ProviderResult { + if (!isNotebookCell(document.uri)) { + return next(document, token); + } + } + + public provideDocumentSemanticTokensEdits( + document: TextDocument, + previousResultId: string, + token: CancellationToken, + next: DocumentSemanticsTokensEditsSignature, + ): ProviderResult { + if (!isNotebookCell(document.uri)) { + return next(document, previousResultId, token); + } + } + + public provideDocumentRangeSemanticTokens( + document: TextDocument, + range: Range, + token: CancellationToken, + next: DocumentRangeSemanticTokensSignature, + ): ProviderResult { + if (!isNotebookCell(document.uri)) { + return next(document, range, token); + } + } + + public provideLinkedEditingRange( + document: TextDocument, + position: Position, + token: CancellationToken, + next: ProvideLinkedEditingRangeSignature, + ): ProviderResult { + if (!isNotebookCell(document.uri)) { + return next(document, position, token); + } + } +} + +export function createHidingMiddleware(): Middleware & Disposable { + return new HidingMiddlewareAddon(); +} diff --git a/src/client/activation/languageClientMiddleware.ts b/src/client/activation/languageClientMiddleware.ts index 110d7461c615..711725e3de62 100644 --- a/src/client/activation/languageClientMiddleware.ts +++ b/src/client/activation/languageClientMiddleware.ts @@ -5,12 +5,11 @@ import { IJupyterExtensionDependencyManager } from '../common/application/types' import { IDisposableRegistry, IExtensions } from '../common/types'; import { IServiceContainer } from '../ioc/types'; import { sendTelemetryEvent } from '../telemetry'; +import { createHidingMiddleware } from './hidingMiddleware'; import { LanguageClientMiddlewareBase } from './languageClientMiddlewareBase'; import { LanguageServerType } from './types'; -import { createHidingMiddleware } from '@vscode/jupyter-lsp-middleware'; - export class LanguageClientMiddleware extends LanguageClientMiddlewareBase { public constructor(serviceContainer: IServiceContainer, serverType: LanguageServerType, serverVersion?: string) { super(serviceContainer, serverType, sendTelemetryEvent, serverVersion); diff --git a/src/client/browser/extension.ts b/src/client/browser/extension.ts index 28e1912f67e4..35854d141cad 100644 --- a/src/client/browser/extension.ts +++ b/src/client/browser/extension.ts @@ -108,7 +108,7 @@ async function runPylance( middleware, }; - const client = new LanguageClient('python', 'Python Language Server', clientOptions, worker); + const client = new LanguageClient('python', 'Python Language Server', worker, clientOptions); languageClient = client; context.subscriptions.push(