Skip to content

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

Open
btea wants to merge 3 commits intonpmx-dev:mainfrom
btea:fix/install-pkg-correct-version
Open

fix(ui): the install command should use the correct version#1958
btea wants to merge 3 commits intonpmx-dev:mainfrom
btea:fix/install-pkg-correct-version

Conversation

@btea
Copy link
Contributor

@btea btea commented Mar 6, 2026

🔗 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
Copy link

vercel bot commented Mar 6, 2026

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

Project Deployment Actions Updated (UTC)
docs.npmx.dev Ready Ready Preview, Comment Mar 8, 2026 2:03am
npmx.dev Ready Ready Preview, Comment Mar 8, 2026 2:03am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
npmx-lunaria Ignored Ignored Mar 8, 2026 2:03am

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 6, 2026

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 name Status Explanation
Description check ✅ Passed The 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
Copy link

codecov bot commented Mar 6, 2026

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!

Copy link
Contributor

@43081j 43081j left a comment

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
Copy link
Contributor Author

btea commented Mar 7, 2026

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

@43081j
Copy link
Contributor

43081j commented Mar 7, 2026

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
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
Copy link
Contributor Author

btea commented Mar 8, 2026

Done.

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.

3 participants