Skip to content

Conversation

@9romise
Copy link
Member

@9romise 9romise commented Feb 9, 2026

Part of #2
This PR add a diagnostic rule that detects outdated package versions and offers a quick fix to upgrade:

  • For stable versions: hints when a newer latest is available
  • For prerelease versions: hints when a newer version in the same channel exists (e.g., beta.1 → beta.3), or when a stable release supersedes it

@coderabbitai
Copy link

coderabbitai bot commented Feb 9, 2026

📝 Walkthrough

Walkthrough

This PR adds an upgrade diagnostics feature: a new npmx.diagnostics.upgrade configuration (default true), a diagnostic rule that emits hints when newer package versions or matching prerelease tags exist, a CodeAction provider that offers quick-fix updates, and a new UPGRADE_MESSAGE_PREFIX constant. It moves version-handling logic out of src/utils/package.ts into a new src/utils/version.ts, introducing parseVersion, formatVersion, getPrereleaseId, and lt, and updates imports across consumers. Tests were adjusted to cover the new version utilities.

Possibly related PRs

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description accurately relates to the changeset, describing the diagnostic rule for detecting outdated packages and offering quick fixes to upgrade.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/check-upgrade

No actionable comments were generated in the recent review. 🎉


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

@npmx-dev npmx-dev deleted a comment from coderabbitai bot Feb 9, 2026
@npmx-dev npmx-dev deleted a comment from coderabbitai bot Feb 9, 2026
@npmx-dev npmx-dev deleted a comment from coderabbitai bot Feb 9, 2026
@9romise 9romise force-pushed the feat/check-upgrade branch from 78a4ca5 to 444baac Compare February 9, 2026 16:30
@npmx-dev npmx-dev deleted a comment from coderabbitai bot Feb 9, 2026
@npmx-dev npmx-dev deleted a comment from coderabbitai bot Feb 9, 2026
@npmx-dev npmx-dev deleted a comment from coderabbitai bot Feb 9, 2026
@npmx-dev npmx-dev deleted a comment from coderabbitai bot Feb 9, 2026
@npmx-dev npmx-dev deleted a comment from coderabbitai bot Feb 9, 2026
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.

2 participants