Socket
Socket
Sign inDemoInstall

snyk-sbt-plugin

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snyk-sbt-plugin - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

.eslintrc

52

lib/index.js

@@ -16,32 +16,34 @@ var path = require('path');

function inspect(root, targetFile, options) {
if (!options) { options = { dev: false }; }
if (!options) {
options = {dev: false};
}
return subProcess.execute('sbt',
buildArgs(root, targetFile, options.args),
{ cwd: root })
.then(function (result) {
var packageName = path.basename(root);
var packageVersion = '0.0.0';
var depTree = parser.parse(result, packageName, packageVersion);
depTree.packageFormatVersion = packageFormatVersion;
{cwd: root})
.then(function (result) {
var packageName = path.basename(root);
var packageVersion = '0.0.0';
var depTree = parser.parse(result, packageName, packageVersion);
depTree.packageFormatVersion = packageFormatVersion;
return {
plugin: {
name: 'bundled:sbt',
runtime: 'unknown',
},
package: depTree,
};
})
.catch(function (error) {
debug(error);
if (typeof error == 'string') {
var thrownError = parser.parseError(error);
if (thrownError) {
throw thrownError;
return {
plugin: {
name: 'bundled:sbt',
runtime: 'unknown',
},
package: depTree,
};
})
.catch(function (error) {
debug(error);
if (typeof error == 'string') {
var thrownError = parser.parseError(error);
if (thrownError) {
throw thrownError;
}
throw new Error('snyk-sbt-plugin error: ' + error);
}
throw new Error('snyk-sbt-plugin error: ' + error);
}
throw error;
});
throw error;
});
}

@@ -48,0 +50,0 @@

@@ -6,27 +6,27 @@ var tabdown = require('./tabdown');

var newLines = lines
.map(function (line) {
return line.replace(/\u001b\[0m/g, '');
})
.filter(function (line) {
if (line.indexOf('[info] ') === 0 && line.indexOf('+-') > -1) {
return true;
}
var match = line.match(/\[info\]\s[\w_\.\-]+:[\w_\.\-]+:[\w_\.\-]+/);
if (match && match[0].length === line.length) {
return true;
}
match = line.match(/\[info\]\s[\w_\.\-]+:[\w_\.\-]+:[\w_\.\-]+\s\[S\]/);
if (match && match[0].length === line.length) {
return true;
}
return false;
})
.map(function (line) {
return line
.slice(7, line.length) // slice off '[info] '
.replace(' [S]', '')
.replace(/\|/g, ' ')
.replace('+-', '')
.replace(/\s\s/g, '\t');
});
.map(function (line) {
return line.replace(/\u001b\[0m/g, '');
})
.filter(function (line) {
if (line.indexOf('[info] ') === 0 && line.indexOf('+-') > -1) {
return true;
}
var match = line.match(/\[info\]\s[\w_\.\-]+:[\w_\.\-]+:[\w_\.\-]+/);
if (match && match[0].length === line.length) {
return true;
}
match = line.match(/\[info\]\s[\w_\.\-]+:[\w_\.\-]+:[\w_\.\-]+\s\[S\]/);
if (match && match[0].length === line.length) {
return true;
}
return false;
})
.map(function (line) {
return line
.slice(7, line.length) // slice off '[info] '
.replace(' [S]', '')
.replace(/\|/g, ' ')
.replace('+-', '')
.replace(/\s\s/g, '\t');
});
var tree = tabdown.parse(newLines, '\t');

@@ -36,3 +36,3 @@ return tree;

function walkInTree(toNode, fromNode, parentNode) {
function walkInTree(toNode, fromNode) {
if (fromNode.children && fromNode.children.length > 0) {

@@ -72,3 +72,3 @@ for (var j = 0; j < fromNode.children.length; j++) {

version = version.trim();
return { name: app, version: version };
return {name: app, version: version};
}

@@ -131,5 +131,7 @@

for (var key in obj) {
if (obj.hasOwnProperty(key)) { keys.push(key); }
if (obj.hasOwnProperty(key)) {
keys.push(key);
}
}
return keys;
}
var childProcess = require('child_process');
module.exports.execute = function (command, args, options) {
var spawnOptions = { shell: true };
var spawnOptions = {shell: true};
if (options && options.cwd) {

@@ -14,4 +14,8 @@ spawnOptions.cwd = options.cwd;

var proc = childProcess.spawn(command, args, spawnOptions);
proc.stdout.on('data', function (data) { stdout = stdout + data; });
proc.stderr.on('data', function (data) { stderr = stderr + data; });
proc.stdout.on('data', function (data) {
stdout = stdout + data;
});
proc.stderr.on('data', function (data) {
stderr = stderr + data;
});

@@ -18,0 +22,0 @@ proc.on('close', function (code) {

@@ -1,6 +0,2 @@

exports.parse = function (lines, marker) {
var populatefn = populatefn || function (obj) { return obj; };
marker = marker || '\t';
exports.parse = function (lines) {
function addHiddenProperties(scope, props) {

@@ -7,0 +3,0 @@ for (var p in props) {

@@ -12,6 +12,6 @@ {

"test": "npm run lint && npm run test-functional",
"lint": "jscs `find ./lib -name '*.js'` -v && jscs `find ./test -name '*.js'` -v",
"test-functional": "tap `find ./test/functional -name '*.test.js'`",
"test-system": "tap --timeout=300 `find ./test/system -name '*.test.js'`",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
"lint": "eslint -c .eslintrc lib test",
"test-functional": "tap -R spec ./test/functional/*.test.js",
"test-system": "tap -R spec --timeout=300 ./test/system/*.test.js",
"semantic-release": "semantic-release"
},

@@ -21,12 +21,12 @@ "author": "snyk.io",

"dependencies": {
"debug": "^2.2.0"
"debug": "^3.1.0"
},
"devDependencies": {
"jscs": "^3.0.7",
"semantic-release": "^6.3.6",
"eslint": "^4.11.0",
"semantic-release": "^15",
"sinon": "^2.4.1",
"tap": "^10.7.0",
"tap": "^12.0.1",
"tap-only": "0.0.5"
},
"version": "1.3.0"
}
"version": "1.3.1"
}
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