As a developer, I want to update qbit packages to their latest compatible versions so I can get bug fixes and new features.
Design
Command Interface
qctl qbit update [package]# Examples:
qctl qbit update # Update all packages
qctl qbit update @qrun/auth-sso # Update specific package
qctl qbit update --dry-run # Show what would be updated
Output Format
Checking for updates...
Package Current Latest Status
@qrun/auth-sso 2.0.1 2.1.0 update available
@qrun/reports 1.3.0 1.3.0 up to date
@qrun/data-import 0.9.0 1.0.0 major update (requires --major)
Updated 1 package:
@qrun/auth-sso: 2.0.1 -> 2.1.0
qbit update updates all packages to latest compatible
qbit update @qrun/auth-sso updates only that package
--dry-run shows updates without making changes
Major updates require --major flag
Lockfile is updated atomically
Clear output showing what was updated
Part of #11
## User Story
As a developer, I want to update qbit packages to their latest compatible versions so I can get bug fixes and new features.
## Design
### Command Interface
```bash
qctl qbit update [package]
# Examples:
qctl qbit update # Update all packages
qctl qbit update @qrun/auth-sso # Update specific package
qctl qbit update --dry-run # Show what would be updated
```
### Output Format
```
Checking for updates...
Package Current Latest Status
@qrun/auth-sso 2.0.1 2.1.0 update available
@qrun/reports 1.3.0 1.3.0 up to date
@qrun/data-import 0.9.0 1.0.0 major update (requires --major)
Updated 1 package:
@qrun/auth-sso: 2.0.1 -> 2.1.0
```
### Workflow
1. Read current lockfile
2. For each package (or specified package):
- Fetch latest versions from registry
- Find highest version matching original constraint
- Compare with current installed version
3. If `--dry-run`, print table and exit
4. Download and verify new packages
5. Update lockfile with new versions
6. Print summary
### Files to Create/Modify
| File | Action | Description |
|------|--------|-------------|
| `qctl-qbit/src/main/java/io/qrun/qctl/qbit/UpdateCommand.java` | Create | Picocli command for `qbit update` |
| `qctl-qbit/src/main/java/io/qrun/qctl/qbit/QbitCommand.java` | Modify | Register `UpdateCommand` |
### Flags
| Flag | Description |
|------|-------------|
| `--dry-run` | Show what would be updated without making changes |
| `--major` | Allow major version updates (breaking changes) |
## Implementation Tasks
- [ ] Create `UpdateCommand` with Picocli annotations
- [ ] Add optional `package` positional parameter
- [ ] Implement `--dry-run` flag
- [ ] Implement `--major` flag for major version updates
- [ ] Fetch latest versions for installed packages
- [ ] Compare versions and determine update eligibility
- [ ] Reuse download/verify logic from `AddCommand`
- [ ] Update lockfile atomically
- [ ] Print formatted table with update status
- [ ] Register `UpdateCommand` in `QbitCommand.subcommands`
- [ ] Add unit tests for version comparison
- [ ] Add integration test for update workflow
## Acceptance Criteria
- [ ] `qbit update` updates all packages to latest compatible
- [ ] `qbit update @qrun/auth-sso` updates only that package
- [ ] `--dry-run` shows updates without making changes
- [ ] Major updates require `--major` flag
- [ ] Lockfile is updated atomically
- [ ] Clear output showing what was updated
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part of #11
User Story
As a developer, I want to update qbit packages to their latest compatible versions so I can get bug fixes and new features.
Design
Command Interface
Output Format
Workflow
--dry-run, print table and exitFiles to Create/Modify
qctl-qbit/src/main/java/io/qrun/qctl/qbit/UpdateCommand.javaqbit updateqctl-qbit/src/main/java/io/qrun/qctl/qbit/QbitCommand.javaUpdateCommandFlags
--dry-run--majorImplementation Tasks
UpdateCommandwith Picocli annotationspackagepositional parameter--dry-runflag--majorflag for major version updatesAddCommandUpdateCommandinQbitCommand.subcommandsAcceptance Criteria
qbit updateupdates all packages to latest compatibleqbit update @qrun/auth-ssoupdates only that package--dry-runshows updates without making changes--majorflag