feat(cli): add lql version command for semver bumping and tagging #212
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat(cli): add lql version command for semver bumping and tagging
Summary
This PR adds a new
lql versionCLI command that allows users to bump package versions using semantic versioning and automatically creates corresponding tags. The command:LaunchQLPackage.addTag()to keep versions and tags in synctagcommandFiles Changed:
packages/cli/src/commands.ts- Added version command import and registrationpackages/cli/src/commands/version.ts- New command implementationpackages/cli/package.json- Added semver dependencyReview & Testing Checklist for Human
LaunchQLPackage.addTag()properly creates tags and they appear in the plan file as expectedRecommended Test Plan:
lql versionand select each bump type (patch, minor, major)Diagram
%%{ init : { "theme" : "default" }}%% graph TD Commands["packages/cli/src/commands.ts"]:::minor-edit VersionCmd["packages/cli/src/commands/version.ts"]:::major-edit TagCmd["packages/cli/src/commands/tag.ts"]:::context LaunchQLPkg["@launchql/core<br/>LaunchQLPackage"]:::context PackageJson["package.json<br/>(target module)"]:::context PlanFile["launchql.plan<br/>(target module)"]:::context Commands -->|imports and registers| VersionCmd VersionCmd -->|follows patterns from| TagCmd VersionCmd -->|uses addTag method| LaunchQLPkg VersionCmd -->|reads/writes version| PackageJson LaunchQLPkg -->|creates tags in| PlanFile subgraph Legend L1[Major Edit]:::major-edit L2[Minor Edit]:::minor-edit L3[Context/No Edit]:::context end classDef major-edit fill:#90EE90 classDef minor-edit fill:#87CEEB classDef context fill:#FFFFFFNotes
require('semver')instead of ES6 imports due to type definition issues. While the code follows established patterns from the tag command, thorough manual testing is essential before merging.The command implementation closely mirrors the existing
tagcommand structure for consistency, including package selection logic, error handling, and support for both workspace and module contexts.Session Info: