Skip to content

Commit 0f826ae

Browse files
author
Veetaha
committed
vscode: get release date from release info
1 parent 98b2a94 commit 0f826ae

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

editors/code/src/installation/fetch_artifact_release_info.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,15 @@ export async function fetchArtifactReleaseInfo(
5959

6060
return {
6161
releaseName: release.name,
62+
releaseDate: new Date(release.published_at),
6263
downloadUrl: artifact.browser_download_url
6364
};
6465

6566
// We omit declaration of tremendous amount of fields that we are not using here
6667
interface GithubRelease {
6768
name: string;
69+
// eslint-disable-next-line camelcase
70+
published_at: string;
6871
assets: Array<{
6972
name: string;
7073
// eslint-disable-next-line camelcase

editors/code/src/installation/interfaces.ts

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import * as vscode from "vscode";
2-
31
export interface GithubRepo {
42
name: string;
53
owner: string;
@@ -9,6 +7,7 @@ export interface GithubRepo {
97
* Metadata about particular artifact retrieved from GitHub releases.
108
*/
119
export interface ArtifactReleaseInfo {
10+
releaseDate: Date;
1211
releaseName: string;
1312
downloadUrl: string;
1413
}
@@ -42,6 +41,9 @@ export namespace ArtifactSource {
4241
*/
4342
repo: GithubRepo;
4443

44+
45+
// FIXME: add installationPath: string;
46+
4547
/**
4648
* Directory on the filesystem where the bundled binary is stored.
4749
*/
@@ -57,17 +59,5 @@ export namespace ArtifactSource {
5759
* Tag of github release that denotes a version required by this extension.
5860
*/
5961
tag: string;
60-
61-
/**
62-
* Object that provides `get()/update()` operations to store metadata
63-
* about the actual binary, e.g. its actual version.
64-
*/
65-
storage: vscode.Memento;
66-
67-
/**
68-
* Ask for the user permission before downloading the artifact.
69-
*/
70-
askBeforeDownload: boolean;
7162
}
72-
7363
}

0 commit comments

Comments
 (0)