(dir: string, cache: UpdateCheckCacheFile)
| 106 | } |
| 107 | |
| 108 | function writeUpdateCheckCache(dir: string, cache: UpdateCheckCacheFile): void { |
| 109 | try { |
| 110 | fs.mkdirSync(dir, { recursive: true }); |
| 111 | fs.writeFileSync(updateCheckCachePath(dir), JSON.stringify(cache)); |
| 112 | } catch { |
| 113 | /* fail silent — a read-only home dir must not break the server */ |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | /** |
| 118 | * Rebuild a canonical `vX.Y.Z[-pre]` tag from the PARSED semver fields, or |
no test coverage detected