aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorVeetaha <[email protected]>2020-02-09 11:59:27 +0000
committerVeetaha <[email protected]>2020-02-09 11:59:27 +0000
commita63659badb75d22ad834b7524e77505790c10dd0 (patch)
tree4f742866f54618ead92a8bc6f018393ed550954c /editors
parent7a09274e52dc00f7d4e3a040686aa1eb1e075671 (diff)
vscode: replaced unwrapNotNil() with ! as per @matklad
Diffstat (limited to 'editors')
-rw-r--r--editors/code/package-lock.json13
-rw-r--r--editors/code/package.json1
-rw-r--r--editors/code/src/installation/language_server.ts10
3 files changed, 3 insertions, 21 deletions
diff --git a/editors/code/package-lock.json b/editors/code/package-lock.json
index 1b7c8910e..5c056463e 100644
--- a/editors/code/package-lock.json
+++ b/editors/code/package-lock.json
@@ -753,19 +753,6 @@
753 "os-tmpdir": "~1.0.1" 753 "os-tmpdir": "~1.0.1"
754 } 754 }
755 }, 755 },
756 "ts-not-nil": {
757 "version": "1.0.1",
758 "resolved": "https://registry.npmjs.org/ts-not-nil/-/ts-not-nil-1.0.1.tgz",
759 "integrity": "sha512-19+u+3okJddVZlrIdTOdFBaMsHYDInIGDPiujxfRa0RS2Ch5055zVG4GAqa+CZ/Rd1a+7ORSm8O4+2kesPymtw==",
760 "requires": {
761 "ts-typedefs": ">=3.2.0"
762 }
763 },
764 "ts-typedefs": {
765 "version": "3.2.0",
766 "resolved": "https://registry.npmjs.org/ts-typedefs/-/ts-typedefs-3.2.0.tgz",
767 "integrity": "sha512-NglEH2YiY40YxNAvwBISqqXRTKlQq6x+qoCF+tkjPxwrPbrkmq7V3LXavmxrD63fENtMhFkcqgMJtOirtow9iA=="
768 },
769 "tslib": { 756 "tslib": {
770 "version": "1.10.0", 757 "version": "1.10.0",
771 "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", 758 "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz",
diff --git a/editors/code/package.json b/editors/code/package.json
index c0a62619d..f687eb8d4 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -27,7 +27,6 @@
27 "jsonc-parser": "^2.1.0", 27 "jsonc-parser": "^2.1.0",
28 "node-fetch": "^2.6.0", 28 "node-fetch": "^2.6.0",
29 "throttle-debounce": "^2.1.0", 29 "throttle-debounce": "^2.1.0",
30 "ts-not-nil": "^1.0.1",
31 "vscode-languageclient": "^6.1.0" 30 "vscode-languageclient": "^6.1.0"
32 }, 31 },
33 "devDependencies": { 32 "devDependencies": {
diff --git a/editors/code/src/installation/language_server.ts b/editors/code/src/installation/language_server.ts
index e571cbc98..a169eae47 100644
--- a/editors/code/src/installation/language_server.ts
+++ b/editors/code/src/installation/language_server.ts
@@ -1,4 +1,3 @@
1import { unwrapNotNil } from "ts-not-nil";
2import { spawnSync } from "child_process"; 1import { spawnSync } from "child_process";
3import * as vscode from "vscode"; 2import * as vscode from "vscode";
4import * as path from "path"; 3import * as path from "path";
@@ -12,12 +11,9 @@ import { downloadFile } from "./download_file";
12export async function downloadLatestLanguageServer( 11export async function downloadLatestLanguageServer(
13 {file: artifactFileName, dir: installationDir, repo}: BinarySource.GithubRelease 12 {file: artifactFileName, dir: installationDir, repo}: BinarySource.GithubRelease
14) { 13) {
15 const binaryMetadata = await fetchLatestArtifactMetadata(repo, artifactFileName); 14 const { releaseName, downloadUrl } = (await fetchLatestArtifactMetadata(
16 15 repo, artifactFileName
17 const { 16 ))!;
18 releaseName,
19 downloadUrl
20 } = unwrapNotNil(binaryMetadata, `Latest GitHub release lacks "${artifactFileName}" file`);
21 17
22 await fs.mkdir(installationDir).catch(err => assert.strictEqual( 18 await fs.mkdir(installationDir).catch(err => assert.strictEqual(
23 err?.code, 19 err?.code,