(cache)
| 739 | } |
| 740 | |
| 741 | function writeUpdateCache(cache) { |
| 742 | try { |
| 743 | fs.mkdirSync(path.dirname(UPDATE_CACHE_PATH), { recursive: true }); |
| 744 | fs.writeFileSync(UPDATE_CACHE_PATH, JSON.stringify(cache)); |
| 745 | } catch { |
| 746 | // Best-effort: a read-only home dir just means we re-poll next session. |
| 747 | } |
| 748 | } |
| 749 | |
| 750 | /** Compare dotted numeric versions. Returns >0 when a is newer than b. */ |
| 751 | function compareSemver(a, b) { |
no outgoing calls
no test coverage detected