Files
pnpm/.changeset/fix-git-url-detection.md
Zoltan Kochan ec7c5d7d1a feat: improve git URL detection to recognize plain HTTP/HTTPS URLs
Improve git URL detection to recognize plain HTTP/HTTPS URLs
ending in `.git` and prioritize git resolver over tarball resolver.

close #10468
2026-01-16 19:38:02 +01:00

880 B

@pnpm/git-resolver, @pnpm/tarball-resolver, @pnpm/default-resolver, pnpm
@pnpm/git-resolver @pnpm/tarball-resolver @pnpm/default-resolver pnpm
minor minor minor patch

Support plain http:// and https:// URLs ending with .git as git repository dependencies.

Previously, URLs like https://gitea.example.org/user/repo.git#commit were not recognized as git repositories because they lacked the git+ prefix (e.g., git+https://). This caused issues when installing dependencies from self-hosted git servers like Gitea or Forgejo that don't provide tarball downloads.

Changes:

  • The git resolver now runs before the tarball resolver, ensuring git URLs are handled by the correct resolver
  • The git resolver now recognizes plain http:// and https:// URLs ending in .git as git repositories
  • Removed the isRepository check from the tarball resolver since it's no longer needed with the new resolver order

Fixes #10468