Support jdk-prefixed Java versions and exact abbreviated builds - #1281
Closed
brunoborges wants to merge 1 commit into
Closed
brunoborges wants to merge 1 commit into
brunoborges wants to merge 1 commit into
Conversation
Normalize jdk-prefixed numeric versions and pad abbreviated build requests so exact build constraints survive version matching. Keep platform and package validation consistent, document the syntax, and add regression coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The normalization behavior is consistently integrated, documented, tested, and reflected in generated runtime bundles.
Review effort: Balanced
Findings: None
What changed in this PR
Adds support for jdk--prefixed Java versions and exact abbreviated build matching.
Changes:
- Normalizes release tags such as
jdk-27+35to27.0.0+35. - Applies normalization to platform/package validation and resolution.
- Adds documentation, regression tests, and regenerated bundles.
| File | Description |
|---|---|
src/util.ts |
Extends shared version normalization. |
src/distributions/platform-types.ts |
Normalizes versions during compatibility checks. |
src/distributions/base-installer.ts |
Uses normalization during installer validation. |
README.md |
Documents supported release-tag syntax. |
__tests__/util.test.ts |
Tests normalization cases. |
__tests__/java-platform-contract.test.ts |
Tests architecture restrictions. |
__tests__/distributors/temurin-installer.test.ts |
Tests exact Temurin build resolution. |
__tests__/distributors/distribution-factory.test.ts |
Tests package and distribution handling. |
__tests__/distributors/base-installer.test.ts |
Tests validation and tool-cache matching. |
dist/setup/index.js |
Regenerates the setup bundle. |
dist/setup/242.index.js |
Regenerates the installer chunk. |
dist/cleanup/index.js |
Regenerates the cleanup bundle. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Author
|
Closing without merging: java-version expects a version number or supported version range, not a vendor release tag with a jdk- prefix. The reported input is a configuration issue and does not require expanding the accepted syntax. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
java-version: jdk-27+35currently fails validation before Temurin release discovery. Simply removingjdk-is insufficient: SemVer treats27+35as a major-version range and ignores the requested build.Normalize numeric Java release tags in the shared helper, mapping
jdk-27+35,27+35, and27.0+35to27.0.0+35for exact-build matching. Versions without build metadata retain their range semantics. Reuse normalization in platform validation so prefixed inputs cannot bypass compatibility restrictions; package selection and existing early-access handling remain unchanged.Adds regression coverage for normalization, competing and missing builds, tool-cache matching, malformed inputs, and package/platform restrictions. Updates supported-version documentation and regenerates action bundles. Release availability is not asserted; resolution tests use mocked metadata.
Validation:
npm run checkpassed (format, lint, build, and all 45 test suites / 1,575 tests).npx tsc --noEmitpassed.Related issue:
Fixes: #1280
Check list:
npm run checklocally (format, lint, build, test) and all checks pass.