Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow usernames in git resolver #843

Closed
wants to merge 2 commits into from

Conversation

danharper
Copy link
Contributor

@danharper danharper commented Oct 12, 2016

Summary

The Git resolver did not understand usernames in URLs, e.g. git+ssh://[email protected]/... due to it treating any pattern containing @ as being "un-exploded". See #513.

For me it was falling through, and calling the npm resolver instead. The package wasn't published on the registry, so it was erroring there. For others, it would error due to version mismatches if it was on the registry.

Instead, it now checks for @PROTOCOL:, e.g.

// good
git+https://[email protected]/radweb/eslint-config-radweb.git

// bad
eslint-config-radweb@git+https://[email protected]/radweb/eslint-config-radweb.git
                    ^^^^^^^^^^^

Test plan

Added test, they pass.

Btw I've noticed https://github.com/npm-ml/ocaml.git#npm-4.02.3 times out a lot.

@danharper
Copy link
Contributor Author

I've had chance to look into this more, and found what I think is a more elegant solution. I've opened another PR for that version here: #934.

@danharper danharper closed this Oct 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant