diff options
Diffstat (limited to 'editors/code/src/config.ts')
-rw-r--r-- | editors/code/src/config.ts | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index b5c07876b..345c9e21a 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts | |||
@@ -45,7 +45,7 @@ export class Config { | |||
45 | /** | 45 | /** |
46 | * Either `nightly` or `YYYY-MM-DD` (i.e. `stable` release) | 46 | * Either `nightly` or `YYYY-MM-DD` (i.e. `stable` release) |
47 | */ | 47 | */ |
48 | private readonly extensionVersion: string = (() => { | 48 | readonly extensionReleaseTag: string = (() => { |
49 | const packageJsonVersion = vscode | 49 | const packageJsonVersion = vscode |
50 | .extensions | 50 | .extensions |
51 | .getExtension(this.extensionId)! | 51 | .getExtension(this.extensionId)! |
@@ -135,10 +135,8 @@ export class Config { | |||
135 | } | 135 | } |
136 | } | 136 | } |
137 | 137 | ||
138 | get installedExtensionUpdateChannel() { | 138 | get installedExtensionUpdateChannel(): UpdatesChannel { |
139 | if (this.serverPath !== null) return null; | 139 | return this.extensionReleaseTag === NIGHTLY_TAG |
140 | |||
141 | return this.extensionVersion === NIGHTLY_TAG | ||
142 | ? UpdatesChannel.Nightly | 140 | ? UpdatesChannel.Nightly |
143 | : UpdatesChannel.Stable; | 141 | : UpdatesChannel.Stable; |
144 | } | 142 | } |
@@ -159,7 +157,7 @@ export class Config { | |||
159 | 157 | ||
160 | return this.createGithubReleaseSource( | 158 | return this.createGithubReleaseSource( |
161 | prebuiltBinaryName, | 159 | prebuiltBinaryName, |
162 | this.extensionVersion | 160 | this.extensionReleaseTag |
163 | ); | 161 | ); |
164 | } | 162 | } |
165 | 163 | ||
@@ -195,7 +193,7 @@ export class Config { | |||
195 | // We don't do runtime config validation here for simplicity. More on stackoverflow: | 193 | // We don't do runtime config validation here for simplicity. More on stackoverflow: |
196 | // https://stackoverflow.com/questions/60135780/what-is-the-best-way-to-type-check-the-configuration-for-vscode-extension | 194 | // https://stackoverflow.com/questions/60135780/what-is-the-best-way-to-type-check-the-configuration-for-vscode-extension |
197 | 195 | ||
198 | private get serverPath() { return this.cfg.get("serverPath") as null | string; } | 196 | get serverPath() { return this.cfg.get("serverPath") as null | string; } |
199 | get updatesChannel() { return this.cfg.get("updates.channel") as UpdatesChannel; } | 197 | get updatesChannel() { return this.cfg.get("updates.channel") as UpdatesChannel; } |
200 | get askBeforeDownload() { return this.cfg.get("updates.askBeforeDownload") as boolean; } | 198 | get askBeforeDownload() { return this.cfg.get("updates.askBeforeDownload") as boolean; } |
201 | get highlightingSemanticTokens() { return this.cfg.get("highlighting.semanticTokens") as boolean; } | 199 | get highlightingSemanticTokens() { return this.cfg.get("highlighting.semanticTokens") as boolean; } |