Skip to content

Accept Temurin four field versions with build metadata - #1271

Open
Hashim1999164 wants to merge 1 commit into
actions:mainfrom
Hashim1999164:fix/temurin-four-field-semver
Open

Hashim1999164 wants to merge 1 commit into
actions:mainfrom
Hashim1999164:fix/temurin-four-field-semver

Conversation

@Hashim1999164

Copy link
Copy Markdown

Fixes #1270

Temurin publishes versions like 26.0.2.1+1. normalizeVersion only rewrote pure four field strings (e.g. 18.0.1.1), so those values failed the SemVer check on setup-java 6.x.

convertVersionToSemver now folds the extra numeric fields into SemVer build metadata and keeps any existing +build suffix (26.0.2.1+1 -> 26.0.2+1.1). normalizeVersion matches the same pattern.

Test plan

  • npm test -- --testPathPatterns=util.test --coverage=false
  • npm test -- --testPathPatterns=base-installer.test --testNamePattern=normalizeVersion --coverage=false
  • npm run build

normalizeVersion only converted pure four field versions like 18.0.1.1, so Temurin strings such as 26.0.2.1+1 failed the SemVer check. Fold the extra fields into build metadata and keep any existing +build suffix.
@Hashim1999164
Hashim1999164 requested a review from a team as a code owner September 18, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Temurin version incorrectly converted for setup-java 6.0.x

1 participant