New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

gitit

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitit - npm Package Compare versions

Comparing version
0.0.1
to
0.0.2
+5
-4
lib/cli.js

@@ -34,8 +34,9 @@ (function() {

"package.json": function(filePath) {
var host, match, package, repo, url, user, _ref, _ref2, _ref3;
var host, match, package, repo, repoName, url, user, _ref, _ref2;
package = require(filePath);
url = (_ref = (_ref2 = package.repository) != null ? _ref2.url : void 0) != null ? _ref : "";
repo = package.repository;
url = typeof repo === 'string' ? repo : (_ref = repo.url) != null ? _ref : "";
if (url.length > 0) {
_ref3 = url.match(/.*:\/\/(.*)\/(.*)\/(.*)\.git/), match = _ref3[0], host = _ref3[1], user = _ref3[2], repo = _ref3[3];
url = this.hostURL(host, user, repo);
_ref2 = url.match(/.*:\/\/(.*)\/(.*)\/(.*)(\.git)?/), match = _ref2[0], host = _ref2[1], user = _ref2[2], repoName = _ref2[3];
url = this.hostURL(host, user, repoName);
} else if (package.name.toString().length > 0) {

@@ -42,0 +43,0 @@ url = "'https://github.com/search?utf8=✓&q=" + package.name + "&type=Everything&start_value=1'";

@@ -5,3 +5,3 @@ {

"author": "Chris McCord",
"version": "0.0.1",
"version": "0.0.2",
"licenses": [{

@@ -8,0 +8,0 @@ "type": "MIT",

@@ -35,6 +35,7 @@ fs = require 'fs'

package = require(filePath)
url = package.repository?.url ? ""
repo = package.repository
url = if typeof(repo) is 'string' then repo else repo.url ? ""
if url.length > 0
[match, host, user, repo] = url.match(/.*:\/\/(.*)\/(.*)\/(.*)\.git/)
url = @hostURL(host, user, repo)
[match, host, user, repoName] = url.match(/.*:\/\/(.*)\/(.*)\/(.*)(\.git)?/)
url = @hostURL(host, user, repoName)
else if package.name.toString().length > 0

@@ -41,0 +42,0 @@ url = "'https://github.com/search?utf8=✓&q=#{package.name}&type=Everything&start_value=1'"