feat: warn when installed plugin lags registry latest#33
Open
justin-carper wants to merge 1 commit into
Open
Conversation
opencode caches the @latest plugin install on first use and never re-resolves the dist tag, so users silently stay on stale releases. On plugin init, fetch the registry's latest version (throttled to once per 24h via ~/.cache/opencode-cursor/version-check.json) and print a one-time warning with the cache dir to delete and restart.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
opencode caches the @latest plugin install on first use and never re-resolves the dist tag, so users silently stay on stale releases (e.g. the reported case where 0.1.0 was still installed despite 0.4.1 being published).
What
On plugin init, fetch the npm registry's
latestversion (throttled to once per 24h via~/.cache/opencode-cursor/version-check.json) andconsole.warnwhen the installed plugin is behind, with the exact cache dir to delete and a restart instruction.Why not auto-update
opencode's
Npm.add(packages/core/src/npm.ts) early-returns when the cache dir exists, so the plugin cannot self-reinstall. The nudge turns silent staleness into a visible prompt; users on pinned versions are unaffected.Notes
node:https(not global fetch) — context-mode learned that global fetch can hit a WindowsUV_HANDLE_CLOSINGundici assertion on Node v24+.