Socket
Socket
Sign inDemoInstall

github-url-from-git

Package Overview
Dependencies
0
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.0 to 1.3.0

2

index.js

@@ -6,3 +6,3 @@ // convert git:// form url to github URL, e.g.,

try {
var m = re(opts).exec(url.replace(/\.git$/, ''));
var m = re(opts).exec(url.replace(/\.git(#.*)?$/, ''));
var host = m[1];

@@ -9,0 +9,0 @@ var path = m[2];

{
"name": "github-url-from-git",
"version": "1.2.0",
"version": "1.3.0",
"description": "Parse a github git url and return the github repo url",

@@ -11,3 +11,3 @@ "main": "index.js",

"type": "git",
"url": "http://github.com/visionmedia/node-github-url-from-git"
"url": "https://github.com/visionmedia/node-github-url-from-git.git"
},

@@ -14,0 +14,0 @@ "keywords": [

@@ -31,2 +31,17 @@

it('should parse git@github.com:bcoe/thumbd.git', function() {
var url = 'git@github.com:bcoe/thumbd.git';
parse(url).should.eql('https://github.com/bcoe/thumbd');
})
it('should parse git@github.com:bcoe/thumbd.git#2.7.0', function() {
var url = 'git@github.com:bcoe/thumbd.git#2.7.0';
parse(url).should.eql('https://github.com/bcoe/thumbd');
})
it('should parse https://EastCloud@github.com/EastCloud/node-websockets.git', function() {
var url = 'https://EastCloud@github.com/EastCloud/node-websockets.git';
parse(url).should.eql('https://github.com/EastCloud/node-websockets');
})
// gist urls.

@@ -33,0 +48,0 @@

@@ -30,2 +30,17 @@ var parse = require('./');

it('should parse git@github.com:bcoe/thumbd.git', function() {
var url = 'git@github.com:bcoe/thumbd.git';
parse(url).should.eql('https://github.com/bcoe/thumbd');
})
it('should parse git@github.com:bcoe/thumbd.git#2.7.0', function() {
var url = 'git@github.com:bcoe/thumbd.git#2.7.0';
parse(url).should.eql('https://github.com/bcoe/thumbd');
})
it('should parse https://EastCloud@github.com/EastCloud/node-websockets.git', function() {
var url = 'https://EastCloud@github.com/EastCloud/node-websockets.git';
parse(url).should.eql('https://github.com/EastCloud/node-websockets');
})
// gist urls.

@@ -32,0 +47,0 @@

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