Describe the bug
The npmx interface links to the wrong package when a package specifies a dependency through an alias (e.g., "foo": "npm:bar@1.2.3" in package.json) in the "Dependencies" section of the sidebar. See for example string-width-cjs npm:string-wi... in the preview below:
which currently links to https://npmx.dev/package/string-width-cjs but should link to https://npmx.dev/package/string-width per https://npmx.dev/package-code/@isaacs/cliui/v/8.0.2/package.json#L53.
Additional context
Example:
Logs
Describe the bug
The npmx interface links to the wrong package when a package specifies a dependency through an alias (e.g.,
"foo": "npm:bar@1.2.3"in package.json) in the "Dependencies" section of the sidebar. See for examplestring-width-cjs npm:string-wi...in the preview below:which currently links to https://npmx.dev/package/string-width-cjs but should link to https://npmx.dev/package/string-width per https://npmx.dev/package-code/@isaacs/cliui/v/8.0.2/package.json#L53.
Additional context
Example:
*-cjsdependencies link to the wrong package and should instead link to the aliased package.Logs
Footnotes
this appears to be a quite recent change because I definitely remember them linking to the alias-named package not too long ago. See also https://snyk.io/blog/exploring-extensions-of-dependency-confusion-attacks-via-npm-package-aliasing/. ↩