Skip to content

fix(ui): remove install package command version for latest - #2039

Merged
ghostdevv merged 5 commits into
mainfrom
install-version-latest
Mar 22, 2026
Merged

fix(ui): remove install package command version for latest#2039
ghostdevv merged 5 commits into
mainfrom
install-version-latest

Conversation

@bluwy

Copy link
Copy Markdown
Contributor

🔗 Linked issue

n/a

🧭 Context

#1969 made a change that caused the version to show up in the install command, even if the package link does not have a version, e.g. https://main.npmx.dev/package/vite

image

The version shouldn't be showed in this case

📚 Description

This PR returns it to like before, http://localhost:3000/package/vite

image

@vercel

vercelBot commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
docs.npmx.devReadyReadyPreview, CommentMar 22, 2026 3:53am
npmx.devReadyReadyPreview, CommentMar 22, 2026 3:53am
1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
npmx-lunariaIgnoredIgnoredMar 22, 2026 3:53am

Request Review

@codecov

codecovBot commented Mar 12, 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!

@coderabbitai

coderabbitaiBot commented Mar 12, 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: bf0dbc10-9ff3-4784-821c-1c55b8fa3db0

📥 Commits

Reviewing files that changed from the base of the PR and between 9efc03a and f052b51.

📒 Files selected for processing (1)
  • app/pages/package/[[org]]/[name].vue

📝 Walkthrough

Walkthrough

Changed the TerminalInstall component binding in app/pages/package/[[org]]/[name].vue: the requested-version prop now receives resolvedVersion only when requestedVersion is present and not "latest"; otherwise it receives null. This alters control flow only when there is no explicit non-latestrequestedVersion; behaviour is unchanged for explicit non-latest requests. Change size: +3 / -1.

Possibly related PRs

  • npmx-dev/npmx.dev PR 1958: Modifies the same prop bindings in app/pages/package/[[org]]/[name].vue, changing which version value is passed to TerminalInstall.

Suggested labels

help wanted

Suggested reviewers

  • danielroe
  • 43081j
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check nameStatusExplanation
Description check✅ PassedThe pull request description clearly explains the issue (version showing in install command when it shouldn't) and directly relates to the changeset which conditionally passes the version only when appropriate.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch install-version-latest

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.

Tip

CodeRabbit can generate a title for your PR based on the changes.

Add @coderabbitai placeholder anywhere in the title of your PR and CodeRabbit will replace it with a title based on the changes in the PR. You can change the placeholder by changing the reviews.auto_title_placeholder setting.

@alex-key

alex-key commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

Since you still could click on the latest version semver and url would be changed (and requestedVersion added) I would improve logic to omit this prop in case resolvedVersion is the latest. But it's up to you

@bluwy

Copy link
Copy Markdown
ContributorAuthor

Done. Personally I'd show the tag too, if it's beta for example so it's pkg@beta and not pkg@1.2.3, but I'd like to get some form of this fix out first so it doesn't show a pinned version install.

@ghostdevv
ghostdevv enabled auto-merge March 22, 2026 03:52
@ghostdevv
ghostdevv added this pull request to the merge queueMar 22, 2026
Merged via the queue into main with commit 5dec2efMar 22, 2026
21 of 22 checks passed
@ghostdevv
ghostdevv deleted the install-version-latest branch March 22, 2026 03:58
@github-actionsgithub-actionsBot mentioned this pull request Mar 22, 2026
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

@bluwy@alex-key@ghostdevv