Skip to content

Check for a newer git-task-web on start, add web upgrade - #8

Merged
imohsenb merged 2 commits into
mainfrom
feat/web-update-check
Aug 8, 2026
Merged

Check for a newer git-task-web on start, add web upgrade#8
imohsenb merged 2 commits into
mainfrom
feat/web-update-check

Conversation

@imohsenb

@imohsenb imohsenb commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Implements GTASK-2d979d10: git task web start now checks npm for a newer git-task-web once it confirms one is installed, and offers to upgrade before starting. --yes/non-interactive/--format json all skip the interactive prompt and start on the current version, surfacing a warning instead of blocking.
  • New git task web upgrade subcommand: installs the latest version, stopping and restarting the server around it if one's running so the new version actually takes effect. Also works as a plain install if nothing's installed yet.
  • Version check reuses the existing npm shell-out (install::install already does this) rather than adding an HTTP client dependency — npm view git-task-web version for latest, the installed package's own package.json for current. Any lookup failure (offline, npm down) is treated as "nothing to report," never blocks start/upgrade.
  • Cargo.toml bumped to 1.0.6 per this repo's version-bump CI rule.

Test plan

  • cargo build
  • cargo test (100 lib tests + all integration tests pass, including new web::update unit tests)
  • Manually verified against the real npm registry: git task web upgrade on a genuinely outdated local install (0.1.1 -> 0.1.3) stopped the running server, upgraded, and restarted it
  • Manually verified --format json prints exactly one envelope for both start and upgrade (including the restart-after-upgrade path)
  • Manually verified the outdated-version warning surfaces in both text mode and JSON mode's warnings[], without blocking start

start now compares the installed git-task-web against npm's latest
(via the same npm binary install already shells out to, no new HTTP
client dependency) once it's confirmed installed, and offers to
upgrade — --yes/non-interactive/--format json all skip the prompt
and just start on the current version, surfacing a warning instead.

New `git task web upgrade` subcommand: installs the latest version,
stopping and restarting the server around it if one is running so
the new version actually takes effect. Works from a clean slate too
(nothing installed yet -> plain install).

GTASK-2d979d10
@imohsenb
imohsenb merged commit c4cd047 into main Aug 8, 2026
5 checks passed
@imohsenb
imohsenb deleted the feat/web-update-check branch August 8, 2026 12:10
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