Skip to content

fix(ui): the install command should use the correct version - #1958

Merged
43081j merged 3 commits into
npmx-dev:mainfrom
btea:fix/install-pkg-correct-version
Mar 8, 2026
Merged

fix(ui): the install command should use the correct version#1958
43081j merged 3 commits into
npmx-dev:mainfrom
btea:fix/install-pkg-correct-version

Conversation

@btea

@bteabtea commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

🔗 Linked issue

/

🧭 Context

npmx

📚 Description

When you open a package's page and click on the version of one of its dependent packages, if the version number is a combination of multiple ranges, the version number generated by the installation command on the new page may not be a valid value.

@vercel

vercelBot commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
docs.npmx.devReadyReadyPreview, CommentMar 8, 2026 2:03am
npmx.devReadyReadyPreview, CommentMar 8, 2026 2:03am
1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
npmx-lunariaIgnoredIgnoredMar 8, 2026 2:03am

Request Review

@coderabbitai

coderabbitaiBot commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 186f39d5-bddf-4d1f-a9b2-910dda7d5fe5

📥 Commits

Reviewing files that changed from the base of the PR and between fb5ff39 and b0ae1ce.

📒 Files selected for processing (1)
  • app/pages/package/[[org]]/[name].vue
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/pages/package/[[org]]/[name].vue

📝 Walkthrough

Walkthrough

The component now passes resolvedVersion to TerminalInstall instead of the previously used requestedVersion. Where a resolution exists, resolvedVersion is used; otherwise the code falls back to requestedVersion. This change occurs in two places within the package page component. No public APIs or function signatures were changed.

Suggested reviewers

  • danielroe
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check nameStatusExplanation
Description check✅ PassedThe pull request description clearly relates to the changeset, explaining the issue with version resolution in installation commands when navigating between dependent packages.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@codecov

codecovBot commented Mar 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@43081j43081j left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good but if it's the latest version, we should just omit i think.

@btea

btea commented Mar 7, 2026

Copy link
Copy Markdown
ContributorAuthor

Do you mean that if the version identifier is incorrect, you should not add the version to the installation command?

@43081j

Copy link
Copy Markdown
Contributor

no i mean that the latest version shouldn't be shown in the command (current behaviour)

if im on vite i should see npm i vite (as i do now in main)
but after your pr i see npm i vite@x.y.z

it should only show the version if im looking at a non-latest version

@danielroe

Copy link
Copy Markdown
Member

agreed 👍

no i mean that the latest version shouldn't be shown in the command (current behaviour)

if im on vite i should see npm i vite (as i do now in main) but after your pr i see npm i vite@x.y.z

it should only show the version if im looking at a non-latest version

@btea

btea commented Mar 8, 2026

Copy link
Copy Markdown
ContributorAuthor

Done.

@43081j
43081j added this pull request to the merge queueMar 8, 2026
Merged via the queue into npmx-dev:main with commit e374f75Mar 8, 2026
20 checks passed
@github-actionsgithub-actionsBot mentioned this pull request Mar 8, 2026
@btea
btea deleted the fix/install-pkg-correct-version branch March 8, 2026 14:04
Sign up for freeto 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.

3 participants

@btea@43081j@danielroe