ForbesLindesay/npm-fetch

Recognize GitHub git urls

Closed this issue · 7 comments

When something is a git URL but is actually for a GitHub repository we could be clever and download the tarball instead (providing they aren't using authentication in the git url). This would be useful for environments without git installed. Depends on #20.

Sadly github-url-from-gitdoes not expose the regex it uses - so after we got a result (github url) we have to parse the url again to get the username/repofor our npm.github method.

Should I send TJ a pull request to expose the url?
Should we change the arguments our npm.github takes?

Yes, we could do with our own, more powerful git detection library since we need to detect branch/tag/commit as well as user and repo.

Currently on another task, but can start this night/tomorrow night with it.

https://github.com/ForbesLindesay/discern is well underway, and in use with this library.