Socket
Socket
Sign inDemoInstall

hosted-git-info

Package Overview
Dependencies
1
Maintainers
7
Versions
64
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.2 to 3.0.3

5

CHANGELOG.md

@@ -5,2 +5,7 @@ # Change Log

<a name="3.0.3"></a>
## [3.0.3](https://github.com/npm/hosted-git-info/compare/v3.0.2...v3.0.3) (2020-02-25)
<a name="3.0.2"></a>

@@ -7,0 +12,0 @@ ## [3.0.2](https://github.com/npm/hosted-git-info/compare/v3.0.1...v3.0.2) (2019-10-08)

12

index.js

@@ -50,3 +50,3 @@ 'use strict'

if (parsed.auth && authProtocols[parsed.protocol]) {
auth = decodeURIComponent(parsed.auth)
auth = parsed.auth
}

@@ -110,3 +110,11 @@ var committish = parsed.hash ? decodeURIComponent(parsed.hash.substr(1)) : null

var matched = giturl.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/)
if (!matched) return url.parse(giturl)
if (!matched) {
var legacy = url.parse(giturl)
if (legacy.auth) {
var whatwg = new url.URL(giturl)
legacy.auth = whatwg.username || ''
if (whatwg.password) legacy.auth += ':' + whatwg.password
}
return legacy
}
return {

@@ -113,0 +121,0 @@ protocol: 'git+ssh:',

2

package.json
{
"name": "hosted-git-info",
"version": "3.0.2",
"version": "3.0.3",
"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