55 Commits

Author SHA1 Message Date
Michael Kriese 320f770c36 fix(cache): hash URL credentials in cache keys
Co-Authored-By: Claude Fable 5.1 <michael.kriese+claude-code@mend.io>
Co-Authored-By: Claude Opus 5 <michael.kriese+claude-code@mend.io>
Co-Authored-By: Claude Opus 5.5 <michael.kriese+claude-code@mend.io>
2026-10-20 09:05:00 +01: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 97327c3d28 refactor(linters): add prefer-coerce-array rule (#45492)
* refactor(linters): add prefer-coerce-array rule

Refs #45217

`x ?? []` and `coerceArray(x)` say the same thing, but only the second
one is searchable and consistent. The rule flags a `??` whose default is
a bare `[]` literal; a non-empty default or an asserted `([] as Foo[])`
still passes.

Applying it across `lib/` surfaced three spots the helper cannot cover,
which keep `?? []` with a disable comment or a narrower fix:

- `package-files.ts` destructures a tuple, which `coerceArray()` widens
- `generate.spec.ts` defaults `matchAll()`, an iterator rather than an array
- `mise/upgradeable-tooling.ts` declares a `Record` return, so its
  `?? []` fallback was wrong to begin with and becomes `coerceObject()`

* refactor(platform/github): hoist the GHE version header lookup

`Object.entries(...).find()` returns a tuple, and defaulting it with
`?? []` only to destructure the second element reads as an array
default when it is not one. Name the found entry instead, which drops
the `?? []` rather than routing a tuple through `coerceArray()`.
2026-08-28 09:27:58 +00:00
Sebastian Poxhofer c41b46bac3 feat(logging): do not use dynamic fields in log messages with severity WARN or higher (#44560)
* ci(linter): add renovate/logger-static-message rule

Adds a custom oxlint rule that enforces a static msg component for
logger.warn/error/fatal calls (including logger.once variants) so the
messages can be grouped in metrics and error catching services, per
docs/development/best-practices.md. It also flags metadata properties
named 'error' that hold error-ish values, because the bunyan serializer
only handles the 'err' key.

The rule is enabled as an error for lib/ production code and disabled
for spec files. All 33 pre-existing violations are fixed by moving
interpolated values into the metadata object, making messages static,
and renaming 'error' metadata keys to 'err'. Affected log-message
assertions in co-located specs are updated accordingly.

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

* ci: ignore validator output

* fixup new merged in log messages

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 06:53:37 +00:00
Jamie Tanna 128f446e08 docs: ensure that config in documentation is error and warning free (#43727)
* docs: skip validation on JSON files that aren't Renovate config

As part of future changes, we'll enable validation on all JSON code
snippets to run Config Validation.

Before we do that, we should opt-out JSON snippets that aren't anything
related to Renovate config.

* docs: don't validate invalid Renovate config

As it's intentionally referencing a manager that doesn't exist.

* docs: don't validate partial Renovate config

As part of future changes, we'll enable validation on all JSON code
snippets to run Config Validation.

There are several code snippets we have that are part of a Renovate JSON,
but it doesn't make sense to convert these to a fully passing config, as
it'd reduce clarity on what we're trying to explain.

* docs: convert `baseBranchPatterns` snippets to code blocks

So we can validate them.

* docs: make sure that `datasourceTemplate` is set

So this passes validation.

* docs: clarify that `force` is global config

As it may not be clear, so we can make it extra clear with a `.js` file,
and note that it's global self-hosted config.

* docs: make sure `packageRules` is an array

* docs: `matchBaseBranches` needs `baseBranchPatterns` to be set

* docs: correct typo for `prBodyColumns`

* docs: mark global config snippets as such

As part of future changes, we'll use this to detect whether it's global
self-hosted configuration.

* docs: make sure `packageRules` wraps its children

* docs: add `allowedHeaders`

* docs: ignore deprecation warnings

As part of future changes, we'll use this to note that we don't care
about the validation warnings.

* docs: make sure `customManagers` wraps its children

* docs: make sure `fleet` wraps its children

* docs: validate JSON snippets are valid Renovate config

To make sure that we're always presenting valid JSON configuration to
our users, we can validate them as part of `check-fenced-code`.

As well as configuration errors we can warn for warnings, but allow code
blocks to opt-out, for instance when there's a known deprecation
affecting the code block.

We need to make sure to set `allowedEnv` for various code snippets that
reference environment variables.

* docs(development): document fenced code block checks

* docs: wrap `configType` and `ignoreConfigWarnings` in `{ ... }`

As otherwise we see build failures i.e.

    WARNING -  Doc file 'modules/platform/gitlab/index.md' contains a link
       '../../../self-hosted-configuration.md#autodiscoverrepoorder', but the doc
       'self-hosted-configuration.md' does not contain an anchor '#autodiscoverrepoorder'.

This needs to be wrapped alongside all other options like `title`.

* fixup! docs: wrap `configType` and `ignoreConfigWarnings` in `{ ... }`
2026-06-02 13:29:48 +00:00
Sebastian Poxhofer 15f4bd8eff chore: migrate from zod/v3 to zod/v4 (#43691)
* chore: migrate from zod/v3 to zod/v4

This commit contains the logic changes

* chore: migrate imports from zod/v3 to zod/v4

This contains import updates and adds explicit record keys as zod/v4 requires these now

* ci: enforce usage of zod/v4
2026-05-30 16:01:58 +00:00
Sebastian Poxhofer 9a27d7aa78 ci(prettier): add prettier plugin for admonitions (#43615)
* ci: add local mkdocs-admonitions plugin for prettier to allow admonition preservation

* docs: remove uses of `prettier-ignore` for admonitions

* test: rather use await expect

* chore: use named group exclusively
2026-05-27 09:39:52 +00:00
Jamie Tanna 33e857e04a docs: migrate all admonitions and lists to using 2-space indents (#43607)
* docs: ensure 2 spaces used for generated admonitions

As a follow-up to 4b0146ab7b and
1844916259b6dc17f532e491eb93f6116327c324., this correctly renders
admonitions with 2 spaces (1 indent).

* fixup! docs: use 2-space indentation for Markdown (#43537)

Plus using 3-space for mixed-style `<ul>` and `<ol>`s.

* fixup! docs: use 2-space indentation for Markdown (#43537)

As otherwise it breaks the rendering of the table.
2026-05-26 20:03:23 +00:00
renovate[bot] 4a2578d18d build(deps): update dependency zod to v4 (main) (#41225)
* build(deps): update dependency zod to v4

| datasource | package | from    | to    |
| ---------- | ------- | ------- | ----- |
| npm        | zod     | 3.25.76 | 4.3.6 |

* fix: zod migration

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2026-02-18 07:37:50 +00:00
Sergei Zharinov 9d857c1f68 refactor(lint): Organize imports with biome (#40966) 2026-02-06 13:40:01 +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
renovate[bot] b4ed9e65d9 chore(deps): update dependency @vitest/eslint-plugin to v1.3.23 (main) (#38702)
* chore(deps): update dependency @vitest/eslint-plugin to v1.3.23

| datasource | package               | from   | to     |
| ---------- | --------------------- | ------ | ------ |
| npm        | @vitest/eslint-plugin | 1.3.16 | 1.3.23 |

* remove now unnecessary exceptions

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: secustor <sebastian@poxhofer.at>
2025-10-31 07:50:48 +00:00
renovate[bot] 1280fe4dc7 chore(deps): update dependency @vitest/eslint-plugin to v1.3.16 (main) (#38502)
* chore(deps): update dependency @vitest/eslint-plugin to v1.3.16

| datasource | package               | from   | to     |
| ---------- | --------------------- | ------ | ------ |
| npm        | @vitest/eslint-plugin | 1.3.13 | 1.3.16 |

* fix linting errors

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: secustor <sebastian@poxhofer.at>
2025-10-13 09:24:15 +00:00
Anne Stellingwerf 9fae0192a1 docs: introduce JSON schema validation and migration checks (#38145)
* docs: introduce JSON schema validation and migration checks

* refactor(tools): enhance code clarity with additional typings, comments, and optional chaining

* ci(workflows): add build steps to lint and type-check jobs

* Update tools/check-fenced-code.mjs

Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>

* Partial revert

* docs(jsonata): fix wording in code block title in readme

* ci(workflows): remove redundant build steps from workflows

* ci(workflows): remove redundant build steps from workflows

* refactor(tools): simplify error reporting

* Incorporate feedback

* Incorporate feedback

* Incorporate feedback

---------

Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>
Co-authored-by: Jamie Tanna <jamie.tanna@mend.io>
2025-10-07 10:54:48 +00:00
Michael Kriese 3211d56e21 refactor(zod): rename schema to match our best practices guide (#37499) 2025-08-14 10:35:03 +00:00
Szava Maczika 9aa84388ee docs: Change incorrect log remapping (#37503) 2025-08-14 08:06:04 +00:00
RahulGautamSingh c477fb09e1 feat(datasource/custom): add toml support (#36136)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2025-06-29 09:08:39 +00:00
RahulGautamSingh bc7d0595d0 feat(config): managerFilePatterns (#34615)
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2025-05-04 08:30:24 +00:00
Borja Domínguez fe360349c8 feat: add transform template log (#34821)
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
2025-03-16 13:34:34 +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 997c23502e test: migrate to vitest (#34475)
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
2025-02-26 09:35:54 +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
Rhys Arkins da4ee8b874 feat(jsonata): validation, caching, better logging (#31832) 2024-10-08 09:11:15 +00:00
RahulGautamSingh 1405689cf8 fix(datasource/custom): better logging for jsonata errors (#31520) 2024-09-25 19:24:54 +00:00
RahulGautamSingh 5c29fe8cc6 docs(datasources/custom): add link to online tester for jsonata rules (#31486) 2024-09-23 14:26:50 +00:00
RahulGautamSingh fbdb06d019 docs: fix broken link (#30383)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2024-07-25 17:01:50 +00:00
HonkingGoose 94e333fedb docs(datasource/custom): rewrite debugging section (#30250)
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
2024-07-22 13:51:29 +00:00
Sebastian Poxhofer a13ab2cffa chore(datasource/custom): log data before jsonata processing (#30241) 2024-07-18 21:00:59 +00:00
Aleksandr Mezin f921c68488 feat(datasource/custom): allow isStable in output (#29928) 2024-06-29 05:52:07 +00:00
Leonismoe 48e6aa4f84 feat(datasource/custom): expose tags in result so that we can use followTag (#29806) 2024-06-24 06:55:39 +00:00
Sebastian Poxhofer c9f8acfd1a feat(datasource/custom): remove content limiter for plain (#29549) 2024-06-11 20:47:53 +00:00
Alex Cortelyou e3675f104d feat(datasource/custom): Support digest in custom datasource (#28760)
Co-authored-by: Fabian Stehle <fabian.stehle-extern@moia.io>
Co-authored-by: Fabian Stehle <fabi@fstehle.de>
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2024-05-01 07:41:05 +00:00
HonkingGoose b56e545852 docs(custom datasource): improve styling (#27747) 2024-03-06 14:15:24 +00:00
andaryjo c479b213dd feat(datasource/custom): add currentValue to template metadata (#27038) 2024-02-04 09:09:49 +00:00
nSimon (Nicolas) 540ad4fa72 fix(datasource/custom): fix local registry path (#26142) 2023-12-05 17:25:45 +00:00
Sebastian Poxhofer 3c33a26441 refactor(util/yaml): rename load and loadAll to parseSingleYaml and parseYaml (#26084) 2023-12-01 20:13:01 +00:00
Sebastian Poxhofer f42d0583d5 refactor(utils/yaml): centralize YAML parsing to allow central templating handling (#26068) 2023-12-01 11:58:43 +00:00
Michael Kriese 4b7a5e7b62 docs: use relative links (#26044) 2023-11-29 18:10:17 +00:00
Sebastian Poxhofer 0e9a452969 docs(datasource/custom): fixs false header size and missing format type (#26023) 2023-11-29 08:12:12 +00:00
Aleksandr Mezin a8c83970ac feat(datasource/custom): expose newDigest in result (#26007) 2023-11-28 09:28:09 +00:00
Aleksandr Mezin 7611162834 feat(datasource/custom): add html format (#24403)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
2023-11-28 07:39:22 +00:00
Sebastian Poxhofer 95ad0d02dc refactor(datasource/custom): use class based fetcher to simplify code (#25958) 2023-11-25 06:37:05 +00:00
nSimon (Nicolas) f7b74c3f8b feat(datasource/custom): add ability for local registry (file://) (#25734) 2023-11-24 06:05:46 +00:00
nSimon (Nicolas) 53401eb36f feat(datasource/custom): allow to fetch from YAML data endpoint (#25695) 2023-11-13 11:01:56 +00:00
Sebastian Poxhofer d10dcff495 refactor(custom/datasource): prepare for additional format types (#25640) 2023-11-08 06:05:22 +00:00
Sergei Zharinov b69416ce17 refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
RahulGautamSingh 6f9d37a6c0 feat(migrate): regexManagers -> customManagers (#24451)
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2023-09-24 08:55:56 +00:00