hosted-git-info
Advanced tools
Comparing version 2.7.0 to 2.7.1
@@ -5,2 +5,13 @@ # Change Log | ||
<a name="2.7.1"></a> | ||
## [2.7.1](https://github.com/npm/hosted-git-info/compare/v2.7.0...v2.7.1) (2018-07-07) | ||
### Bug Fixes | ||
* **index:** Guard against non-string types ([5bc580d](https://github.com/npm/hosted-git-info/commit/5bc580d)) | ||
* **parse:** Crash on strings that parse to having no host ([c931482](https://github.com/npm/hosted-git-info/commit/c931482)), closes [#35](https://github.com/npm/hosted-git-info/issues/35) | ||
<a name="2.7.0"></a> | ||
@@ -7,0 +18,0 @@ # [2.7.0](https://github.com/npm/hosted-git-info/compare/v2.6.1...v2.7.0) (2018-07-06) |
@@ -29,2 +29,3 @@ 'use strict' | ||
module.exports.fromUrl = function (giturl, opts) { | ||
if (typeof giturl !== 'string') return | ||
var key = giturl + JSON.stringify(opts || {}) | ||
@@ -62,3 +63,3 @@ | ||
} else { | ||
if (parsed.host !== gitHostInfo.domain && parsed.host.replace(/^www[.]/, '') !== gitHostInfo.domain) return | ||
if (parsed.host && parsed.host !== gitHostInfo.domain && parsed.host.replace(/^www[.]/, '') !== gitHostInfo.domain) return | ||
if (!gitHostInfo.protocols_re.test(parsed.protocol)) return | ||
@@ -65,0 +66,0 @@ if (!parsed.path) return |
{ | ||
"name": "hosted-git-info", | ||
"version": "2.7.0", | ||
"version": "2.7.1", | ||
"description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
19609
299