Socket
Socket
Sign inDemoInstall

snyk-mvn-plugin

Package Overview
Dependencies
Maintainers
1
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snyk-mvn-plugin - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

26

lib/index.js

@@ -18,9 +18,21 @@ var parse = require('./parse-mvn');

.then(function (result) {
return {
plugin: {
name: 'bundled:maven',
runtime: 'unknown',
},
package: parse(result, options.dev),
};
var parseResult = {};
try {
parseResult = parse(result, options.dev);
} catch (error) {
console.log('\nAn unknown error occurred. ' +
'Please include the trace below when reporting to Snyk:', error, '\n');
return Promise.reject('');
}
if (parseResult.ok) {
return {
plugin: {
name: 'bundled:maven',
runtime: 'unknown',
},
package: parseResult.data,
};
}
return Promise.reject(parseResult.message ||
'An internal error has occured. Please contact Snyk for support.');
});

@@ -27,0 +39,0 @@ }

@@ -9,6 +9,16 @@ module.exports = parseTree;

// Parse the output from 'mvn dependency:tree -DoutputType=dot'
// Requires Maven >= 2.2
function parseTree(text, withDev) {
text = text.replace(logLabel, '');
return getRootProject(text, withDev);
try {
return {
ok: true,
data: getRootProject(text, withDev),
};
} catch (error) {
return {
ok: false,
message: error.message,
error: error,
};
}
}

@@ -18,2 +28,7 @@

var projects = text.match(digraph);
if (!projects) {
throw new Error('Error: Cannot find dependency information. ' +
'Please make sure that Apache Maven Dependency Plugin ' +
'version 2.2 or above is installed.');
}
var root = getProject(projects[0], null, withDev);

@@ -20,0 +35,0 @@ // Add any subsequent projects to the root as dependencies

@@ -26,3 +26,3 @@ {

},
"version": "1.0.1"
"version": "1.0.2"
}
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