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: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const getSpringBootVersion = async (components) => {

const getDefaultSpringBootComponents = async (filename) => {
await getSpringDefaultVersions(filename);
return getJsonFromFile(`${cachePath}/${filename}.json`);
return getJsonFromFile(`${cachePath}/dependencies_${filename}.json`);
};

export const retrieveSimilarPackages = async (bomFile) => {
Expand Down Expand Up @@ -63,7 +63,7 @@ export const retrieveSimilarPackages = async (bomFile) => {
const getSpringDefaultVersions = async (sbVersion) => {
try {
await ensureDirExists();
if (!existsSync(`${cachePath}/${sbVersion}.json`)) {
if (!existsSync(`${cachePath}/dependencies_${sbVersion}.json`)) {
await downloadSpringDefaultVersions(sbVersion);
} else {
console.log('Spring Boot default versions file already exists in cache.');
Expand All @@ -89,11 +89,11 @@ const downloadSpringDefaultVersions = async (sbVersion) => {
name: child.childNodes[3].rawText,
version: child.childNodes[5].rawText,
}));
await writeFileSync(`${cachePath}/${sbVersion}.json`, JSON.stringify(versions, null, 2));
await writeFileSync(`${cachePath}/dependencies_${sbVersion}.json`, JSON.stringify(versions, null, 2));
break;
}
case 404:
await writeFileSync(`${cachePath}/${sbVersion}.json`, JSON.stringify(versions, null, 2));
await writeFileSync(`${cachePath}/dependencies_${sbVersion}.json`, JSON.stringify(versions, null, 2));
console.log('URL not found - Spring Boot default versions URL no longer exists.');
break;
}
Expand Down