Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions pom.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,15 @@ const getSpringBootProperties = async (filename) => {
};

export const getPomDependenciesWithVersions = async (parsedPom) => {
let allDependencies = [];
// if it's not an array, a single dependency has been declared and it doesn't apply
if (Array.isArray(parsedPom?.project?.dependencies?.dependency)) {
return parsedPom.project.dependencies.dependency.filter(dep => dep.version);
allDependencies = allDependencies.concat(parsedPom.project.dependencies.dependency.filter(dep => dep.version));
}
return [];
if (Array.isArray(parsedPom?.project?.dependencyManagement?.dependencies?.dependency)) {
allDependencies = allDependencies.concat(parsedPom.project.dependencyManagement.dependencies.dependency.filter(dep => dep.version));
}
return allDependencies;
};

export const getPomSpringBootVersion = async (parsedPom) => {
Expand Down