Skip to content

fix: improve version command UX and consolidate update code#42

Open
fnebenfuehr wants to merge 2 commits intomainfrom
fix/version-command-ux
Open

fix: improve version command UX and consolidate update code#42
fnebenfuehr wants to merge 2 commits intomainfrom
fix/version-command-ux

Conversation

@fnebenfuehr
Copy link
Owner

Summary

  • Use Commander's .version() to prevent help text from displaying after --version
  • Change update suggestions from npm update -g to worktree update
  • Consolidate update checking code: rename utils/update-checker.tsutils/update.ts
  • Move PackageJson interface to shared lib/types.ts
  • Make getVersionInfo() update cache after fresh fetch

Test plan

  • Run worktree -v and verify no help text appears
  • Verify update suggestion shows worktree update
  • Run worktree update to test update command still works
  • Verify cache is updated after running --version

🤖 Generated with Claude Code

fnebenfuehr and others added 2 commits November 24, 2025 15:21
- Use Commander's native .version() to prevent help text display
- Suggest `worktree update` instead of `npm update -g`
- Move PackageJson interface to shared lib/types.ts
- Rename utils/update-checker.ts to utils/update.ts
- Export writeCache and make getVersionInfo update cache

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Update test imports from @/utils/update-checker to @/utils/update
  after module rename in commit 388fc16
- Fix version command to properly show update notifications
- Replace invalid outputVersion config with pre-parse argv check
- Commander's OutputConfiguration doesn't support outputVersion

Tests: 308 pass, 0 fail

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
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