Parse https github URL with branch name with slash#2
Open
Shinyaigeek wants to merge 1 commit into
Open
Conversation
Member
Author
|
pnpm uses FYI: https://github.com/pnpm/pnpm/blob/main/package.json#L72 However, it may be better way to use original |
1 task
or use git-url-parse instead of hosted-git-info
git-url-parse can parse github shortcut refsbut no... git-url-parse fails to parse github branch urls and github commit urlsfeature request: IonicaBizau/git-url-parse#161 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket
Refs: pnpm/pnpm#5684
Details
To support pnpm/pnpm#5684 feature, we should take two actions.
First, we should enable
hosted-git-info, which pnpm uses to parse https://github.com URL, to parse github URL with branch name with slash and github URL with pull_request.Second, we should fix pnpm itself not to reckon github URL with branch name or github URL with pull_request as tarball URL. (https://github.com/pnpm/pnpm/blob/main/resolving/tarball-resolver/src/index.ts#L33)
This Pull Request is to take the first action. Of course, we can support pnpm/pnpm#5684 without fixing
hosted-git-infoby arranging github URL before passing github URL intohosted-git-infoin pnpm itself, but I think we should not do this because it would be more simple and better to consolidate the responsibility into git-hosted-info to parse github URL.