Commit b24df5b
authored
Make the Adoptopenjdk package type look at the Temurin repo first for latest assets (#522)
* Make the Adoptopenjdk package type look at the Temurin repo first for latest assets
* Address Copilot code review comments
- Use strict equality (===, !==) instead of loose equality (==, !=) for all comparisons
- Properly handle caught errors with instanceof type narrowing before accessing properties
- Only fall back to legacy AdoptOpenJDK for specific version-not-found errors
- Rethrow unexpected errors to avoid masking real issues (network failures, rate limits, etc.)
- Fix error message check to match actual error text ('No matching version found')
- Remove unnecessary undefined check since method return type is never undefined
- Add @internal JSDoc annotation to TemurinDistribution.findPackageForDownload()
- Update tests to properly mock Temurin lookup failures for fallback behavior testing
- Rebuild dist files
* Always fall back to legacy AdoptOpenJDK but log all Temurin failures
- Change error handling to gracefully fall back for all errors, not just version-not-found
- Log version-not-found errors as notices with migration guidance
- Log other Temurin failures as debug messages for troubleshooting
- Improves resilience: users always get a result even if Temurin API has issues
- Maintains visibility: failures are still logged for debugging
* Fixes from review
* Fixes from review
* Fixes from review
* Regenerate dist1 parent 43120bc commit b24df5b
6 files changed
Lines changed: 163 additions & 20 deletions
File tree
- __tests__/distributors
- dist/setup
- src/distributions
- adopt
- temurin
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
256 | 257 | | |
257 | 258 | | |
258 | 259 | | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
259 | 292 | | |
260 | 293 | | |
261 | 294 | | |
| |||
278 | 311 | | |
279 | 312 | | |
280 | 313 | | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
281 | 319 | | |
282 | 320 | | |
283 | 321 | | |
| |||
293 | 331 | | |
294 | 332 | | |
295 | 333 | | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
296 | 339 | | |
297 | 340 | | |
298 | 341 | | |
| |||
309 | 352 | | |
310 | 353 | | |
311 | 354 | | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
312 | 360 | | |
313 | 361 | | |
314 | 362 | | |
| |||
325 | 373 | | |
326 | 374 | | |
327 | 375 | | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
328 | 381 | | |
329 | 382 | | |
330 | 383 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77815 | 77815 | | |
77816 | 77816 | | |
77817 | 77817 | | |
| 77818 | + | |
77818 | 77819 | | |
77819 | 77820 | | |
77820 | 77821 | | |
77821 | 77822 | | |
77822 | 77823 | | |
77823 | 77824 | | |
77824 | | - | |
| 77825 | + | |
77825 | 77826 | | |
77826 | 77827 | | |
| 77828 | + | |
| 77829 | + | |
| 77830 | + | |
| 77831 | + | |
| 77832 | + | |
| 77833 | + | |
| 77834 | + | |
| 77835 | + | |
| 77836 | + | |
77827 | 77837 | | |
77828 | 77838 | | |
| 77839 | + | |
| 77840 | + | |
| 77841 | + | |
| 77842 | + | |
| 77843 | + | |
| 77844 | + | |
| 77845 | + | |
| 77846 | + | |
| 77847 | + | |
| 77848 | + | |
| 77849 | + | |
| 77850 | + | |
| 77851 | + | |
| 77852 | + | |
| 77853 | + | |
| 77854 | + | |
| 77855 | + | |
| 77856 | + | |
| 77857 | + | |
| 77858 | + | |
| 77859 | + | |
| 77860 | + | |
| 77861 | + | |
| 77862 | + | |
| 77863 | + | |
| 77864 | + | |
| 77865 | + | |
77829 | 77866 | | |
77830 | 77867 | | |
77831 | 77868 | | |
| |||
78223 | 78260 | | |
78224 | 78261 | | |
78225 | 78262 | | |
78226 | | - | |
| 78263 | + | |
| 78264 | + | |
| 78265 | + | |
78227 | 78266 | | |
78228 | 78267 | | |
78229 | 78268 | | |
| |||
80195 | 80234 | | |
80196 | 80235 | | |
80197 | 80236 | | |
| 80237 | + | |
| 80238 | + | |
| 80239 | + | |
80198 | 80240 | | |
80199 | 80241 | | |
80200 | 80242 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| 32 | + | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | | - | |
| 36 | + | |
| 37 | + | |
34 | 38 | | |
35 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
36 | 57 | | |
37 | 58 | | |
38 | 59 | | |
39 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
40 | 98 | | |
41 | 99 | | |
42 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
296 | 298 | | |
297 | 299 | | |
298 | 300 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| |||
0 commit comments