From 0f826aec8280cf1593e1b1e265cced6f7e5d84d7 Mon Sep 17 00:00:00 2001 From: Veetaha Date: Mon, 9 Mar 2020 19:55:26 +0200 Subject: vscode: get release date from release info --- .../src/installation/fetch_artifact_release_info.ts | 3 +++ editors/code/src/installation/interfaces.ts | 18 ++++-------------- 2 files changed, 7 insertions(+), 14 deletions(-) (limited to 'editors') diff --git a/editors/code/src/installation/fetch_artifact_release_info.ts b/editors/code/src/installation/fetch_artifact_release_info.ts index b1b5a3485..1ad3b8338 100644 --- a/editors/code/src/installation/fetch_artifact_release_info.ts +++ b/editors/code/src/installation/fetch_artifact_release_info.ts @@ -59,12 +59,15 @@ export async function fetchArtifactReleaseInfo( return { releaseName: release.name, + releaseDate: new Date(release.published_at), downloadUrl: artifact.browser_download_url }; // We omit declaration of tremendous amount of fields that we are not using here interface GithubRelease { name: string; + // eslint-disable-next-line camelcase + published_at: string; assets: Array<{ name: string; // eslint-disable-next-line camelcase diff --git a/editors/code/src/installation/interfaces.ts b/editors/code/src/installation/interfaces.ts index 50b635921..1a8ea0884 100644 --- a/editors/code/src/installation/interfaces.ts +++ b/editors/code/src/installation/interfaces.ts @@ -1,5 +1,3 @@ -import * as vscode from "vscode"; - export interface GithubRepo { name: string; owner: string; @@ -9,6 +7,7 @@ export interface GithubRepo { * Metadata about particular artifact retrieved from GitHub releases. */ export interface ArtifactReleaseInfo { + releaseDate: Date; releaseName: string; downloadUrl: string; } @@ -42,6 +41,9 @@ export namespace ArtifactSource { */ repo: GithubRepo; + + // FIXME: add installationPath: string; + /** * Directory on the filesystem where the bundled binary is stored. */ @@ -57,17 +59,5 @@ export namespace ArtifactSource { * Tag of github release that denotes a version required by this extension. */ tag: string; - - /** - * Object that provides `get()/update()` operations to store metadata - * about the actual binary, e.g. its actual version. - */ - storage: vscode.Memento; - - /** - * Ask for the user permission before downloading the artifact. - */ - askBeforeDownload: boolean; } - } -- cgit v1.2.3