Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hosted-git-info

Package Overview
Dependencies
Maintainers
2
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hosted-git-info - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

test/bitbucket-https-with-embedded-auth.js

18

index.js

@@ -21,3 +21,5 @@ 'use strict'

'https:': true,
'http:': true
'git+https:': true,
'http:': true,
'git+http:': true
}

@@ -38,8 +40,8 @@

var comittish = parsed.hash ? decodeURIComponent(parsed.hash.substr(1)) : null
var host = null
var path = null
var user = null
var project = null
var defaultRepresentation = null
if (parsed.protocol === gitHostName + ':') {
host = decodeURIComponent(parsed.host)
path = decodeURIComponent(parsed.path.replace(/^[/](.*?)(?:[.]git)?$/, '$1'))
user = decodeURIComponent(parsed.host)
project = parsed.path && decodeURIComponent(parsed.path.replace(/^[/](.*?)(?:[.]git)?$/, '$1'))
defaultRepresentation = 'shortcut'

@@ -52,7 +54,7 @@ } else {

if (!matched) return
if (matched[1] != null) host = decodeURIComponent(matched[1])
if (matched[2] != null) path = decodeURIComponent(matched[2])
if (matched[1] != null) user = decodeURIComponent(matched[1])
if (matched[2] != null) project = decodeURIComponent(matched[2])
defaultRepresentation = protocolToRepresentation(parsed.protocol)
}
return new GitHost(gitHostName, host, auth, path, comittish, defaultRepresentation)
return new GitHost(gitHostName, user, auth, project, comittish, defaultRepresentation)
}).filter(function (gitHostInfo) { return gitHostInfo })

@@ -59,0 +61,0 @@ if (matches.length !== 1) return

{
"name": "hosted-git-info",
"version": "2.1.1",
"version": "2.1.2",
"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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc