Skip to content

fix: resolve npm aliases in dependency version links - #3234

Closed
fengmk2 wants to merge 1 commit into
npmx-dev:mainfrom
fengmk2:fix/npm-alias-dependency-links
Closed

fengmk2 wants to merge 1 commit into
npmx-dev:mainfrom
fengmk2:fix/npm-alias-dependency-links

Conversation

@fengmk2

@fengmk2 fengmk2 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

The vite version link on vite-plus@0.3.1 returns 404 because packageRoute() treats the full npm: alias as a version.

packageRoute() now uses parsePackageSpec() to extract the target package and version. The link opens /package/@voidzero-dev/vite-plus-core/v/0.3.1. The fix covers regular, peer, and optional dependency version links.

Regression tests cover scoped and unscoped aliases, ranges, tags, and aliases without versions. All 56 focused tests, lint, formatting, and type checks pass.

Related to #2010. This draft overlaps with #2192 and limits the change to version-link routing.

@agentscanapp

agentscanapp Bot commented Sep 8, 2026

Copy link
Copy Markdown

Thanks for opening this pull request! 🎉

We really appreciate you taking the time to contribute, @fengmk2.

A maintainer will take a look as soon as they can. In the meantime, please make sure that:

  • the description explains what changed and why
  • any related issues are linked
  • existing tests still pass

If anything needs adjusting we'll leave comments here. Thanks again!

@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
npmx.dev Ready Ready Preview Sep 8, 2026 2:13pm UTC
2 Skipped Deployments
Project Deployment Actions Updated
docs.npmx.dev Ignored Ignored Preview Sep 8, 2026 2:13pm UTC
npmx-lunaria Ignored Ignored Sep 8, 2026 2:13pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

@codecov

codecov Bot commented Sep 8, 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!

@fengmk2

fengmk2 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

duplicate of #2192

@fengmk2
fengmk2 deleted the fix/npm-alias-dependency-links branch September 8, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant