1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

[EC-584] Update ApiService to remove any appendages to ClientVersion (#4008)

* [EC-584] Update ApiService to remove any appendages to ClientVersion

* [EC-584] Extract application version number logic from ApiService to PlatformUtils

* Update libs/electron/src/services/electronPlatformUtils.service.ts

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

* [EC-584] Use getApplicationVersion as source for getApplicationVersionNumber

* [EC-584] Remove defaulting to dash on getApplicationVersionNumber and add unit tests

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
This commit is contained in:
Rui Tomé
2022-12-02 19:38:12 +00:00
committed by GitHub
parent 0a73290714
commit 9dc72428d0
7 changed files with 133 additions and 1 deletions

View File

@@ -88,6 +88,10 @@ export class CliPlatformUtilsService implements PlatformUtilsService {
return Promise.resolve(this.packageJson.version);
}
async getApplicationVersionNumber(): Promise<string> {
return (await this.getApplicationVersion()).split(RegExp("[+|-]"))[0].trim();
}
getApplicationVersionSync(): string {
return this.packageJson.version;
}