diff --git a/editors/code/package-lock.json b/editors/code/package-lock.json index 1b7c8910e1..5c056463e0 100644 --- a/editors/code/package-lock.json +++ b/editors/code/package-lock.json @@ -753,19 +753,6 @@ "os-tmpdir": "~1.0.1" } }, - "ts-not-nil": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ts-not-nil/-/ts-not-nil-1.0.1.tgz", - "integrity": "sha512-19+u+3okJddVZlrIdTOdFBaMsHYDInIGDPiujxfRa0RS2Ch5055zVG4GAqa+CZ/Rd1a+7ORSm8O4+2kesPymtw==", - "requires": { - "ts-typedefs": ">=3.2.0" - } - }, - "ts-typedefs": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ts-typedefs/-/ts-typedefs-3.2.0.tgz", - "integrity": "sha512-NglEH2YiY40YxNAvwBISqqXRTKlQq6x+qoCF+tkjPxwrPbrkmq7V3LXavmxrD63fENtMhFkcqgMJtOirtow9iA==" - }, "tslib": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", diff --git a/editors/code/package.json b/editors/code/package.json index c0a62619de..f687eb8d45 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -27,7 +27,6 @@ "jsonc-parser": "^2.1.0", "node-fetch": "^2.6.0", "throttle-debounce": "^2.1.0", - "ts-not-nil": "^1.0.1", "vscode-languageclient": "^6.1.0" }, "devDependencies": { diff --git a/editors/code/src/installation/language_server.ts b/editors/code/src/installation/language_server.ts index e571cbc98b..a169eae47b 100644 --- a/editors/code/src/installation/language_server.ts +++ b/editors/code/src/installation/language_server.ts @@ -1,4 +1,3 @@ -import { unwrapNotNil } from "ts-not-nil"; import { spawnSync } from "child_process"; import * as vscode from "vscode"; import * as path from "path"; @@ -12,12 +11,9 @@ import { downloadFile } from "./download_file"; export async function downloadLatestLanguageServer( {file: artifactFileName, dir: installationDir, repo}: BinarySource.GithubRelease ) { - const binaryMetadata = await fetchLatestArtifactMetadata(repo, artifactFileName); - - const { - releaseName, - downloadUrl - } = unwrapNotNil(binaryMetadata, `Latest GitHub release lacks "${artifactFileName}" file`); + const { releaseName, downloadUrl } = (await fetchLatestArtifactMetadata( + repo, artifactFileName + ))!; await fs.mkdir(installationDir).catch(err => assert.strictEqual( err?.code,