| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 10e35b75-928f-4ef7-984e-605895c5d88e
There was a problem hiding this comment.
This pull request centralizes OS/architecture capability validation for Java distributions, normalizes architecture aliases consistently, and updates installers/tests/docs so unsupported platform combinations fail early (before cache lookup or network calls).
Changes:
| File | Description |
|---|---|
| src/distributions/platform-types.ts | Introduces shared platform capability matrices, arch alias normalization, and centralized validation logic. |
| src/distributions/distribution-factory.ts | Validates package + platform earlier and passes normalized architecture into installer construction. |
| src/distributions/base-installer.ts | Normalizes architecture at the base level and simplifies default distribution architecture mapping. |
| src/distributions/adopt/installer.ts | Translates canonical armv7 to vendor arm. |
| src/distributions/temurin/installer.ts | Translates canonical armv7 to vendor arm. |
| src/distributions/corretto/installer.ts | Translates canonical armv7 to vendor arm. |
| src/distributions/zulu/installer.ts | Extends vendor mapping to translate canonical armv7 to vendor arm. |
| tests/java-platform-contract.test.ts | Adds contract tests to keep capability tables aligned with docs and consistent diagnostics. |
| tests/distributors/distribution-factory.test.ts | Updates factory tests to reflect platform validation and normalized architecture behavior. |
| tests/distributors/adopt-installer.test.ts | Updates normalization expectations for ARM-related cases. |
| tests/distributors/temurin-installer.test.ts | Updates normalization expectations for ARM-related cases. |
| tests/distributors/corretto-installer.test.ts | Adds coverage ensuring canonical vs vendor architecture values remain distinct. |
| docs/advanced-usage.md | Documents the up-front platform/architecture compatibility matrix and validation behavior. |
| README.md | Updates architecture input documentation and alias normalization description. |
| action.yml | Updates the architecture input description to reflect canonical values + aliases. |
| .github/workflows/e2e-versions.yml | Adds an E2E assertion that an unsupported combination is rejected. |
| dist/setup/index.js | Rebuilt bundled output to include the new platform validation logic. |
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/distributions/platform-types.ts:112
windows: ['x64', {architecture: 'x86', versionRange: '<=11'}]
src/distributions/platform-types.ts:45
linux: [...STANDARD_LINUX, {architecture: 'armv7', versionRange: '<=17'}],
src/distributions/platform-types.ts:59
linux: [...STANDARD_LINUX, {architecture: 'armv7', versionRange: '<=17'}],
src/distributions/platform-types.ts:230
const capability = JAVA_PLATFORM_CAPABILITIES[distributionName];
if ('unrestricted' in capability) {
return normalizedArchitecture;
}
Sorry, something went wrong.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 10e35b75-928f-4ef7-984e-605895c5d88e
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
This makes platform compatibility checks deterministic and consistent across distributions, so unsupported OS/architecture requests fail before cache lookup or vendor network calls. It addresses drift risk by moving capability rules into a shared contract that tests and docs can validate.
What changed
Notes
Fixes: #1176