fix(resolver): Add general support for git-over-protocol URLs #4759
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.
Summary
Yarn can not handle the
git+https://
dependency format correctly, as described for various versions in #1625. The problem is present in Yarn 1.2.1.A related problem for
git+ssh://
has been described in #573 and fixed in #3425.This PR extends the solution from #3425 to use the Git fetcher for any Git-over-protocol URLs.
Test plan
Extended the
package-request
unit tests to verify that the correct remote type (git) is used forgit+https://
, while the tarball remote type continues to be used for regular HTTP(S) URLs.