Skip to content

feat: support all installation methods in upgrade command#97

Merged
rhuanbarreto merged 2 commits into
mainfrom
claude/funny-mendeleev
Mar 20, 2026
Merged

feat: support all installation methods in upgrade command#97
rhuanbarreto merged 2 commits into
mainfrom
claude/funny-mendeleev

Conversation

@rhuanbarreto

Copy link
Copy Markdown
Contributor

Summary

  • Detects standalone binary installs (~/.archgate/bin/ or ARCHGATE_INSTALL_DIR) and upgrades them by downloading the correct platform binary from GitHub Releases
  • Switches all version checking (both upgrade command and background update-check) from npm registry to GitHub Releases API, so every installation method gets accurate version info
  • Adds a 3s timeout to WSL command resolution on Windows, fixing a flaky resolveCommand test that timed out when WSL was slow
  • Extracts shared version-fetching logic into src/helpers/upgrade.ts to DRY up update-check.ts and upgrade.ts

Test plan

  • Verify archgate upgrade works for standalone binary installs on macOS/Linux/Windows
  • Verify archgate upgrade still works for npm/bun/pnpm/yarn global installs
  • Verify background update check notification still appears when a new version is available
  • Verify resolveCommand test no longer times out on Windows

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Mar 20, 2026

Copy link
Copy Markdown

Deploying archgate-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: b48d53b
Status: ✅  Deploy successful!
Preview URL: https://c2164d21.archgate-cli.pages.dev
Branch Preview URL: https://claude-funny-mendeleev.archgate-cli.pages.dev

View logs

@rhuanbarreto rhuanbarreto force-pushed the claude/funny-mendeleev branch 3 times, most recently from 4299f0e to 4943bd5 Compare March 20, 2026 20:52
… upgrade support

- Switch upgrade command and background update-check from npm registry
  to GitHub Releases API so all install methods get accurate version info
- Add proto toolchain detection: when archgate is installed via proto,
  `archgate upgrade` runs `proto install archgate latest --pin`
- Add local dev dependency detection: when running from node_modules,
  detect the project's package manager via lockfile and run the
  appropriate update command (e.g. `bun add -d archgate@latest`)
- DRY up the upgrade flows by extracting shared version check into the
  command action and reusing runExternalUpgrade for all external paths
- Reuse fetchLatestGitHubVersion from binary-upgrade helper in
  update-check to eliminate duplicated fetch logic
@rhuanbarreto rhuanbarreto force-pushed the claude/funny-mendeleev branch from 4943bd5 to ad9c70f Compare March 20, 2026 20:56
Add CI smoke tests (Windows + Linux) for binary, proto, and node_modules
install paths. Add unit tests for install method detection helpers.
@rhuanbarreto rhuanbarreto merged commit 8312986 into main Mar 20, 2026
8 checks passed
@rhuanbarreto rhuanbarreto deleted the claude/funny-mendeleev branch March 20, 2026 21:26
@github-actions github-actions Bot mentioned this pull request Mar 20, 2026
rhuanbarreto added a commit that referenced this pull request Mar 20, 2026
* feat: use GitHub Releases for all version checks, add proto and local upgrade support

- Switch upgrade command and background update-check from npm registry
  to GitHub Releases API so all install methods get accurate version info
- Add proto toolchain detection: when archgate is installed via proto,
  `archgate upgrade` runs `proto install archgate latest --pin`
- Add local dev dependency detection: when running from node_modules,
  detect the project's package manager via lockfile and run the
  appropriate update command (e.g. `bun add -d archgate@latest`)
- DRY up the upgrade flows by extracting shared version check into the
  command action and reusing runExternalUpgrade for all external paths
- Reuse fetchLatestGitHubVersion from binary-upgrade helper in
  update-check to eliminate duplicated fetch logic

* test: add smoke tests for all upgrade install method detection paths

Add CI smoke tests (Windows + Linux) for binary, proto, and node_modules
install paths. Add unit tests for install method detection helpers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant