Skip to content

Commit 35f6349

Browse files
authored
Upgrade: Bumping version of vscode-languageserver* and client to 9.0.1 (#5927)
Upgrade: Bumping version of vscode-languageserver* and client to 9.0.1 --- Close #5927
1 parent 2ef7cae commit 35f6349

File tree

5 files changed

+68
-60
lines changed

5 files changed

+68
-60
lines changed

packages/extension-vscode/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"timeout": "1m",
2222
"workerThreads": false
2323
},
24-
"bundleSize": 135000,
24+
"bundleSize": 150000,
2525
"categories": [
2626
"Linters"
2727
],
@@ -32,7 +32,7 @@
3232
"@types/node": "^20.1.1",
3333
"@types/proxyquire": "^1.3.28",
3434
"@types/sinon": "^10.0.11",
35-
"@types/vscode": "^1.64.0",
35+
"@types/vscode": "^1.86.1",
3636
"@typescript-eslint/eslint-plugin": "^5.59.2",
3737
"@typescript-eslint/parser": "^4.33.0",
3838
"ava": "^4.3.3",
@@ -49,16 +49,16 @@
4949
"ts-loader": "^9.4.2",
5050
"typescript": "^4.5.5",
5151
"vsce": "^2.15.0",
52-
"vscode-languageclient": "^7.0.0",
53-
"vscode-languageserver": "^7.0.0",
54-
"vscode-languageserver-textdocument": "^1.0.8",
52+
"vscode-languageclient": "^9.0.1",
53+
"vscode-languageserver": "^9.0.1",
54+
"vscode-languageserver-textdocument": "^1.0.12",
5555
"webpack": "^5.76.0",
5656
"webpack-cli": "^4.9.1"
5757
},
5858
"displayName": "webhint",
5959
"engines": {
6060
"node": ">=14.0.0",
61-
"vscode": "^1.64.0"
61+
"vscode": "^1.86.1"
6262
},
6363
"homepage": "https://webhint.io/",
6464
"icon": "icon.png",

packages/extension-vscode/src/extension.ts

+11-14
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const supportedDocuments = activationEvents.map((event: string) => {
2020
// Keep a reference to the client to stop it when deactivating.
2121
let client: LanguageClient;
2222

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

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

53-
client.onReady().then(() => {
54-
// Listen for notification that the webhint install failed.
55-
client.onNotification(notifications.installFailed, () => {
56-
const message = 'Ensure `node` and `npm` are installed to enable webhint to analyze source files.';
57-
58-
window.showInformationMessage(message, 'OK');
59-
});
60-
// Listen for requests to show the output panel for this extension.
61-
client.onNotification(notifications.showOutput, () => {
62-
client.outputChannel.clear();
63-
client.outputChannel.show(true);
64-
});
56+
window.showInformationMessage(message, 'OK');
57+
});
58+
// Listen for requests to show the output panel for this extension.
59+
client.onNotification(notifications.showOutput, () => {
60+
client.outputChannel.clear();
61+
client.outputChannel.show(true);
6562
});
6663

67-
client.start();
64+
await client.start();
6865
};
6966

7067
export const deactivate = (): Thenable<void> => {

packages/extension-vscode/src/utils/analyze.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export class Analyzer {
5151

5252
/* istanbul ignore if */
5353
if (!hintModule) {
54-
this.connection.sendNotification(notifications.installFailed);
54+
await this.connection.sendNotification(notifications.installFailed);
5555

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

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

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

126126
} finally {
127127
this.validating = false;

packages/extension-vscode/tests/utils/analyze.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@ import * as _packages from '../../src/utils/webhint-packages';
99

1010
const stubConnection = () => {
1111
return {
12-
sendDiagnostics() {},
13-
sendNotification() {},
12+
sendDiagnostics() {
13+
return Promise.resolve();
14+
},
15+
sendNotification() {
16+
return Promise.resolve();
17+
},
1418
window: {
1519
showErrorMessage() {
1620
return Promise.resolve();

yarn.lock

+41-34
Original file line numberDiff line numberDiff line change
@@ -1318,10 +1318,10 @@
13181318
"@types/configstore" "*"
13191319
boxen "^4.2.0"
13201320

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

13261326
"@types/webpack@^5.28.0":
13271327
version "5.28.0"
@@ -7757,6 +7757,13 @@ minimatch@^5.0.1:
77577757
dependencies:
77587758
brace-expansion "^2.0.1"
77597759

7760+
minimatch@^5.1.0:
7761+
version "5.1.6"
7762+
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96"
7763+
integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==
7764+
dependencies:
7765+
brace-expansion "^2.0.1"
7766+
77607767
minimatch@^9.0.0:
77617768
version "9.0.0"
77627769
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.0.tgz#bfc8e88a1c40ffd40c172ddac3decb8451503b56"
@@ -11388,44 +11395,44 @@ vsce@^2.15.0:
1138811395
yauzl "^2.3.1"
1138911396
yazl "^2.2.2"
1139011397

11391-
vscode-jsonrpc@6.0.0:
11392-
version "6.0.0"
11393-
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz#108bdb09b4400705176b957ceca9e0880e9b6d4e"
11394-
integrity sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg==
11398+
vscode-jsonrpc@8.2.0:
11399+
version "8.2.0"
11400+
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz#f43dfa35fb51e763d17cd94dcca0c9458f35abf9"
11401+
integrity sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==
1139511402

11396-
vscode-languageclient@^7.0.0:
11397-
version "7.0.0"
11398-
resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-7.0.0.tgz#b505c22c21ffcf96e167799757fca07a6bad0fb2"
11399-
integrity sha512-P9AXdAPlsCgslpP9pRxYPqkNYV7Xq8300/aZDpO35j1fJm/ncize8iGswzYlcvFw5DQUx4eVk+KvfXdL0rehNg==
11403+
vscode-languageclient@^9.0.1:
11404+
version "9.0.1"
11405+
resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-9.0.1.tgz#cdfe20267726c8d4db839dc1e9d1816e1296e854"
11406+
integrity sha512-JZiimVdvimEuHh5olxhxkht09m3JzUGwggb5eRUkzzJhZ2KjCN0nh55VfiED9oez9DyF8/fz1g1iBV3h+0Z2EA==
1140011407
dependencies:
11401-
minimatch "^3.0.4"
11402-
semver "^7.3.4"
11403-
vscode-languageserver-protocol "3.16.0"
11408+
minimatch "^5.1.0"
11409+
semver "^7.3.7"
11410+
vscode-languageserver-protocol "3.17.5"
1140411411

11405-
vscode-languageserver-protocol@3.16.0:
11406-
version "3.16.0"
11407-
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.16.0.tgz#34135b61a9091db972188a07d337406a3cdbe821"
11408-
integrity sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A==
11412+
vscode-languageserver-protocol@3.17.5:
11413+
version "3.17.5"
11414+
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz#864a8b8f390835572f4e13bd9f8313d0e3ac4bea"
11415+
integrity sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==
1140911416
dependencies:
11410-
vscode-jsonrpc "6.0.0"
11411-
vscode-languageserver-types "3.16.0"
11417+
vscode-jsonrpc "8.2.0"
11418+
vscode-languageserver-types "3.17.5"
1141211419

11413-
vscode-languageserver-textdocument@^1.0.8:
11414-
version "1.0.8"
11415-
resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.8.tgz#9eae94509cbd945ea44bca8dcfe4bb0c15bb3ac0"
11416-
integrity sha512-1bonkGqQs5/fxGT5UchTgjGVnfysL0O8v1AYMBjqTbWQTFn721zaPGDYFkOKtfDgFiSgXM3KwaG3FMGfW4Ed9Q==
11420+
vscode-languageserver-textdocument@^1.0.12:
11421+
version "1.0.12"
11422+
resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz#457ee04271ab38998a093c68c2342f53f6e4a631"
11423+
integrity sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==
1141711424

11418-
vscode-languageserver-types@3.16.0:
11419-
version "3.16.0"
11420-
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz#ecf393fc121ec6974b2da3efb3155644c514e247"
11421-
integrity sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA==
11425+
vscode-languageserver-types@3.17.5:
11426+
version "3.17.5"
11427+
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz#3273676f0cf2eab40b3f44d085acbb7f08a39d8a"
11428+
integrity sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==
1142211429

11423-
vscode-languageserver@^7.0.0:
11424-
version "7.0.0"
11425-
resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-7.0.0.tgz#49b068c87cfcca93a356969d20f5d9bdd501c6b0"
11426-
integrity sha512-60HTx5ID+fLRcgdHfmz0LDZAXYEV68fzwG0JWwEPBode9NuMYTIxuYXPg4ngO8i8+Ou0lM7y6GzaYWbiDL0drw==
11430+
vscode-languageserver@^9.0.1:
11431+
version "9.0.1"
11432+
resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz#500aef82097eb94df90d008678b0b6b5f474015b"
11433+
integrity sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==
1142711434
dependencies:
11428-
vscode-languageserver-protocol "3.16.0"
11435+
vscode-languageserver-protocol "3.17.5"
1142911436

1143011437
w3c-xmlserializer@^4.0.0:
1143111438
version "4.0.0"

0 commit comments

Comments
 (0)