* feat(self-update): add maybeOfferUpdate notifier (FR-024)
A shared, framework-agnostic update notifier so every npm-distributed IX CLI
can tell the user a newer version is published and offer to install it —
without re-implementing the throttled check or prompt.
maybeOfferUpdate():
- never throws into or blocks the host: skips in CI, on NO_UPDATE_NOTIFIER,
when non-interactive, or within a 24h per-package throttle cache
(<cacheRoot>/update-check.json), and swallows registry/cache failures;
- queries latest via the FR-023 registry helper (same ambient-config default
and scope-specific --registry override);
- offers only strictly-newer versions (numeric major.minor.patch; -dirty/
pre-release ignored) so a dev build ahead of the release isn't downgraded;
- prompts [Y/n] (Enter = yes) and delegates to runSelfUpdate on accept.
Exports the helper + result/option types; reuses the existing defaultConfirm
(now exported) for an identical prompt. Adds FR-024 + matrix coverage and 10
unit tests.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(self-update): accurate result when accepted install fails
Code-review finding: when the user accepted the offer but the install failed,
the generic outer catch returned {checked:false, reason:"error"}, dropping
latest/updateAvailable and mislabeling the check as not-run. Catch the install
failure locally and return {checked:true, updateAvailable:true, updated:false}.
Add a test for the accept→install-failure path.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Peter Krenesky <peter@Peters-MacBook-Pro.local>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>