Commit 3e5fbec
committed
fix: do not encodeURIComponent the domain
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.
PR-URL: #53
Credit: @isaacs
Close: #53
Reviewed-by: @isaacs1 parent 97c8caa commit 3e5fbec
2 files changed
+30
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
0 commit comments