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

vizion

Package Overview
Dependencies
Maintainers
3
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vizion - npm Package Compare versions

Comparing version 2.1.1 to 2.2.0

4

CHANGELOG.md
## 2.2.0
- remove lodash
## 2.1.1

@@ -3,0 +7,0 @@

11

lib/git/git.js

@@ -6,3 +6,2 @@ var fs = require('fs');

var path = require('path');
var _ = require('lodash');
var helper = require('../helper.js');

@@ -37,3 +36,3 @@ var cliCommand = require('../cliCommand.js');

data.type = 'git';
data.url = _.get(config, 'remote "origin".url');
data.url = helper.get(config, 'remote "origin".url');

@@ -50,4 +49,4 @@ cb(null, data);

data.revision = _.get(commit, 'hash');
data.comment = _.get(commit, 'message');
data.revision = helper.get(commit, 'hash');
data.comment = helper.get(commit, 'message');
cb(null, data);

@@ -92,3 +91,3 @@ });

_.forEach(config, function (value, key) {
Object.keys(config).map(function (key) {
var regex = /remote "(.*)"/;

@@ -127,3 +126,3 @@ var match = regex.exec(key);

var currentCommitIndex = _.findIndex(commitHistory, {hash: data.revision});
var currentCommitIndex = commitHistory.findIndex(({ hash }) => hash === data.revision);

@@ -130,0 +129,0 @@ if (currentCommitIndex === -1) {

var path = require('path');
var whilst = require('async/whilst');
var _ = require('lodash')
var helper = require('../helper.js');

@@ -116,3 +116,3 @@ var jsGitService = {};

var count = 1;
var parentCommitHash = _.last(commit.parents); // last parent is the parent in the 'git log' meaning
var parentCommitHash = helper.last(commit.parents); // last parent is the parent in the 'git log' meaning

@@ -138,3 +138,3 @@ whilst(

commitHistory.push(commit);
parentCommitHash = _.last(commit.parents);
parentCommitHash = helper.last(commit.parents);
callback(null);

@@ -141,0 +141,0 @@ });

@@ -5,4 +5,25 @@ function trimNewLine(input) {

function get(object, path) {
const pathArray = path.split('.');
let result = object;
while (pathArray.length) {
const pathItem = pathArray.shift();
if (pathItem in result) {
result = result[pathItem];
} else {
return undefined;
}
}
return result;
}
function last(array) {
var length = array == null ? 0 : array.length;
return length ? array[length - 1] : undefined;
}
module.exports = {
trimNewLine: trimNewLine
};
get: get,
last: last,
trimNewLine: trimNewLine,
};
{
"name": "vizion",
"version": "2.1.1",
"version": "2.2.0",
"engines": {

@@ -36,4 +36,3 @@ "node": ">=4.0"

"ini": "^1.3.5",
"js-git": "^0.7.8",
"lodash": "4.17.15"
"js-git": "^0.7.8"
},

@@ -40,0 +39,0 @@ "devDependencies": {

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