Skip to content

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

Open
bluwy wants to merge 4 commits intomainfrom
install-version-latest
Open

fix(ui): remove install package command version for latest#2039
bluwy wants to merge 4 commits intomainfrom
install-version-latest

Conversation

@bluwy
Copy link
Contributor

@bluwy bluwy commented Mar 12, 2026

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

vercel bot commented Mar 12, 2026

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

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Mar 16, 2026 3:14am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Mar 16, 2026 3:14am
npmx-lunaria Ignored Ignored Mar 16, 2026 3:14am

Request Review

@codecov
Copy link

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 12, 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: a40a20f6-cc6e-4b77-ba23-0e1232ed5f60

📥 Commits

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

📒 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 truthy and not "latest"; otherwise it receives null. This alters control flow only when there is no explicit non-latest requestedVersion; 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 reviewers

  • danielroe
  • 43081j
🚥 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 context from issue #1969, the problem (version showing in install command when package link has no version), and the solution (reverting to previous behaviour).

✏️ 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
  • Commit unit tests in branch install-version-latest
📝 Coding Plan
  • Generate coding plan for human review comments

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 enforce grammar and style rules using `languagetool`.

Configure the reviews.tools.languagetool setting to enable/disable rules and categories. Refer to the LanguageTool Community to learn more.

@alex-key
Copy link
Contributor

alex-key commented Mar 13, 2026

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

bluwy commented Mar 16, 2026

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.

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