Commit d6bc364
feat(cli): Make upgrade command channel-aware
Each install channel now queries its own source of truth for the latest
version instead of always using GitHub Releases. This prevents misleading
results when release channels drift — e.g. GitHub may publish a version
before the Homebrew tap bumps, or npm dist-tags may lag a pre-release.
- Homebrew: `brew info --json=v2` (handles exit-0-with-empty-formulae)
- npm-global / npx: `npm view <pkg>@latest version --json`
- Unknown: falls back to GitHub Releases latest endpoint
Release notes are fetched separately by tag from GitHub and are non-fatal
if unavailable (404, timeout, network error).
New DI surface: fetchLatestVersionForChannel, fetchReleaseNotesForTag,
runChannelLookupCommand (for test isolation). The dependency factory
rebuilds derived defaults from merged overrides so tests can mock at
any level.
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 9a6a404 commit d6bc364
File tree
4 files changed
+495
-80
lines changed- docs
- src/cli/commands
- __tests__
4 files changed
+495
-80
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
57 | 61 | | |
58 | 62 | | |
59 | 63 | | |
| |||
73 | 77 | | |
74 | 78 | | |
75 | 79 | | |
76 | | - | |
| 80 | + | |
77 | 81 | | |
78 | | - | |
| 82 | + | |
79 | 83 | | |
80 | 84 | | |
81 | 85 | | |
| |||
0 commit comments