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

git-url-parse

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-url-parse - npm Package Compare versions

Comparing version 6.0.3 to 6.0.4

24

lib/index.js

@@ -94,3 +94,7 @@ "use strict";

case "https":
return type + "://" + obj.resource + "/" + obj.full_name;
var token = "";
if (obj.token) {
token = buildToken(obj);
}
return type + "://" + token + obj.resource + "/" + obj.full_name;
default:

@@ -101,2 +105,20 @@ return obj.href;

/*!
* buildToken
* Builds OAuth token prefix (helper function)
*
* @name buildToken
* @function
* @param {GitUrl} obj The parsed Git url object.
* @return {String} token prefix
*/
function buildToken(obj) {
switch (obj.source) {
case "bitbucket.org":
return "x-token-auth:" + obj.token + "@";
default:
return obj.token + "@";
}
}
module.exports = gitUrlParse;

12

package.json
{
"name": "git-url-parse",
"version": "6.0.3",
"version": "6.0.4",
"description": "A high level git url parser for common git providers.",
"main": "dist/index.js",
"main": "lib/index.js",
"scripts": {
"test": "node test",
"dist": "dist-it lib/index.js index.js"
"test": "node test"
},

@@ -26,3 +25,2 @@ "repository": {

"blah": {
"main": "lib/index.js",
"h_img": "http://i.imgur.com/HlfMsVf.png"

@@ -38,3 +36,5 @@ },

"devDependencies": {
"browserify": "^13.0.1",
"dist-it": "^2.0.0",
"namy": "^1.2.3",
"tester": "^1.3.1"

@@ -54,2 +54,2 @@ },

]
}
}
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