| 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: 10b8fe1e-18f4-42cb-8672-11215715a713
There was a problem hiding this comment.
This PR centralizes and hardens java-package validation by introducing a single distribution→package capability registry, then using it to validate requested package types (and the Temurin jdk+jmods + version constraint) before installer selection. It also aligns the published action contract (action metadata + docs) and adds contract-style tests to keep docs, metadata, and E2E matrices consistent with the registry.
Changes:
| File | Description |
|---|---|
| src/distributions/package-types.ts | Introduces the typed distribution/package registry and validation logic (including Temurin jdk+jmods version constraint). |
| src/distributions/distribution-factory.ts | Calls centralized package validation before constructing an installer; removes the previous special-case jdk+jmods check. |
| README.md | Updates java-package documentation to reflect all supported variants and points readers to the compatibility table. |
| docs/advanced-usage.md | Updates the package compatibility section wording and clarifies jdkfile validation behavior. |
| action.yml | Expands the java-package input description to include JetBrains variants and clarifies per-distribution support. |
| tests/java-package-contract.test.ts | Adds contract tests to keep action.yml, README, advanced docs, and E2E matrices aligned with the registry. |
| tests/distributors/distribution-factory.test.ts | Adds table-driven acceptance/rejection tests for package validation and Temurin jdk+jmods version gating. |
| dist/setup/index.js | Updates the bundled distribution output to include the new package-types module and validation behavior. |
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tests/java-package-contract.test.ts:72
const includedPackages = workflow.matchAll(
/- distribution: '([^']+)'\s*\n\s*java-package: ([^\s]+)/g
);
Sorry, something went wrong.
| const defaultMatrix = workflow.match( | ||
| /distribution:\s*\n\s*\[([^\]]+)\]\s*\n\s*java-package:\s*\['([^']+)'\]/ | ||
| ); |
| Back | FazBrowse Home | New Git URL |
Description:
java-package values were interpreted inconsistently across distributions, allowing typos to select a default artifact or fail only after cache or network work. This change introduces one typed capability registry and validates distribution, package, and Temurin JMOD version combinations before installer construction.
The same registry now drives table-based behavior tests and contract checks for action metadata, README guidance, the advanced compatibility table, and E2E package combinations. The published contract includes the JetBrains JCEF and FreeType variants, jdkfile is restricted to jdk, and the generated setup bundle is updated.
Related issue:
Fixes: #1164
Check list: