From 7adb1df10ebc86ff76b4af4773461a1bbb0dd614 Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Sun, 25 Apr 2021 17:59:25 +0100 Subject: [PATCH] Update vscode-languageclient to v7.0.0 (#153) * Update vscode-languageclient to v7.0.0 * Fix build triggers According to actions/runner#491 we need to include an `always()` so that if statements evaluate to `true` even when one of the needed jobs is skipped. --- .github/workflows/release.yml | 8 ++-- code/changes/152.misc.rst | 1 + code/package-lock.json | 71 +++++++++++++++++++++-------------- code/package.json | 8 ++-- code/src/extension.ts | 2 +- code/src/language-server.ts | 4 +- 6 files changed, 55 insertions(+), 39 deletions(-) create mode 100644 code/changes/152.misc.rst diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5320158d..89758a2b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -69,7 +69,7 @@ jobs: vscode: name: VSCode Extension needs: [trigger, extensions] - if: ${{ needs.trigger.outputs.vscode }} + if: always() && needs.trigger.outputs.vscode runs-on: ubuntu-20.04 # TODO: Enable windows, macOS builds. steps: - uses: 'actions/checkout@v2' @@ -164,7 +164,7 @@ jobs: extensions: name: "Sphinx Extensions -- Python v${{ matrix.python-version }}" needs: [trigger, lsp] - if: ${{ needs.trigger.outputs.extensions }} + if: always() && needs.trigger.outputs.extensions runs-on: ${{ matrix.os }} strategy: matrix: @@ -264,7 +264,7 @@ jobs: lsp: name: "Language Server -- Python v${{ matrix.python-version }}" needs: trigger - if: ${{ needs.trigger.outputs.lsp }} + if: always() && needs.trigger.outputs.lsp runs-on: ${{ matrix.os }} strategy: matrix: @@ -364,7 +364,7 @@ jobs: docs: name: Documentation needs: [trigger, vscode] - if: ${{ needs.trigger.outputs.docs }} + if: always() && needs.trigger.outputs.docs runs-on: ubuntu-20.04 steps: - uses: 'actions/checkout@v2' diff --git a/code/changes/152.misc.rst b/code/changes/152.misc.rst new file mode 100644 index 00000000..bf108c65 --- /dev/null +++ b/code/changes/152.misc.rst @@ -0,0 +1 @@ +Update `vscode-languageclient` to v7.0.0 diff --git a/code/package-lock.json b/code/package-lock.json index 5d837f85..82e8e658 100644 --- a/code/package-lock.json +++ b/code/package-lock.json @@ -1,6 +1,6 @@ { "name": "esbonio", - "version": "0.3.1", + "version": "0.5.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -71,9 +71,9 @@ "dev": true }, "@types/vscode": { - "version": "1.43.0", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.43.0.tgz", - "integrity": "sha512-kIaR9qzd80rJOxePKpCB/mdy00mz8Apt2QA5Y6rdrKFn13QNFNeP3Hzmsf37Bwh/3cS7QjtAeGSK7wSqAU0sYQ==", + "version": "1.55.0", + "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.55.0.tgz", + "integrity": "sha512-49hysH7jneTQoSC8TWbAi7nKK9Lc5osQNjmDHVosrcU8o3jecD9GrK0Qyul8q4aGPSXRfNGqIp9CBdb13akETg==", "dev": true }, "@ungap/promise-all-settled": { @@ -378,8 +378,7 @@ "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "big.js": { "version": "5.2.2", @@ -403,7 +402,6 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -592,8 +590,7 @@ "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "core-util-is": { "version": "1.0.2", @@ -1332,6 +1329,14 @@ } } }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, "markdown-it": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz", @@ -1448,7 +1453,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -2241,39 +2245,43 @@ } }, "vscode-jsonrpc": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-5.0.1.tgz", - "integrity": "sha512-JvONPptw3GAQGXlVV2utDcHx0BiY34FupW/kI6mZ5x06ER5DdPG/tXWMVHjTNULF5uKPOUUD0SaXg5QaubJL0A==" + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz", + "integrity": "sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg==" }, "vscode-languageclient": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-6.1.3.tgz", - "integrity": "sha512-YciJxk08iU5LmWu7j5dUt9/1OLjokKET6rME3cI4BRpiF6HZlusm2ZwPt0MYJ0lV5y43sZsQHhyon2xBg4ZJVA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-7.0.0.tgz", + "integrity": "sha512-P9AXdAPlsCgslpP9pRxYPqkNYV7Xq8300/aZDpO35j1fJm/ncize8iGswzYlcvFw5DQUx4eVk+KvfXdL0rehNg==", "requires": { - "semver": "^6.3.0", - "vscode-languageserver-protocol": "^3.15.3" + "minimatch": "^3.0.4", + "semver": "^7.3.4", + "vscode-languageserver-protocol": "3.16.0" }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "requires": { + "lru-cache": "^6.0.0" + } } } }, "vscode-languageserver-protocol": { - "version": "3.15.3", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.15.3.tgz", - "integrity": "sha512-zrMuwHOAQRhjDSnflWdJG+O2ztMWss8GqUUB8dXLR/FPenwkiBNkMIJJYfSN6sgskvsF0rHAoBowNQfbyZnnvw==", + "version": "3.16.0", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.16.0.tgz", + "integrity": "sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A==", "requires": { - "vscode-jsonrpc": "^5.0.1", - "vscode-languageserver-types": "3.15.1" + "vscode-jsonrpc": "6.0.0", + "vscode-languageserver-types": "3.16.0" } }, "vscode-languageserver-types": { - "version": "3.15.1", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.15.1.tgz", - "integrity": "sha512-+a9MPUQrNGRrGU630OGbYVQ+11iOIovjCkqxajPa9w57Sd5ruK8WQNsslzpa0x/QJqC8kRc2DUxWjIFwoNm4ZQ==" + "version": "3.16.0", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz", + "integrity": "sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA==" }, "vscode-test": { "version": "1.4.1", @@ -2507,6 +2515,11 @@ "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", "dev": true }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, "yargs": { "version": "13.3.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", diff --git a/code/package.json b/code/package.json index fe1830d5..844131b7 100644 --- a/code/package.json +++ b/code/package.json @@ -23,14 +23,14 @@ "main": "dist/extension", "dependencies": { "semver": "^7.3.2", - "vscode-languageclient": "^6.1.3" + "vscode-languageclient": "^7.0.0" }, "devDependencies": { "@types/glob": "^7.1.3", "@types/mocha": "^8.2.0", "@types/node": "^14.14.7", "@types/semver": "^7.3.4", - "@types/vscode": "^1.43.0", + "@types/vscode": "^1.52.0", "mocha": "^8.2.1", "ts-loader": "^8.0.11", "typescript": "^4.0.5", @@ -41,7 +41,7 @@ "webpack-cli": "^4.2.0" }, "engines": { - "vscode": "^1.43.0" + "vscode": "^1.52.0" }, "activationEvents": [ "onLanguage:rst", @@ -198,4 +198,4 @@ } ] } -} \ No newline at end of file +} diff --git a/code/src/extension.ts b/code/src/extension.ts index 1d55e916..a3d94ee1 100644 --- a/code/src/extension.ts +++ b/code/src/extension.ts @@ -1,6 +1,6 @@ import * as semver from "semver"; import * as vscode from "vscode"; -import { LanguageClient, } from "vscode-languageclient"; +import { LanguageClient, } from "vscode-languageclient/node"; import { getPython, registerCommands, UPDATE_LANGUAGE_SERVER } from "./commands"; import { LanguageServerBootstrap } from "./language-server"; diff --git a/code/src/language-server.ts b/code/src/language-server.ts index 5f5eb96f..57649c5b 100644 --- a/code/src/language-server.ts +++ b/code/src/language-server.ts @@ -5,10 +5,12 @@ import * as vscode from "vscode"; import { request, RequestOptions } from "https" import { join } from "path"; import { promisify } from "util"; +import { LanguageClientOptions } from 'vscode-languageclient'; +import { Executable, LanguageClient, ServerOptions } from "vscode-languageclient/node"; import { INSTALL_LANGUAGE_SERVER, UPDATE_LANGUAGE_SERVER } from "./commands" import { getOutputLogger } from "./log" -import { Executable, LanguageClient, LanguageClientOptions, ServerOptions } from 'vscode-languageclient'; + const MIN_PYTHON = "3.6.0" const LAST_UPDATE = "server.lastUpdate"