-
Notifications
You must be signed in to change notification settings - Fork 993
fix(cli): write version-aware plugin entry during installation #681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
fix(cli): write version-aware plugin entry during installation #681
Conversation
|
All contributors have signed the CLA. Thank you! ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 3 files
Confidence score: 3/5
- Installer currently aborts if any oh-my-opencode plugin entries exist in
src/cli/config-manager.ts, so users can’t switch channels or versions and stale plugin definitions persist—this is a real regression risk for updates. - Pay close attention to
src/cli/config-manager.ts- ensure the installer updates existing plugin entries instead of exiting early.
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="src/cli/config-manager.ts">
<violation number="1" location="src/cli/config-manager.ts:240">
P1: Installer exits when any oh-my-opencode plugin exists, so it never updates the entry to the requested version/tag, blocking channel/version switches and leaving stale plugin entries.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Ask questions if you need clarification on any suggestion
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Previously, the installer always wrote 'oh-my-opencode' without a version, causing users who installed beta versions (e.g., bunx oh-my-opencode@beta) to unexpectedly load the stable version on next OpenCode startup. Now the installer queries npm dist-tags and writes: - @latest when current version matches the latest tag - @beta when current version matches the beta tag - @<version> when no tag matches (pins to specific version) This ensures: - bunx oh-my-opencode install → @latest (tracks stable) - bunx oh-my-opencode@beta install → @beta (tracks beta tag) - bunx [email protected] install → @3.0.0-beta.2 (pinned)
6d42cb3 to
1a5fdb3
Compare
|
recheck |
Summary
Problem
When users installed with
bunx [email protected] install, the installer wrote"oh-my-opencode"without version. On next OpenCode startup, npm resolved this tolatesttag (2.14.0), not the beta version the user intended.Solution
Query npm dist-tags and write appropriate version suffix:
bunx oh-my-opencode install@latestbunx oh-my-opencode@beta install@betabunx [email protected] install@3.0.0-beta.2Changes
fetchNpmDistTags()to query npm registry for all dist-tagsgetPluginNameWithVersion()to determine correct plugin entry formataddPluginToOpenCodeConfig()to use version-aware entriesTesting
Summary by cubic
Fixes the CLI installer to write a version-aware oh-my-opencode plugin entry based on npm dist-tags. This keeps beta/next installs on their intended channel instead of falling back to stable.
Written for commit 1a5fdb3. Summary will update on new commits.