()
| 85 | } |
| 86 | |
| 87 | readUpdateCheck(): UpdateCheckCache | null { |
| 88 | try { |
| 89 | const data = this.read().updateCheck; |
| 90 | if ( |
| 91 | data && |
| 92 | typeof data.lastChecked === 'string' && |
| 93 | typeof data.latestVersion === 'string' && |
| 94 | (data.lastNotified === undefined || typeof data.lastNotified === 'string') |
| 95 | ) { |
| 96 | return data; |
| 97 | } |
| 98 | return null; |
| 99 | } catch { |
| 100 | return null; |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | /** Failures are swallowed — the update-check feature must never fail the CLI. */ |
| 105 | writeUpdateCheck(cache: UpdateCheckCache): void { |
no test coverage detected