(current: string, latest: string | null)
| 128 | } |
| 129 | |
| 130 | function makeResult(current: string, latest: string | null): UpdateInfo { |
| 131 | if (latest === null) { |
| 132 | return { current, latest: null, updateAvailable: false, unknown: true }; |
| 133 | } |
| 134 | return { |
| 135 | current, |
| 136 | latest, |
| 137 | updateAvailable: compareVersions(current, latest) < 0, |
| 138 | unknown: false, |
| 139 | }; |
| 140 | } |
| 141 | |
| 142 | /** Invalidate the cached "latest" so the next launch re-checks. */ |
| 143 | export function clearUpdateCache(): void { |
no test coverage detected