Commit Graph

27 Commits

Author SHA1 Message Date
Sebastian Poxhofer 290f5dcff3 refactor(datasource): normalise github getDigest signatures (#46187) 2026-10-07 07:07:07 +00:00
Sebastian Poxhofer f03acf6cd7 refactor(datasource): derive github-release-attachments from github-releases (#46186)
* refactor(datasource): derive github-release-attachments from github-releases

* refactor(datasource): keep the github-releases id readonly and inherit its timestamp note
2026-10-07 07:07:06 +00:00
Sebastian Poxhofer ee0e84f775 refactor(datasource): pass the http client through the Datasource constructor (#46108) 2026-10-07 07:07:03 +00:00
Gregor Zeitlinger 0d9888a4f2 feat(datasource): add GraalVM version datasource (#40497)
* feat(datasource): add GraalVM version datasource with support for JDK and JRE releases

* feat(datasource): add GraalVM version datasource with support for JDK and JRE releases

* feat(datasource): add GraalVM version datasource with support for JDK and JRE releases

* feat(datasource): add GraalVM version datasource with support for JDK and JRE releases

* feat(datasource): add GraalVM version datasource with support for JDK and JRE releases

* add coverage

* fix

* fix

* fix

* code cov

* code cov

* code cov

* refactor(datasource): integrate GraalVM into java-version datasource

Merges graalvm-version datasource into java-version as a unified multi-vendor
Java distribution datasource. Implements vendor-based modular architecture with
routing layer for Adoptium (Eclipse Temurin) and Oracle GraalVM.

Architecture:
- Vendor-specific handlers (adoptium.ts, graalvm.ts) with routing in index.ts
- Vendor-aware system detection with different arch/os mappings per vendor
- Custom registry support for GraalVM's mise-java API
- Adoptium remains the default registry for backwards compatibility

Package names:
- New explicit: adoptium-jdk, adoptium-jre, oracle-graalvm-jdk, oracle-graalvm-jre
- Legacy (map to Adoptium): java, java-jdk, java-jre

Changes:
- Created adoptium.ts and graalvm.ts vendor handlers
- Enhanced common.ts with vendor detection and vendor-specific system mappings
- Updated index.ts with routing layer and custom registry support
- Merged test suites with comprehensive coverage for both vendors
- Updated mise manager integration to use JavaVersionDatasource
- Removed graalvm-version datasource directory

All 65 datasource tests and 93 mise manager tests passing.

* fix

* test(datasource): add coverage for non-HttpError paths in java-version

* fix(datasource): remove dead code and add coverage for java-version

Remove unreachable HttpError handling from _getReleases catch block
since both getAdoptiumReleases and getGraalvmReleases handle HttpError
internally. Add test for the graalvmRegistryUrl fallback when
registryUrl is undefined.

* fix(datasource): address review comments for GraalVM datasource

- Remove unused 'datasource-graalvm-version' cache namespace
- Convert MiseJavaRelease interface to Zod schema and derive type from it
- Use http.getJson() with the Zod schema in getGraalvmReleases instead
  of getJsonUnchecked, letting the schema handle invalid/empty responses
- Update getGraalvmReleases test mock to use getJson

* docs: remove unused datasource-graalvm-version from cacheTtlOverride docs

* fix(datasource): preserve Adoptium config typing

* fix(datasource): harden GraalVM release parsing

* fix(datasource): address GraalVM review feedback

* test: cover GraalVM mise package mapping

* test(datasource): cover default GraalVM registry fallback

* test(datasource): cover legacy registry resolution

* test(datasource): type legacy datasource mocks

* fix(datasource): harden GraalVM defaults and responses

* refactor(datasource): use function-only registry accessors

* test(datasource): cover registry accessor functions

* test: restore coverage exclusions

* chore: retrigger CI checks
2026-09-23 08:40:24 +00:00
Sebastian Poxhofer 5ad36a2387 test(linters): add linting rule to enforce usage of host rules test util (#44692)
* ci(linter): add renovate/no-host-rules-mock rule

Flags vi.mock()/vi.doMock() calls whose module specifier contains
"host-rules" in spec files. Tests should configure real rules via
hostRules.add() instead of mocking the host-rules module.

Enabled at "warn" severity instead of "error": the repo currently has
35 pre-existing violations across 34 spec files, which exceeds the
agreed fix threshold of 12 files. No violation fixes are included;
migrating each spec to real hostRules.add()/clear() setup is a
semantic test rewrite that should be done incrementally, after which
the rule can be promoted to "error".

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* ci(linter): enforce renovate/no-host-rules-mock at error

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test(datasource): use real host-rules instead of mocking

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test(manager): use real host-rules instead of mocking

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test(platform): use real host-rules instead of mocking

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test(util,workers): use real host-rules instead of mocking

Also narrow renovate/no-host-rules-mock to the host-rules module itself so that mocking e.g. host-rules-from-env is not flagged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* ci(linter): mention '~test/host-rules.ts' util in no-host-rules-mock message

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 10:36:12 +00:00
Sergei Zharinov 9d857c1f68 refactor(lint): Organize imports with biome (#40966) 2026-02-06 13:40:01 +00:00
Sergei Zharinov c07814ca4d refactor: Remove decorators for ESM compatibility (#40736)
* refactor: Migrate to decorator alternatives

* refactor: Remove decorators

* Fixes

* build: Remove decorator support from build pipeline

* fix: Remove extra brace in cdnjs getDigest cache key
2026-01-28 13:22:53 +00:00
Sergei Zharinov c5b0a74f82 refactor: Remove constructor parameter properties (#40712) 2026-01-27 11:16:26 +00:00
Sergei Zharinov 930cf6633c refactor: Rewrite imports with .ts extensions (#40700)
fix: Additional vi.mock path corrections and prettier formatting
2026-01-26 22:48:17 +00:00
RahulGautamSingh 76f911041a refactor: use named exports (#39196)
* use named exports

* fix test

* add missing imnport

* fix prettier
2025-11-10 12:00:35 +00:00
Risu 4d0fe9dec1 feat(datasource/github-release-attachments): support releases removed checksum files (#37151) 2025-08-13 13:00:24 +00:00
Michael Kriese 19c115c813 test: cleanup (#34785) 2025-03-13 17:52:09 +00:00
Michael Kriese 593a92655e feat: refactor http (#34550) 2025-02-28 14:40:04 +00:00
Michael Kriese 1644d9cb18 test: migrate more to vitest (#34500) 2025-02-26 15:45:17 +00:00
Trim21 6e5731b554 test: migrate from jest to vitest (#34499) 2025-02-26 14:18:38 +00:00
Michael Kriese 997c23502e test: migrate to vitest (#34475)
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
2025-02-26 09:35:54 +00:00
renovate[bot] 55845508b6 chore(deps): update eslint monorepo to v9 (major) (#33573)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2025-02-20 11:31:13 +00:00
Sergei Zharinov a33d3eab9e feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
Sergei Zharinov 9b4e515024 refactor(http): Separate getJson and getJsonUnchecked (#33651) 2025-01-17 14:18:00 +00:00
Sergei Zharinov ddcef9cfdf refactor(github): Use single cache namespace for release attachments (#31037) 2024-08-27 03:32:15 +00:00
Sergei Zharinov 2fb7be44fc refactor: Use separate cache namespace for GithubReleaseAttachmentsDatasource class (#30867) 2024-08-19 05:47:06 +00:00
RahulGautamSingh d0b77e584a feat(datasource): sourceUrl & releaseTimestamp support (#29122) 2024-05-21 07:04:12 +00:00
Sergei Zharinov b69416ce17 refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
RahulGautamSingh 08c0969913 refactor: replace hasha.fromStream with new fn hashStream (#25046) 2023-10-20 07:49:09 +00:00
Michael Kriese 84a97a62fa test(perf): improve test speed (#24323) 2023-09-08 11:40:04 +00:00
Adam Setch b9c8c44fda refactor(util/hash): replace sha256 hasha use cases (#23547) 2023-07-24 20:01:39 +00:00
Paul Gschwendtner 177ffedb85 feat(datasource/github-releases)!: digest computation use git tag, not file digest (#20178)
The github-releases datasource has been copied into a new datasource called github-release-attachments.
The github-releases general datasource is updated to use the underlying Git tag of a GitHub release entry for digest computation.

Fixes #20160, Fixes #19552

BREAKING CHANGE: Regex Manager configurations relying on the github-release data-source with digests will have different digest semantics. The digest
will now always correspond to the underlying Git SHA of the release/version. The old behavior can be preserved by switching to the
github-release-attachments datasource.
2023-03-10 09:34:40 +01:00