Socket
Socket
Sign inDemoInstall

hosted-git-info

Package Overview
Dependencies
0
Maintainers
3
Versions
64
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.7.0 to 2.7.1

11

CHANGELOG.md

@@ -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)

3

index.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc