Skip to content

Conversation

@alexdln
Copy link
Member

@alexdln alexdln commented Feb 11, 2026

If a range was specified in the dependencies, we had an invalid link. This caused 404 links, unnecessary prefetched, and just a bad experience.

I changed it so that we additionally clean up the versions, and if it results in valid version - the link will point to a specific version, otherwise - to the latest one. I was thinking about changing it to disabled, but it seems behavior with latest version is a bit more convenient (the perfect option is to find the exact latest version under range, but it's to much requests - I'll try to look into this option later)

@vercel
Copy link

vercel bot commented Feb 11, 2026

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

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 11, 2026 2:22pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 11, 2026 2:22pm
npmx-lunaria Ignored Ignored Feb 11, 2026 2:22pm

Request Review

@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 69.56522% with 7 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
app/components/Package/Dependencies.vue 69.56% 6 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 11, 2026

📝 Walkthrough

Walkthrough

The Dependencies.vue component has been updated to implement version normalisation. The change introduces semver.clean functionality to process dependency versions, creating both cleaned (cleanVersion) and original (origVersion) version entries. Iteration logic has been refactored from array-based tuples to object-destructured entries carrying name, origVersion, and cleanVersion. Sorting algorithms, rendering paths, and display logic have been updated to accommodate the new data structure, with navigation using cleaned versions whilst user-facing text preserves the original version strings.

Suggested reviewers

  • danielroe
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description clearly explains the problem (invalid links for ranged dependencies causing 404s) and the solution (cleaning versions and linking to specific or latest versions).

✏️ 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

No actionable comments were generated in the recent review. 🎉


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

@danielroe
Copy link
Member

hm. I think originally this was added deliberately so you just go to, e.g. https://npmx.dev/nuxt@^2

#103

@alexdln
Copy link
Member Author

alexdln commented Feb 11, 2026

Oh, oops... Well, now I'm not sure where reality lies🫠

Got it, thanks

What do you think would be better behavior for versions like ">= 18.0.0"? Should I repeat your logic or navigate to the latest version?

@alexdln alexdln marked this pull request as draft February 11, 2026 14:44
@alexdln alexdln closed this Feb 11, 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