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 1.0.0-beta1 to 2.0.0

lib/cliCommand.js

9

lib/git/git.js

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

var helper = require('../helper.js');
var cliCommand = require('../cliCommand.js');
var jsGitService = require('./js-git-service.js');

@@ -59,3 +60,3 @@

git.getStaged = function (folder, data, cb) {
exec("cd '" + folder + "';LC_ALL=en_US.UTF-8 git status -s", {timeout: TIMEOUT, maxBuffer: MAXBUFFER},
exec(cliCommand(folder, 'git status -s'), {timeout: TIMEOUT, maxBuffer: MAXBUFFER},
function (err, stdout, stderr) {

@@ -157,3 +158,3 @@ if (err) {

git.getTags = function (folder, data, cb) {
exec("cd '" + folder + "';LC_ALL=en_US.UTF-8 git tag", {timeout: TIMEOUT, maxBuffer: MAXBUFFER},
exec(cliCommand(folder, 'git tag'), {timeout: TIMEOUT, maxBuffer: MAXBUFFER},
function (err, stdout, stderr) {

@@ -205,3 +206,3 @@ if (err) {

exec("cd '" + folder + "';LC_ALL=en_US.UTF-8 git remote update", {timeout: 60000, maxBuffer: MAXBUFFER},
exec(cliCommand(folder, 'git remote update'), {timeout: 60000, maxBuffer: MAXBUFFER},
function (err, stdout, stderr) {

@@ -231,3 +232,3 @@ if (err) {

var ret = {};
var command = "cd '" + args.folder + "';LC_ALL=en_US.UTF-8 git reset --hard " + args.revision;
var command = cliCommand(args.folder, "git reset --hard " + args.revision);
ret.output = '';

@@ -234,0 +235,0 @@ ret.output += command + '\n';

@@ -5,2 +5,4 @@ var exec = require("child_process").exec;

var cliCommand = require('../cliCommand.js');
var halt = false;

@@ -37,3 +39,3 @@

exec("cd '"+folder+"';LC_ALL=en_US.UTF-8 hg paths default", function(err, stdout, stderr) {
exec(cliCommand(folder, "hg paths default"), function(err, stdout, stderr) {
if(err !== null) {

@@ -47,3 +49,3 @@ error("mercurial", "fetching path", stderr, cb);

});
exec("cd '"+folder+"';LC_ALL=en_US.UTF-8 hg log --limit 1 --template 'changeset: {rev}:{node|short}\nsummary: {desc}'", function(err, stdout, stderr) {
exec(cliCommand(folder, "hg log --limit 1 --template 'changeset: {rev}:{node|short}\nsummary: {desc}'"), function(err, stdout, stderr) {
if(err !== null) {

@@ -62,3 +64,3 @@ error("mercurial", "fetching log", stderr, cb);

});
exec("cd '"+folder+"';LC_ALL=en_US.UTF-8 hg branch", function(err, stdout, stderr) {
exec(cliCommand(folder, "hg branch"), function(err, stdout, stderr) {
if(err !== null) {

@@ -65,0 +67,0 @@ error("mercurial", "fetching branch", stderr, cb);

@@ -5,2 +5,4 @@ var fs = require('fs');

var cliCommand = require('../cliCommand.js');
var svn = {};

@@ -10,3 +12,3 @@

var getMeta = function(cb) {
exec("cd '"+folder+"';LC_ALL=en_US.UTF-8 svn info", function(err, stdout, stderr) {
exec(cliCommand(folder, "svn info"), function(err, stdout, stderr) {
if(err !== null)

@@ -27,3 +29,3 @@ return cb(err);

var getRevComment = function(data, cb) {
exec("cd '"+folder+"';LC_ALL=en_US.UTF-8 svn log -r BASE", function(err, stdout, stderr) {
exec(cliCommand(folder, "svn log -r BASE"), function(err, stdout, stderr) {
if(err !== null)

@@ -65,7 +67,7 @@ return cb(err);

exec("cd '"+folder+"';LC_ALL=en_US.UTF-8 svn info", function(err, stdout, stderr) {
exec(cliCommand(folder, "svn info"), function(err, stdout, stderr) {
if(err !== null)
return cb(err);
var current_rev = getRev(stdout);
exec("cd '"+folder+"';LC_ALL=en_US.UTF-8 svn info -r HEAD", function(err, stdout, stderr) {
exec(cliCommand(folder, "svn info -r HEAD"), function(err, stdout, stderr) {
if(err !== null)

@@ -85,3 +87,3 @@ return cb(err);

exec("cd '"+folder+"';LC_ALL=en_US.UTF-8 svn update", function(err, stdout, stderr) {
exec(cliCommand(folder, "svn update"), function(err, stdout, stderr) {
if(err !== null)

@@ -88,0 +90,0 @@ return cb(err);

@@ -14,5 +14,2 @@ var ALL = {};

if (process.platform === 'win32' || process.platform === 'win64')
return cb('vizion is not yet compatible with Windows.');
identify(_folder, function(type, folder) {

@@ -19,0 +16,0 @@ if (ALL[type])

{
"name": "vizion",
"version": "1.0.0-beta1",
"version": "2.0.0",
"engines": {

@@ -5,0 +5,0 @@ "node": ">=0.10"

@@ -20,3 +20,6 @@ var expect = require('chai').expect;

readFileStub = sinon.stub(fs, 'readFile', function (path, encoding, cb) {
expect(path).to.eq('my-folder/.git/config');
if (process.platform !== 'win32' && process.platform !== 'win64')
expect(path).to.eq('my-folder/.git/config');
else
expect(path).to.eq('my-folder\\.git\\config');

@@ -130,3 +133,6 @@ cb(null, data);

readFileStub = sinon.stub(fs, 'readFile', function (path, encoding, cb) {
expect(path).to.eq('my-folder/.git/HEAD');
if (process.platform !== 'win32' && process.platform !== 'win64')
expect(path).to.eq('my-folder/.git/HEAD');
else
expect(path).to.eq('my-folder\\.git\\HEAD');
expect(encoding).to.eq('utf-8');

@@ -133,0 +139,0 @@

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