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

fix: do not encodeURIComponent the domain #53

Closed
wants to merge 1 commit into from

Conversation

isaacs
Copy link
Contributor

@isaacs isaacs commented Oct 1, 2019

I ran into a situation where I have to test how Pacote handles git
shorthands from hosted-git-info, but I didn't want to ping GitHub to run
my tests.

I set up a git daemon and http server on localhost easily enough, but it
was still necessary to make it a 'real' HostedGit for the purposes of
npm-package-arg, and the : with port number was getting URL encoded.

This shows an example of doing this hack/test workaround, and fixes the
encoding issue.

It would be interesting to perhaps support GitHub Enterprise or on-prem
GitLab by letting users specify a prefix and format for hosted git info
in their npm configs, and then clone the definition with a different
domain name.

I ran into a situation where I have to test how Pacote handles git
shorthands from hosted-git-info, but I didn't want to ping GitHub to run
my tests.

I set up a git daemon and http server on localhost easily enough, but it
was still necessary to make it a 'real' HostedGit for the purposes of
npm-package-arg, and the : with port number was getting URL encoded.

This shows an example of doing this hack/test workaround, and fixes the
encoding issue.

It would be interesting to perhaps support GitHub Enterprise or on-prem
GitLab by letting users specify a prefix and format for hosted git info
in their npm configs, and then clone the definition with a different
domain name.
@isaacs isaacs closed this in 3e5fbec Oct 8, 2019
@wraithgar wraithgar deleted the isaacs/allow-colon-in-host branch September 21, 2021 14:23
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