Skip to content

Broken GitHub source links for monorepo packages when repository.url includes .git #2233

Description

@cochinescu

Describe the bug

npmx is generating a broken GitHub source link for @agentmarkup/vite.

On the package page, the source link goes to:

https://github.com/agentmarkup/agentmarkup.git/tree/HEAD/packages/vite

That URL returns 404.

The correct GitHub URL is:

https://github.com/agentmarkup/agentmarkup/tree/HEAD/packages/vite

It looks like npmx is using npm registry repository.url + repository.directory, but not normalizing the repo URL before building the GitHub web link.

Additional context

Repro:

The same problem appears to affect:

  • @agentmarkup/core
  • @agentmarkup/astro

Important detail:

  • the repo manifest is already https://github.com/agentmarkup/agentmarkup
  • the published npm tarballs also contain the clean URL
  • npm registry metadata exposes git+https://github.com/agentmarkup/agentmarkup.git

So the bug seems to be in link construction from registry metadata, not in the package itself.

Logs

curl -sSI https://github.com/agentmarkup/agentmarkup.git/tree/HEAD/packages/vite
# HTTP/2 404

curl -sSI https://github.com/agentmarkup/agentmarkup/tree/HEAD/packages/vite
# HTTP/2 200

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, Data

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions