refactor(java-version): extract adoptium HTTP logic from datasource class#42604
Open
zeitlinger wants to merge 3 commits intorenovatebot:mainfrom
Open
refactor(java-version): extract adoptium HTTP logic from datasource class#42604zeitlinger wants to merge 3 commits intorenovatebot:mainfrom
zeitlinger wants to merge 3 commits intorenovatebot:mainfrom
Conversation
…lass Move getPageReleases and the Adoptium fetch logic out of the JavaVersionDatasource class into a standalone adoptium.ts module. This makes the code easier to test in isolation and decouples Adoptium-specific logic from the datasource class. No behavior change — customRegistrySupport remains false, and the hardcoded adoptiumRegistryUrl replaces the previously injected defaultRegistryUrl (which was always the same value).
17 tasks
viceice
reviewed
Apr 14, 2026
| it('re-throws non-HttpError', async () => { | ||
| const mockHttp = { | ||
| getJsonUnchecked: vi.fn().mockRejectedValue(new Error('unexpected')), | ||
| } as unknown as Http; |
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.
Summary
getPageReleasesand the Adoptium fetch loop out of theJavaVersionDatasourceclass into a standaloneadoptium.tsmoduleadoptiumRegistryUrlfromadoptium.ts(same value as the previousdefaultRegistryUrlincommon.ts)customRegistrySupportremainsfalseMotivation
Prerequisite refactor for #40497 (feat: add GraalVM version datasource), requested by @viceice to keep the GraalVM PR focused on new functionality.
Test plan
getAdoptiumReleasesunit test covers the non-HttpError re-throw path