-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add adoptium java datasource (#11055)
* feat: add adoptium datasource * docs: fix lint
- Loading branch information
Showing
8 changed files
with
485 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"versions": [ | ||
{ | ||
"build": 7, | ||
"major": 16, | ||
"minor": 0, | ||
"openjdk_version": "16.0.2+7", | ||
"security": 2, | ||
"semver": "16.0.2+7" | ||
}, | ||
{ | ||
"build": 7, | ||
"major": 11, | ||
"minor": 0, | ||
"openjdk_version": "11.0.12+7", | ||
"security": 12, | ||
"semver": "11.0.12+7" | ||
}, | ||
{ | ||
"build": 8, | ||
"major": 8, | ||
"minor": 0, | ||
"openjdk_version": "1.8.0_302-b08", | ||
"security": 302, | ||
"semver": "8.0.302+8" | ||
} | ||
] | ||
} |
278 changes: 278 additions & 0 deletions
278
lib/datasource/adoptium-java/__snapshots__/index.spec.ts.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,278 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`datasource/adoptium-java/index getReleases pages 1`] = ` | ||
Object { | ||
"homepage": "https://adoptium.net", | ||
"registryUrl": "https://api.adoptium.net/", | ||
"releases": Array [ | ||
Object { | ||
"version": "1.1.0", | ||
}, | ||
Object { | ||
"version": "1.2.0", | ||
}, | ||
Object { | ||
"version": "1.3.0", | ||
}, | ||
Object { | ||
"version": "1.4.0", | ||
}, | ||
Object { | ||
"version": "1.5.0", | ||
}, | ||
Object { | ||
"version": "1.6.0", | ||
}, | ||
Object { | ||
"version": "1.7.0", | ||
}, | ||
Object { | ||
"version": "1.8.0", | ||
}, | ||
Object { | ||
"version": "1.9.0", | ||
}, | ||
Object { | ||
"version": "1.10.0", | ||
}, | ||
Object { | ||
"version": "1.11.0", | ||
}, | ||
Object { | ||
"version": "1.12.0", | ||
}, | ||
Object { | ||
"version": "1.13.0", | ||
}, | ||
Object { | ||
"version": "1.14.0", | ||
}, | ||
Object { | ||
"version": "1.15.0", | ||
}, | ||
Object { | ||
"version": "1.16.0", | ||
}, | ||
Object { | ||
"version": "1.17.0", | ||
}, | ||
Object { | ||
"version": "1.18.0", | ||
}, | ||
Object { | ||
"version": "1.19.0", | ||
}, | ||
Object { | ||
"version": "1.20.0", | ||
}, | ||
Object { | ||
"version": "1.21.0", | ||
}, | ||
Object { | ||
"version": "1.22.0", | ||
}, | ||
Object { | ||
"version": "1.23.0", | ||
}, | ||
Object { | ||
"version": "1.24.0", | ||
}, | ||
Object { | ||
"version": "1.25.0", | ||
}, | ||
Object { | ||
"version": "1.26.0", | ||
}, | ||
Object { | ||
"version": "1.27.0", | ||
}, | ||
Object { | ||
"version": "1.28.0", | ||
}, | ||
Object { | ||
"version": "1.29.0", | ||
}, | ||
Object { | ||
"version": "1.30.0", | ||
}, | ||
Object { | ||
"version": "1.31.0", | ||
}, | ||
Object { | ||
"version": "1.32.0", | ||
}, | ||
Object { | ||
"version": "1.33.0", | ||
}, | ||
Object { | ||
"version": "1.34.0", | ||
}, | ||
Object { | ||
"version": "1.35.0", | ||
}, | ||
Object { | ||
"version": "1.36.0", | ||
}, | ||
Object { | ||
"version": "1.37.0", | ||
}, | ||
Object { | ||
"version": "1.38.0", | ||
}, | ||
Object { | ||
"version": "1.39.0", | ||
}, | ||
Object { | ||
"version": "1.40.0", | ||
}, | ||
Object { | ||
"version": "1.41.0", | ||
}, | ||
Object { | ||
"version": "1.42.0", | ||
}, | ||
Object { | ||
"version": "1.43.0", | ||
}, | ||
Object { | ||
"version": "1.44.0", | ||
}, | ||
Object { | ||
"version": "1.45.0", | ||
}, | ||
Object { | ||
"version": "1.46.0", | ||
}, | ||
Object { | ||
"version": "1.47.0", | ||
}, | ||
Object { | ||
"version": "1.48.0", | ||
}, | ||
Object { | ||
"version": "1.49.0", | ||
}, | ||
Object { | ||
"version": "1.50.0", | ||
}, | ||
], | ||
} | ||
`; | ||
|
||
exports[`datasource/adoptium-java/index getReleases pages 2`] = ` | ||
Array [ | ||
Object { | ||
"headers": Object { | ||
"accept": "application/json", | ||
"accept-encoding": "gzip, deflate, br", | ||
"host": "api.adoptium.net", | ||
"user-agent": "RenovateBot/0.0.0-semantic-release (https://github.com/renovatebot/renovate)", | ||
}, | ||
"method": "GET", | ||
"url": "https://api.adoptium.net/v3/release_versions?page_size=50&project=jdk&release_type=ga&sort_method=DATE&sort_order=DESC&vendor=adoptium&page=0", | ||
}, | ||
Object { | ||
"headers": Object { | ||
"accept": "application/json", | ||
"accept-encoding": "gzip, deflate, br", | ||
"host": "api.adoptium.net", | ||
"user-agent": "RenovateBot/0.0.0-semantic-release (https://github.com/renovatebot/renovate)", | ||
}, | ||
"method": "GET", | ||
"url": "https://api.adoptium.net/v3/release_versions?page_size=50&project=jdk&release_type=ga&sort_method=DATE&sort_order=DESC&vendor=adoptium&page=1", | ||
}, | ||
] | ||
`; | ||
|
||
exports[`datasource/adoptium-java/index getReleases processes real data 1`] = ` | ||
Object { | ||
"homepage": "https://adoptium.net", | ||
"registryUrl": "https://api.adoptium.net/", | ||
"releases": Array [ | ||
Object { | ||
"version": "8.0.302+8", | ||
}, | ||
Object { | ||
"version": "11.0.12+7", | ||
}, | ||
Object { | ||
"version": "16.0.2+7", | ||
}, | ||
], | ||
} | ||
`; | ||
|
||
exports[`datasource/adoptium-java/index getReleases processes real data 2`] = ` | ||
Array [ | ||
Object { | ||
"headers": Object { | ||
"accept": "application/json", | ||
"accept-encoding": "gzip, deflate, br", | ||
"host": "api.adoptium.net", | ||
"user-agent": "RenovateBot/0.0.0-semantic-release (https://github.com/renovatebot/renovate)", | ||
}, | ||
"method": "GET", | ||
"url": "https://api.adoptium.net/v3/release_versions?page_size=50&project=jdk&release_type=ga&sort_method=DATE&sort_order=DESC&vendor=adoptium&page=0", | ||
}, | ||
] | ||
`; | ||
|
||
exports[`datasource/adoptium-java/index getReleases returns null for 404 1`] = ` | ||
Array [ | ||
Object { | ||
"headers": Object { | ||
"accept": "application/json", | ||
"accept-encoding": "gzip, deflate, br", | ||
"host": "api.adoptium.net", | ||
"user-agent": "RenovateBot/0.0.0-semantic-release (https://github.com/renovatebot/renovate)", | ||
}, | ||
"method": "GET", | ||
"url": "https://api.adoptium.net/v3/release_versions?page_size=50&project=jdk&release_type=ga&sort_method=DATE&sort_order=DESC&vendor=adoptium&page=0", | ||
}, | ||
] | ||
`; | ||
|
||
exports[`datasource/adoptium-java/index getReleases returns null for empty 200 OK 1`] = ` | ||
Array [ | ||
Object { | ||
"headers": Object { | ||
"accept": "application/json", | ||
"accept-encoding": "gzip, deflate, br", | ||
"host": "api.adoptium.net", | ||
"user-agent": "RenovateBot/0.0.0-semantic-release (https://github.com/renovatebot/renovate)", | ||
}, | ||
"method": "GET", | ||
"url": "https://api.adoptium.net/v3/release_versions?page_size=50&project=jdk&release_type=ga&sort_method=DATE&sort_order=DESC&vendor=adoptium&page=0", | ||
}, | ||
] | ||
`; | ||
|
||
exports[`datasource/adoptium-java/index getReleases throws for 5xx 1`] = ` | ||
Array [ | ||
Object { | ||
"headers": Object { | ||
"accept": "application/json", | ||
"accept-encoding": "gzip, deflate, br", | ||
"host": "api.adoptium.net", | ||
"user-agent": "RenovateBot/0.0.0-semantic-release (https://github.com/renovatebot/renovate)", | ||
}, | ||
"method": "GET", | ||
"url": "https://api.adoptium.net/v3/release_versions?page_size=50&project=jdk&release_type=ga&sort_method=DATE&sort_order=DESC&vendor=adoptium&page=0", | ||
}, | ||
] | ||
`; | ||
|
||
exports[`datasource/adoptium-java/index getReleases throws for error 1`] = ` | ||
Array [ | ||
Object { | ||
"headers": Object { | ||
"accept": "application/json", | ||
"accept-encoding": "gzip, deflate, br", | ||
"host": "api.adoptium.net", | ||
"user-agent": "RenovateBot/0.0.0-semantic-release (https://github.com/renovatebot/renovate)", | ||
}, | ||
"method": "GET", | ||
"url": "https://api.adoptium.net/v3/release_versions?page_size=50&project=jdk&release_type=ga&sort_method=DATE&sort_order=DESC&vendor=adoptium&page=0", | ||
}, | ||
] | ||
`; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Api page size limit 50 | ||
export const pageSize = 50; | ||
|
||
export const defaultRegistryUrl = 'https://api.adoptium.net/'; | ||
|
||
export const datasource = 'adoptium-java'; |
Oops, something went wrong.