Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion gradle.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export const getGradleDependenciesWithVersions = async (parsedGradle) => {
export const getGradleSpringBootVersion = async (parsedGradle) => {
const springBootPlugin = parsedGradle?.plugins?.filter(plugin => plugin.id === 'org.springframework.boot');
if (Array.isArray(springBootPlugin) && springBootPlugin.length && springBootPlugin[0].version) {
return springBootPlugin[0].version;
// Handle build.gradle, which allows 3.2.+ format
return springBootPlugin[0].version.replace('+', 'x');
}
console.log('No Spring Boot version found.');
return '';
Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "spring-boot-dependency-checker",
"version": "0.2.5",
"version": "0.3.0",
"description": "Spring Boot Dependency Checker - validate that you're using the versions Spring Boot has approved with your project.",
"keywords": [
"spring boot",
Expand All @@ -26,7 +26,7 @@
},
"dependencies": {
"fast-xml-parser": "^4.3.6",
"gradle-to-js": "^2.0.1",
"gradle-to-js": "github:mrbusche/gradle-to-js#8960d1c3f9dab922c9545289abf7b29b25a26f54",
"node-html-parser": "6.1.13"
},
"devDependencies": {
Expand Down
6 changes: 4 additions & 2 deletions pom.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,10 @@ const downloadSpringVersionProperties = async (springBootVersion) => {
let url = `https://docs.spring.io/spring-boot/docs/${springBootVersion}/reference/html/dependency-versions.html`;
let bodyIndex = 1;
let response = await fetch(url);
if (response.status === 404) {
url = `https://docs.spring.io/spring-boot/${springBootVersion}/appendix/dependency-versions/properties.html`;
// Handle new Spring Boot URL, count redirects as failures, and handle 3.3.+ gradle format
if (response.status === 404 || response.url.includes('redirect.html')) {
const springMinorVersion = springBootVersion.replace('.x', '');
url = `https://docs.spring.io/spring-boot/${springMinorVersion}/appendix/dependency-versions/properties.html`;
bodyIndex = 0;
response = await fetch(url);
}
Expand Down
6 changes: 4 additions & 2 deletions shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ const getSpringDefaultVersions = async (springBootVersion) => {
const downloadSpringDefaultVersions = async (springBootVersion) => {
let url = `https://docs.spring.io/spring-boot/docs/${springBootVersion}/reference/html/dependency-versions.html`;
let response = await fetch(url);
if (response.status === 404) {
url = `https://docs.spring.io/spring-boot/${springBootVersion}/appendix/dependency-versions/coordinates.html`;
// Handle new Spring Boot URL, count redirects as failures, and handle 3.3.+ gradle format
if (response.status === 404 || response.url.includes('redirect.html')) {
const springMinorVersion = springBootVersion.replace('.x', '');
url = `https://docs.spring.io/spring-boot/${springMinorVersion}/appendix/dependency-versions/coordinates.html`;
response = await fetch(url);
}
const versions = [];
Expand Down