Comparing version 1.0.0-beta1 to 2.0.0
@@ -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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
45625
25
1263
1