()
| 141 | |
| 142 | /** Invalidate the cached "latest" so the next launch re-checks. */ |
| 143 | export function clearUpdateCache(): void { |
| 144 | try { |
| 145 | fs.unlinkSync(getCachePath()); |
| 146 | } catch { |
| 147 | // ignore |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | /** Run `npm install -g <pkg>@latest` and return the exit code (0 = success). */ |
| 152 | export function runNpmUpdate(pkg: string): Promise<number> { |
no test coverage detected