Skip to content

feat: warn when installed plugin lags registry latest#33

Open
justin-carper wants to merge 1 commit into
mainfrom
update-opencode-latest
Open

feat: warn when installed plugin lags registry latest#33
justin-carper wants to merge 1 commit into
mainfrom
update-opencode-latest

Conversation

@justin-carper

Copy link
Copy Markdown
Collaborator

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 latest version (throttled to once per 24h via ~/.cache/opencode-cursor/version-check.json) and console.warn when 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

  • Uses node:https (not global fetch) — context-mode learned that global fetch can hit a Windows UV_HANDLE_CLOSING undici assertion on Node v24+.
  • Registry request has a 5s timeout and never throws.
  • README updated with the cache-clear workaround.

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.
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