diff options
author | Kat Marchán <kzm@sykosomatic.org> | 2015-07-17 01:07:36 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2015-07-17 10:59:43 +0300 |
commit | 9525294b8e388eef6a57d8294d2858810c621b90 (patch) | |
tree | 6f39936e595bdb8cc2d2b6c6634f584d54487028 /test | |
parent | 20010a9b9961a616d5a987caecaa78bc1b080ab5 (diff) |
install: verify that git+https:// URIs are normalized like they used to be
PR-URL: https://github.com/npm/npm/pull/8947
Diffstat (limited to 'test')
-rw-r--r-- | test/tap/add-remote-git-get-resolved.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/tap/add-remote-git-get-resolved.js b/test/tap/add-remote-git-get-resolved.js index 0ff6e82e7..3f3146728 100644 --- a/test/tap/add-remote-git-get-resolved.js +++ b/test/tap/add-remote-git-get-resolved.js @@ -65,6 +65,12 @@ test('add-remote-git#get-resolved HTTPS', function (t) { verify('https://github.com/foo/repo#master') verify('git+https://github.com/foo/repo.git#master') verify('git+https://github.com/foo/repo#decadacefadabade') + // DEPRECATED + // this is an invalid URL but we normalize it + // anyway. Users shouldn't use this in the future. See note + // below for how this affected non-hosted URLs. + // See https://github.com/npm/npm/issues/8881 + verify('git+https://github.com:foo/repo.git#master') function verify (uri) { t.equal( @@ -90,6 +96,12 @@ test('add-remote-git#get-resolved edge cases', function (t) { 'don\'t break non-hosted scp-style locations' ) + // DEPRECATED + // When we were normalizing all git URIs, git+https: was being + // automatically converted to ssh:. Some users were relying + // on this funky behavior, so after removing the aggressive + // normalization from non-hosted URIs, we brought this back. + // See https://github.com/npm/npm/issues/8881 t.equal( tryGetResolved('git+https://bananaboat:galbi/blah', 'decadacefadabade'), 'git+https://bananaboat/galbi/blah#decadacefadabade', |