aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/config.ts
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src/config.ts')
-rw-r--r--editors/code/src/config.ts20
1 files changed, 7 insertions, 13 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index 28698ab8e..54b905303 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -38,23 +38,17 @@ export class Config {
38 ] 38 ]
39 .map(opt => `${this.rootSection}.${opt}`); 39 .map(opt => `${this.rootSection}.${opt}`);
40 40
41 readonly packageJsonVersion = vscode 41 readonly packageJsonVersion: string = vscode
42 .extensions 42 .extensions
43 .getExtension(this.extensionId)! 43 .getExtension(this.extensionId)!
44 .packageJSON 44 .packageJSON
45 .version as string; // n.n.YYYYMMDD[-nightly] 45 .version;
46 46
47 /** 47 readonly releaseTag: string = vscode
48 * Either `nightly` or `YYYY-MM-DD` (i.e. `stable` release) 48 .extensions
49 */ 49 .getExtension(this.extensionId)!
50 readonly extensionReleaseTag: string = (() => { 50 .packageJSON
51 if (this.packageJsonVersion.endsWith(NIGHTLY_TAG)) return NIGHTLY_TAG; 51 .releaseTag;
52
53 const realVersionRegexp = /^\d+\.\d+\.(\d{4})(\d{2})(\d{2})/;
54 const [, yyyy, mm, dd] = this.packageJsonVersion.match(realVersionRegexp)!;
55
56 return `${yyyy}-${mm}-${dd}`;
57 })();
58 52
59 private cfg!: vscode.WorkspaceConfiguration; 53 private cfg!: vscode.WorkspaceConfiguration;
60 54