Run of fresh-releases for node-normalize-git-url

Try this locally (using silver-platter):

debian-svp new-upstream node-normalize-git-url 

Merge these changes:

Summary

Merged new upstream version: 3.0.2 (was: 3.0.1).

Diff

diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..ab9182b
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,10 @@
+language: node_js
+node_js:
+  - "5"
+  - "4"
+  - iojs
+  - "0.12"
+  - "0.10"
+  - "0.8"
+sudo: false
+script: "npm test"
diff --git a/debian/changelog b/debian/changelog
index cdbdb60..0af2ac4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+node-normalize-git-url (3.0.2-1) UNRELEASED; urgency=medium
+
+  * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Thu, 27 Jun 2019 05:51:42 +0000
+
 node-normalize-git-url (3.0.1-1) unstable; urgency=medium
 
   * Initial release
diff --git a/normalize-git-url.js b/normalize-git-url.js
index db0022a..bb691e1 100644
--- a/normalize-git-url.js
+++ b/normalize-git-url.js
@@ -23,6 +23,8 @@ module.exports = function normalize (u) {
   if (altered) {
     if (u.match(/^git\+https?/) && parsed.pathname.match(/\/?:[^0-9]/)) {
       returnedUrl = u.replace(/^git\+(.*:[^:]+):(.*)/, '$1/$2')
+    } else if (u.match(/^git\+file/)) {
+      returnedUrl = u.replace(/^git\+/, '')
     } else {
       returnedUrl = u.replace(/^(?:git\+)?ssh:\/\//, '')
     }
diff --git a/package.json b/package.json
index 334e36c..be4ba33 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "normalize-git-url",
-  "version": "3.0.1",
+  "version": "3.0.2",
   "description": "Normalizes Git URLs. For npm, but you can use it too.",
   "main": "normalize-git-url.js",
   "directories": {
diff --git a/test/basic.js b/test/basic.js
index 37952d6..4b513a5 100644
--- a/test/basic.js
+++ b/test/basic.js
@@ -59,6 +59,13 @@ test('basic normalization tests', function (t) {
     normalize('git+ssh://git@github.com:npm/npm-proto.git#othiym23/organized'),
     { url: 'git@github.com:npm/npm-proto.git', branch: 'othiym23/organized' }
   )
-
+  t.same(
+    normalize('git+file:///foo/bar.git'),
+    { url: 'file:///foo/bar.git', branch: 'master' }
+  )
+  t.same(
+    normalize('git+file://C:\\Users\\hello\\testing.git#zkat/windows-files'),
+    { url: 'file://C:\\Users\\hello\\testing.git', branch: 'zkat/windows-files'}
+  )
   t.end()
 })
diff --git a/test/basic.js~ b/test/basic.js~
new file mode 100644
index 0000000..00ac6d3
--- /dev/null
+++ b/test/basic.js~
@@ -0,0 +1,56 @@
+var test = require('tap').test
+
+var normalize = require('../normalize-git-url.js')
+
+test('basic normalization tests', function (t) {
+  t.same(
+    normalize('git+ssh://user@hostname:project.git#commit-ish'),
+    { url: 'user@hostname:project.git', branch: 'commit-ish' }
+  )
+  t.same(
+    normalize('git+http://user@hostname/project/blah.git#commit-ish'),
+    { url: 'http://user@hostname/project/blah.git', branch: 'commit-ish' }
+  )
+  t.same(
+    normalize('git+https://user@hostname/project/blah.git#commit-ish'),
+    { url: 'https://user@hostname/project/blah.git', branch: 'commit-ish' }
+  )
+  t.same(
+    normalize('git+ssh://git@github.com:npm/npm.git#v1.0.27'),
+    { url: 'git@github.com:npm/npm.git', branch: 'v1.0.27' }
+  )
+  t.same(
+    normalize('git+ssh://git@github.com:org/repo#dev'),
+    { url: 'git@github.com:org/repo', branch: 'dev' }
+  )
+  t.same(
+    normalize('git+ssh://git@github.com/org/repo#dev'),
+    { url: 'ssh://git@github.com/org/repo', branch: 'dev' }
+  )
+  t.same(
+    normalize('git+ssh://foo:22/some/path'),
+    { url: 'ssh://foo:22/some/path', branch: 'master' }
+  )
+  t.same(
+    normalize('git@github.com:org/repo#dev'),
+    { url: 'git@github.com:org/repo', branch: 'dev' }
+  )
+  t.same(
+    normalize('git+https://github.com/KenanY/node-uuid'),
+    { url: 'https://github.com/KenanY/node-uuid', branch: 'master' }
+  )
+  t.same(
+    normalize('git+https://github.com/KenanY/node-uuid#7a018f2d075b03a73409e8356f9b29c9ad4ea2c5'),
+    { url: 'https://github.com/KenanY/node-uuid', branch: '7a018f2d075b03a73409e8356f9b29c9ad4ea2c5' }
+  )
+  t.same(
+    normalize('git+ssh://git@git.example.com:b/b.git#v1.0.0'),
+    { url: 'git@git.example.com:b/b.git', branch: 'v1.0.0' }
+  )
+  t.same(
+    normalize('git+ssh://git@github.com:npm/npm-proto.git#othiym23/organized'),
+    { url: 'git@github.com:npm/npm-proto.git', branch: 'othiym23/organized' }
+  )
+
+  t.end()
+})

Full worker log Full build log