Skip to content

fix(plugin): refresh mutable specs during install#27940

Open
samiralibabic wants to merge 1 commit into
anomalyco:devfrom
samiralibabic:fix-npm-latest-cache
Open

fix(plugin): refresh mutable specs during install#27940
samiralibabic wants to merge 1 commit into
anomalyco:devfrom
samiralibabic:fix-npm-latest-cache

Conversation

@samiralibabic
Copy link
Copy Markdown

Issue for this PR

Closes #25293

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Explicit plugin installs now refresh mutable package specs instead of reusing a stale package cache entry forever.

The cache fast path is still used for exact versions and for normal plugin loading. Only install/update paths pass refresh: true for mutable specs such as bare package names, @latest, ranges, git specs, and unpinned npm aliases.

This is intentionally narrower than auto-updating plugins during startup. It fixes the stale @latest install behavior without adding registry checks to normal TUI boot.

Likely addresses #21609. Related: #26215, #18544, #23143, #23502.

How did you verify your code works?

  • bun test test/npm.test.ts from packages/core
  • bun test test/plugin/shared.test.ts test/plugin/install.test.ts from packages/opencode
  • bun typecheck from packages/core
  • bun typecheck from packages/opencode
  • git diff --check
  • pre-push bun turbo typecheck completed successfully

Screenshots / recordings

Not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

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.

Plugin @latest cache can stay pinned to stale npm version

1 participant