Skip to content

Commit

Permalink
Upgrade: Bumping version of vscode-languageserver* and client to 9.0.1 (
Browse files Browse the repository at this point in the history
#5927)

Upgrade: Bumping version of vscode-languageserver* and client to 9.0.1
---
Close #5927
  • Loading branch information
vidorteg authored Sep 13, 2024
1 parent 2ef7cae commit 35f6349
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 60 deletions.
12 changes: 6 additions & 6 deletions packages/extension-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"timeout": "1m",
"workerThreads": false
},
"bundleSize": 135000,
"bundleSize": 150000,
"categories": [
"Linters"
],
Expand All @@ -32,7 +32,7 @@
"@types/node": "^20.1.1",
"@types/proxyquire": "^1.3.28",
"@types/sinon": "^10.0.11",
"@types/vscode": "^1.64.0",
"@types/vscode": "^1.86.1",
"@typescript-eslint/eslint-plugin": "^5.59.2",
"@typescript-eslint/parser": "^4.33.0",
"ava": "^4.3.3",
Expand All @@ -49,16 +49,16 @@
"ts-loader": "^9.4.2",
"typescript": "^4.5.5",
"vsce": "^2.15.0",
"vscode-languageclient": "^7.0.0",
"vscode-languageserver": "^7.0.0",
"vscode-languageserver-textdocument": "^1.0.8",
"vscode-languageclient": "^9.0.1",
"vscode-languageserver": "^9.0.1",
"vscode-languageserver-textdocument": "^1.0.12",
"webpack": "^5.76.0",
"webpack-cli": "^4.9.1"
},
"displayName": "webhint",
"engines": {
"node": ">=14.0.0",
"vscode": "^1.64.0"
"vscode": "^1.86.1"
},
"homepage": "https://webhint.io/",
"icon": "icon.png",
Expand Down
25 changes: 11 additions & 14 deletions packages/extension-vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const supportedDocuments = activationEvents.map((event: string) => {
// Keep a reference to the client to stop it when deactivating.
let client: LanguageClient;

export const activate = (context: ExtensionContext) => {
export const activate = async (context: ExtensionContext) => {
const args = [context.globalStorageUri.fsPath, 'webhint'];
const module = context.asAbsolutePath('dist/src/server.js');
const transport = TransportKind.ipc;
Expand Down Expand Up @@ -49,22 +49,19 @@ export const activate = (context: ExtensionContext) => {

// Create and start the client (also starts the server).
client = new LanguageClient('webhint', serverOptions, clientOptions);
// Listen for notification that the webhint install failed.
client.onNotification(notifications.installFailed, () => {
const message = 'Ensure `node` and `npm` are installed to enable webhint to analyze source files.';

client.onReady().then(() => {
// Listen for notification that the webhint install failed.
client.onNotification(notifications.installFailed, () => {
const message = 'Ensure `node` and `npm` are installed to enable webhint to analyze source files.';

window.showInformationMessage(message, 'OK');
});
// Listen for requests to show the output panel for this extension.
client.onNotification(notifications.showOutput, () => {
client.outputChannel.clear();
client.outputChannel.show(true);
});
window.showInformationMessage(message, 'OK');
});
// Listen for requests to show the output panel for this extension.
client.onNotification(notifications.showOutput, () => {
client.outputChannel.clear();
client.outputChannel.show(true);
});

client.start();
await client.start();
};

export const deactivate = (): Thenable<void> => {
Expand Down
8 changes: 4 additions & 4 deletions packages/extension-vscode/src/utils/analyze.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class Analyzer {

/* istanbul ignore if */
if (!hintModule) {
this.connection.sendNotification(notifications.installFailed);
await this.connection.sendNotification(notifications.installFailed);

return null;
}
Expand All @@ -64,8 +64,8 @@ export class Analyzer {
// Instantiating webhint failed, log the error to the webhint output panel to aid debugging.
console.error(e);

return await promptRetry(this.connection.window, /* istanbul ignore next */() => {
this.connection.sendNotification(notifications.showOutput);
return await promptRetry(this.connection.window, /* istanbul ignore next */async () => {
await this.connection.sendNotification(notifications.showOutput);

// We retry with the shared version as it is more likely to not be broken 🤞
return this.initWebhint();
Expand Down Expand Up @@ -121,7 +121,7 @@ export class Analyzer {
diagnostics.diagnostics.forEach((d) => {
d.source = this.sourceName;
});
this.connection.sendDiagnostics(diagnostics);
await this.connection.sendDiagnostics(diagnostics);

} finally {
this.validating = false;
Expand Down
8 changes: 6 additions & 2 deletions packages/extension-vscode/tests/utils/analyze.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@ import * as _packages from '../../src/utils/webhint-packages';

const stubConnection = () => {
return {
sendDiagnostics() {},
sendNotification() {},
sendDiagnostics() {
return Promise.resolve();
},
sendNotification() {
return Promise.resolve();
},
window: {
showErrorMessage() {
return Promise.resolve();
Expand Down
75 changes: 41 additions & 34 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1318,10 +1318,10 @@
"@types/configstore" "*"
boxen "^4.2.0"

"@types/vscode@^1.64.0":
version "1.64.0"
resolved "https://registry.yarnpkg.com/@types/vscode/-/vscode-1.64.0.tgz#bfd82c8d92dc7824c1be084be1ab46ce20d7fb55"
integrity sha512-bSlAWz5WtcSL3cO9tAT/KpEH9rv5OBnm93OIIFwdCshaAiqr2bp1AUyEwW9MWeCvZBHEXc3V0fTYVdVyzDNwHA==
"@types/vscode@^1.86.1":
version "1.93.0"
resolved "https://registry.yarnpkg.com/@types/vscode/-/vscode-1.93.0.tgz#1cd7573e0272aef9c357bafc635b6177c154013e"
integrity sha512-kUK6jAHSR5zY8ps42xuW89NLcBpw1kOabah7yv38J8MyiYuOHxLQBi0e7zeXbQgVefDy/mZZetqEFC+Fl5eIEQ==

"@types/webpack@^5.28.0":
version "5.28.0"
Expand Down Expand Up @@ -7757,6 +7757,13 @@ minimatch@^5.0.1:
dependencies:
brace-expansion "^2.0.1"

minimatch@^5.1.0:
version "5.1.6"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96"
integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==
dependencies:
brace-expansion "^2.0.1"

minimatch@^9.0.0:
version "9.0.0"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.0.tgz#bfc8e88a1c40ffd40c172ddac3decb8451503b56"
Expand Down Expand Up @@ -11388,44 +11395,44 @@ vsce@^2.15.0:
yauzl "^2.3.1"
yazl "^2.2.2"

vscode-jsonrpc@6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz#108bdb09b4400705176b957ceca9e0880e9b6d4e"
integrity sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg==
vscode-jsonrpc@8.2.0:
version "8.2.0"
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz#f43dfa35fb51e763d17cd94dcca0c9458f35abf9"
integrity sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==

vscode-languageclient@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-7.0.0.tgz#b505c22c21ffcf96e167799757fca07a6bad0fb2"
integrity sha512-P9AXdAPlsCgslpP9pRxYPqkNYV7Xq8300/aZDpO35j1fJm/ncize8iGswzYlcvFw5DQUx4eVk+KvfXdL0rehNg==
vscode-languageclient@^9.0.1:
version "9.0.1"
resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-9.0.1.tgz#cdfe20267726c8d4db839dc1e9d1816e1296e854"
integrity sha512-JZiimVdvimEuHh5olxhxkht09m3JzUGwggb5eRUkzzJhZ2KjCN0nh55VfiED9oez9DyF8/fz1g1iBV3h+0Z2EA==
dependencies:
minimatch "^3.0.4"
semver "^7.3.4"
vscode-languageserver-protocol "3.16.0"
minimatch "^5.1.0"
semver "^7.3.7"
vscode-languageserver-protocol "3.17.5"

vscode-languageserver-protocol@3.16.0:
version "3.16.0"
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.16.0.tgz#34135b61a9091db972188a07d337406a3cdbe821"
integrity sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A==
vscode-languageserver-protocol@3.17.5:
version "3.17.5"
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz#864a8b8f390835572f4e13bd9f8313d0e3ac4bea"
integrity sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==
dependencies:
vscode-jsonrpc "6.0.0"
vscode-languageserver-types "3.16.0"
vscode-jsonrpc "8.2.0"
vscode-languageserver-types "3.17.5"

vscode-languageserver-textdocument@^1.0.8:
version "1.0.8"
resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.8.tgz#9eae94509cbd945ea44bca8dcfe4bb0c15bb3ac0"
integrity sha512-1bonkGqQs5/fxGT5UchTgjGVnfysL0O8v1AYMBjqTbWQTFn721zaPGDYFkOKtfDgFiSgXM3KwaG3FMGfW4Ed9Q==
vscode-languageserver-textdocument@^1.0.12:
version "1.0.12"
resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz#457ee04271ab38998a093c68c2342f53f6e4a631"
integrity sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==

vscode-languageserver-types@3.16.0:
version "3.16.0"
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz#ecf393fc121ec6974b2da3efb3155644c514e247"
integrity sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA==
vscode-languageserver-types@3.17.5:
version "3.17.5"
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz#3273676f0cf2eab40b3f44d085acbb7f08a39d8a"
integrity sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==

vscode-languageserver@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-7.0.0.tgz#49b068c87cfcca93a356969d20f5d9bdd501c6b0"
integrity sha512-60HTx5ID+fLRcgdHfmz0LDZAXYEV68fzwG0JWwEPBode9NuMYTIxuYXPg4ngO8i8+Ou0lM7y6GzaYWbiDL0drw==
vscode-languageserver@^9.0.1:
version "9.0.1"
resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz#500aef82097eb94df90d008678b0b6b5f474015b"
integrity sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==
dependencies:
vscode-languageserver-protocol "3.16.0"
vscode-languageserver-protocol "3.17.5"

w3c-xmlserializer@^4.0.0:
version "4.0.0"
Expand Down

0 comments on commit 35f6349

Please sign in to comment.