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.3.0 to 1.4.0

2

index.js

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

return new RegExp(
/^(?:https?:\/\/|git:\/\/)?(?:[^@]+@)?/.source +
/^(?:https?:\/\/|git:\/\/|git\+ssh:\/\/|git\+https:\/\/)?(?:[^@]+@)?/.source +
'(' + baseUrls.join('|') + ')' +

@@ -27,0 +27,0 @@ /[:\/]([^\/]+\/[^\/]+?|[0-9]+)$/.source

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

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -41,2 +41,12 @@

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

@@ -43,0 +53,0 @@ var url = 'https://EastCloud@github.com/EastCloud/node-websockets.git';

@@ -40,2 +40,12 @@ var parse = require('./');

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

@@ -78,5 +88,5 @@ var url = 'https://EastCloud@github.com/EastCloud/node-websockets.git';

parse.re.source.should.equal(
/^(?:https?:\/\/|git:\/\/)?(?:[^@]+@)?(gist.github.com|github.com)[:\/]([^\/]+\/[^\/]+?|[0-9]+)$/.source
/^(?:https?:\/\/|git:\/\/|git\+ssh:\/\/|git\+https:\/\/)?(?:[^@]+@)?(gist.github.com|github.com)[:\/]([^\/]+\/[^\/]+?|[0-9]+)$/.source
)
});
})
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