Skip to content

Aliased dependencies are not linked correctly #2010

Description

@ericcornelissen

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:

Image

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

n/a

Footnotes

  1. 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/.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backServer, DatafrontFrontend, Design

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions