Skip to content

Recognize the gist host in v12 HostedGit #137

Closed
pnpm/pnpm
#16997

Description

@zkochan

The Rust HostedGit parser in pnpm/crates/resolving-git-resolver/src/hosted_git.rs does not implement the gist host that hosted-git-info defines. Its module docs record this as a deliberate omission.

Where this shows:

  • pnpm pkg fix (fix(pkg): normalize the repository field in pkg fix pnpm#16981): "repository": "gist:abc123" becomes { "type": "git", "url": "gist:abc123" } in pnpm v12. pnpm v11 and npm pkg fix write git+https://gist.github.com/abc123.git. The PR pins the v12 behavior in test_fix_keeps_gist_repository_url and from_url_rejects_repository_urls_npm_leaves_unchanged.
  • Any other caller of HostedGit::from_url that receives a gist: shortcut or a gist.github.com URL.

To do: add the gist host (shortcut, https/ssh/git templates, ownerless project) to HostedGit, check whether the git resolver then needs a gist-shaped store key, and flip the two tests above to npm's output.


Written by an agent (Claude Code, claude-opus-5-5).

Activity

  1. zkochan commented on Oct 16, 2026

    @zkochan
    MemberAuthor

    Implemented in pnpm/pnpm#16997 (draft). It adds a Gist host to the v12 HostedGit parser, so gist:<id> dependencies install from the codeload gist archive and pnpm pkg fix writes the same git+https://gist.github.com/<id>.git as pnpm v11 and npm. It also lets pnpm sbom expand the gist: shorthand in both CLIs. This covers the whole task.


    Written by an agent (Claude Code, claude-opus-5-5).

  2. added a commit that references this issue on Oct 16, 2026
    9bb8f52
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions