Commit Graph

179 Commits

Author SHA1 Message Date
Sebastian Poxhofer e0cec3dc95 refactor(lint): add types-location rule and enable it for lib/modules (#45497)
feat(lint): add `types-location` rule and enable it for `lib/modules`

Reviewers consistently ask for exported types to be moved into a
colocated `types.ts`. Add a `renovate/types-location` oxlint rule that
reports `export interface` / `export type` declarations outside such a
file, and turn it on across `lib/modules`.

Re-exports (`export type { X }`, `export type *`), file-local types, and
values (enums, classes, functions) are left alone. `schema.ts` files and
`schema/` directories are excluded via config, matching how
`zod-schema-location` is configured — inferred types belong next to the
schema they are derived from.

Relocating the 87 existing violations means:

- new `types.ts` files for the modules that had none
- `terragrunt/common.ts` folded into its `types.ts`, as it held nothing
  else
- `RangeBound` in `versioning/gradle/compare.ts` un-exported, since only
  a file-local interface referenced it
- `bazel-module/parser/fragments.ts` split from its inferred types, which
  now live in `parser/types.ts` and infer through a namespace import so
  each schema keeps its merged name
2026-08-27 19:52:09 +00:00
Jamie Tanna 5b1749983c feat: always set CI=true for subprocesses
As noted in #43761, we had recently set `CI=true` for the Renovate and
Containerbase orgs on Mend-hosted apps due to a pnpm v11 requirement:

    ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY  Aborted removal of
      modules directory due to no TTY

    If you are running pnpm in CI, set the CI environment variable to
      "true", or set "confirmModulesPurge" to "false".

Similarly in #43606, it was noted that we should do this for `mise lock`
to mark the workspace as "trusted".

Although we went with a different situation, there will be cases where
this is useful for tools being executed, for instance when we invoke `yarn`.

We also make sure to keep our documentation up-to-date as we add to the
specific overrides.

With help from Claude Sonnet and Opus to:

- perform some of the mechanical updates as part of this change
- ensure that the Docker sidecar always has `hardcodedProcessEnv` passed
  into it
- catch a needed change to `exposeAllEnv` handling

Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
Co-authored-by: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>
2026-08-24 17:21:24 +01:00
Jamie Tanna 8770bfff41 refactor(tools): extract function for basicEnvVars docs
As we'll be adding more functionality into this file, and extracting the
function helps keep it clearer what's being done in the function scope.
2026-08-24 17:21:24 +01:00
Sebastian Poxhofer 9d0e535934 feat(config): add overrideDescription option (#45400)
* feat(config): add `overrideDescription` option

Presets which extend many other presets used an `ignoreDeps: []` sentinel
to keep their own one-line summary in the onboarding PR instead of one line
per extended preset. Replace that hack with an explicit `overrideDescription`
option, which is consumed and removed while presets are resolved.

The resolved descriptions are unchanged. Repositories which set
`ignoreDeps: []` in their own config no longer lose all preset descriptions
in their onboarding PR.

* fixup! feat(config): add `overrideDescription` option

* fixup! feat(config): add `overrideDescription` option

* fixup! feat(config): add `overrideDescription` option
2026-08-24 11:22:31 +00:00
Felipe Santos b9087cb072 fix(schema): allow object entries in repositories array (#44589)
Align renovate-global-schema with runtime: entries may be a string or
an object with required `repository` plus full global/repo config.
2026-08-03 18:07:32 +00:00
Jamie Tanna 5ffc308673 docs(manager): indicate where lockFileMaintenance runs external commands (#44914)
As found with recent changes to the Terraform manager, although we
generally have `lockFileMaintenance` being executed by an external
package manager being invoked by `exec(...)`, there are a few package
managers that do not do so.

To make it very clear how this happens, we can add a new field to the
Manager API, which will provide a means to document this.

Co-authored-by: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>
2026-07-28 11:44:22 +00:00
Jamie Tanna f7bf437dcf docs(minimum-release-age): indicate which Datasources support releaseTimestamp (#44822)
As noted in #30714, and to make the Minimum Release Age page a
"one-stop-shop", we can generate the documentation accordingly.

Using an orange "maybe" for support helps nudge folks to checking which
registry they're using, and noting that it still doesn't necessarily
work, even if the Datasource supports it.

Co-authored-by: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>
2026-07-24 10:02:37 +00:00
Sebastian Poxhofer ac0407bdee refactor(linters): add linters for Json.pipe and schema location (#44684)
* feat(lint): add renovate/zod-schema-location and renovate/prefer-json-pipe rules

Backlog item #23: reviewers repeatedly ask for consistent Zod schema
structure. Two new oxlint JS-plugin rules, both at "warn":

- renovate/zod-schema-location flags `export const X = <zod schema>` at
  module scope in lib/modules/**/ files that aren't schema.ts (or a
  colocated schema/ directory), reusing the leftmost-identifier schema
  detection from zod-schema-naming.js / prefer-nullish-util.js. Only
  exported top-level schemas are flagged — non-exported ones are treated
  as intentionally local/trivial (e.g. tightly coupled to file-local
  helpers), which keeps the rule's signal high.
- renovate/prefer-json-pipe flags `Schema.parse(JSON.parse(x))` /
  `Schema.safeParse(JSON.parse(x))` and suggests `Json.pipe(Schema)` from
  lib/util/schema-utils instead.

A third mined slice (require a matching `z.infer` type export for every
exported schema) was evaluated and skipped: ~275+ exported schema-like
consts in schema.ts files vs. 231 existing z.infer exports repo-wide is
too high a mismatch to flag mechanically without heavy per-site
judgment, so it would be mostly false positives.

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

* refactor: fix a clean subset of renovate/zod-schema-location and renovate/prefer-json-pipe violations

renovate/prefer-json-pipe: fixed all 5 safe `.parse(JSON.parse(...))`
call sites (bazel datasource, generate-mise-registry script, a hook
spec) by switching to `Json.pipe(Schema).parse(...)`. Left the 2
`.safeParse(JSON.parse(...))` sites (pretooluse-check.ts,
github-query-items.ts) unfixed: JSON.parse throwing before safeParse is
reached today crashes the script, whereas Json.pipe folds the bad-JSON
case into a graceful `{ success: false }`, which is an observable
behavior change, not just a mechanical rewrite.

renovate/zod-schema-location: fixed the one clean, self-contained
violation (platform/github's GithubIssue schema, moved into the
already-existing platform/github/schema.ts) as a representative
example. Left the other 20: they require moving exported schemas out of
files where they're built from local helper functions/config tables
(manager/github-actions/community.ts) or restructuring an entire
directory into a new schema.ts with import-graph updates across many
files (manager/bazel/rules/*.ts, manager/bazel-module/parser/*.ts) —
real refactors needing per-site judgment, not mechanical fixes.

Both rules stay at "warn": renovate/prefer-json-pipe has 2 remaining
violations that shouldn't be auto-fixed, and renovate/zod-schema-location
has 20.

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

* refactor: resolve remaining prefer-json-pipe and zod-schema-location findings

- github-actions: move the derived `CommunityActions` union into the
  existing colocated `schema.ts`; the action config table and the
  `actionSchema` builder stay in `community.ts` and are now exported.
- tools/docs: fold `JSON.parse` + `safeParse`/rethrow of the `gh` CLI
  output into `Json.pipe(...)`. Invalid JSON now surfaces as a ZodError
  instead of a SyntaxError; the only consumer catches generically, so
  behavior is preserved.
- tools/agents/hooks: keep `JSON.parse` + `safeParse` with a reasoned
  disable comment — hook scripts must stay dependency-light, and the
  `Json` helper lives in lib/util/schema-utils, which drags in the full
  lib import graph (logger, yaml, toml).

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

* feat(lint): enforce zod-schema-location and prefer-json-pipe as errors

Narrow `renovate/zod-schema-location` to files whose directory already
contains a colocated `schema.ts`. The mined reviewer feedback ("move
this to schema.ts") presumes the module follows that convention and the
schema leaked into a logic file. Modules that deliberately export
schemas from differently-named schema-only files — bazel `rules/*.ts`
Target schemas, bazel-module `parser/fragments.ts` — are a different,
accepted layout, not "schema mixed into logic", and are no longer
flagged.

With that narrowing and the preceding migrations, both rules are clean
repo-wide, so promote them from "warn" to "error".

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

* refactor: drop GithubIssue re-export from issue.ts

Consumers now import the schema directly from schema.ts.

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

* fix(lint): register zod-schema-location rule

The rule registration was lost while merging main, so oxlint failed to
parse .oxlintrc.json with "Rule 'zod-schema-location' not found in plugin
'renovate'". Re-add the import and rules entry, and restore alphabetical
ordering for prefer-json-pipe.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(lint): allow sync fs in zod-schema-location rule

ESLint rules execute synchronously, so the sibling `schema.ts` lookup
cannot use async fs. Silence `no-sync` with a justification.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 13:43:41 +00:00
Jamie Tanna 3888247209 docs(manager): make sure that Supported Datasources are de-duped and sorted (#44765)
* docs(manager): make sure that Supported Datasources are de-duped and sorted

As noted in #44764, we otherwise end up with a lot of duplicated
entries for `renovate-config`.

We can also sort them to make ti a slightly more readable list.

* chore(manager/renovate-config): dedupe `supportedDatasources`
2026-07-22 08:50:15 +00:00
Jamie Tanna 6959107bfb docs: wrap preset names in code blocks (#44234)
So they render a little more nicely.
2026-07-20 10:48:47 +00:00
Sebastian Poxhofer 9717259ffc refactor(oxlint): enable no-else-return and unicorn/no-lonely-if (#44553)
Enable no-else-return (with allowElseIf: false) and unicorn/no-lonely-if
as errors in .oxlintrc.json and fix all 131 pre-existing violations
(91 no-else-return, 40 unicorn/no-lonely-if) across 98 files.

The no-else-return violations were fixed with the oxlint autofix
(iterated to a fixpoint, plus two else-if chains that required
--fix-dangerously) followed by Prettier formatting. One comment dropped
by the autofix in lib/modules/manager/pub/artifacts.ts was restored
manually. The unicorn/no-lonely-if violations were merged by hand,
preserving comments and coverage-ignore hints.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 12:11:21 +00:00
Sebastian Poxhofer b106668a95 refactor(oxlint): enable typescript/no-useless-default-assignment (#44419)
- Convert `param: T | undefined = undefined` to optional `param?: T`.
- Drop dead `= false` defaults on the required cache-provider options.
- Make `GraphqlPaginatedContent.nodes/edges` optional so the `= []`
  fallbacks (load-bearing for partial GraphQL connections) are valid.
- Type the unchecked `default_branch` response field as optional so
  the `'HEAD'` fallback is retained.
- Drop `tag = undefined` from the Forgejo/Gitea/GitLab preset configs.

Part of #43845

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 16:38:48 +00:00
Pierluigi Lenoci 09def4f3a7 feat(config): add statusCheckWhen option to control individual Renovate status checks (#42887)
* feat: add generic statusCheckWhen option to control any renovate status check

Replace the artifacts-specific `artifactsCheckWhen` option with a generic
`statusCheckWhen` object that can control when ANY Renovate status check is
emitted. Keys mirror `statusCheckNames`: `artifactError`, `configValidation`,
`mergeConfidence`, `minimumReleaseAge`.

Each key accepts: "always" | "never" | "failed"
- always: set check on every commit (green on success, red on failure)
- never: skip the check entirely
- failed: only set the check when there is a failure (silent on success)

Default values preserve existing behavior:
- artifactError: "failed" (only report failures, as before)
- configValidation: "always"
- mergeConfidence: "always"
- minimumReleaseAge: "always"

The defaults table in docs is autogenerated from the option's `default`
field via `tools/docs` so the docs cannot drift from the source of truth.

Logging is gated so that "skipping" debug lines only fire when there is
something to skip (errors / status set), keeping logs quiet on every
branch run when a check is set to "never".

Example configuration:
```json
{
  "statusCheckWhen": {
    "artifactError": "always",
    "mergeConfidence": "never"
  }
}
```

Signed-off-by: Pierluigi Lenoci <pierluigilenoci@gmail.com>

* refactor(docs): address viceice review — single replace marker, coerceObject, simplify replaceContent call

- Use single replace marker instead of begin/end pair in docs and config.ts
- Use coerceObject from lib/util/object.ts instead of manual (val ?? {}) as Type
- Refactor replaceContent call to match upstream API signature (string, not object)

Signed-off-by: Pierluigi Lenoci <pierluigilenoci@gmail.com>

* fix: fix test for never mode with no errors and format docs

- Add missing config.artifactErrors = [] in test that checks
  'skips status entirely when mode is never with no errors' (beforeEach
  sets artifactErrors to [{fileName: 'some'}], test needs no errors)
- Reformat note block in docs from 4-space to 2-space indent to match
  prettier formatting (custom mkdocs-admonitions plugin expectation)

Signed-off-by: Pierluigi Lenoci <pierluigilenoci@gmail.com>

---------

Signed-off-by: Pierluigi Lenoci <pierluigilenoci@gmail.com>
2026-06-10 14:22:43 +00:00
Silva Dev BR def98d0e3c docs(schema): link config options to docs (#43613)
feat(schema): link config options to docs
2026-06-07 08:04:43 +00:00
Jamie Tanna 4bf6bd9b92 docs(manger/github-actions): reword "community actions" section (#43829)
* docs(manger/github-actions): reword "community actions" section

As some follow-ups to 27a3f5871f, we
can slightly reword the intro to add some more information about what
these target.

* docs(manager/github-actions): document why there may not be a `packageName`

* docs(manager/github-actions): generate a table for Actions and their `with`s

To provide further clarity on how each of the Actions' `with`s are used,
we can make this more explicit in our autogenerated docs, providing:

- which field(s) are extracted, taken from their Zod schema (with help
  from Claude Opus to extract this)
- note the dependency updating, and where it may be determined from the
  given `withSchema`

Co-authored-by: Claude Opus 4.7 <jamie.tanna+claude-code@mend.io>

---------

Co-authored-by: Claude Opus 4.7 <jamie.tanna+claude-code@mend.io>
2026-06-05 16:05:15 +00:00
Michael Kriese 27a3f5871f feat(github-actions): add community actions (#43821)
* feat(github-actions): add community actions

* test: fix test
2026-06-05 08:23:11 +00:00
Jamie Tanna 65dd0d45d9 fix(json-schema): don't restrict templateable and allowedValues option to an enum (#43802)
In the case of a config option that has both `allowedValues` and is
templateable - such as `bumpVersions.bumpType` - we should relax the
generated JSON schema to not restrict the exact value.
2026-06-04 17:08:07 +00:00
Jamie Tanna cbd174e128 docs: add a "deep dive" on environment variables (#43243)
As part of recent work around environment variable handling, it's clear
we should provide more user-facing documentation on how environment
variables are handled, and which are passed to child processes by
default.

We can create a "deep dive" page for this, with an autogenerated list of
the environment variables in `basicEnvVars` that are always passed to
child processes, if they're set.

We can also point self-hosted administrators and users alike to the
options they have to control this, too.

With help from GPT-4.1 for case-insensitive sorting.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
Co-authored-by: gpt-4.1 <jamie.tanna+github-copilot@mend.io>
2026-05-29 15:09:28 +00:00
Jamie Tanna 7a2af5318c docs(config): reword repo configuration options header (#43678)
* docs(config): don't trim newline after generated config filenames

Otherwise there's no newline before the next sentence.

* docs(config): correct usage of JSON5 presets

* docs(config): rewrite overview section

- introduce a linkable section for "what filenames are supported"
- correct the usage of "config help" discussions
- keep precedence/ordering in a single paragraph

* fixup! docs(config): rewrite overview section
2026-05-29 13:37:45 +00:00
Felipe Santos 392105b7c6 chore(oxlint): enable unicorn plugin and prefer-node-protocol (#43283)
chore(oxlint): enable unicorn plugin and prefer-node-protocol
2026-05-29 06:55:58 +00:00
Sebastian Poxhofer 3ecf71589b docs(docs): remove usage of prettier-ignore in site generation (#43632) 2026-05-27 17:03:44 +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
Felipe Santos 1844916259 docs: templates hyperlink not being rendered (#43603)
fix(docs): templates hyperlink not being rendered
2026-05-26 16:40:56 +00:00
Jamie Tanna 790d0f701c docs: add "previously known as" to renamed options (#43533)
* docs: add "previously known as" to renamed options

To provide a more searchable set of docs in the case that we migrate a
config option, we can introduce a `previouslyKnownAs` field in the
resulting generated documentation.

This allows someone to search for the previous name and find the new
option name.

For now we'll also not implement `RENOVATE_X_` variables.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>

* fixup! docs: add "previously known as" to renamed options

This is a more involved change, which requires we handle the custom
coersion for `RENOVATE_REPOSITORY_CACHE_FORCE_LOCAL`.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>

---------

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-05-26 08:10:58 +00:00
Jamie Tanna 59d4006a1d docs: prioritise admonitions in config option listings (#43532)
Instead of having a warning around "this is experimental" after
scrolling down to the end of the config option's description, we can
instead make it more prominent and move them all to the top - after the
table listing - but before the main body.
2026-05-22 08:49:55 +00:00
Sebastian Poxhofer 73b90e958b refactor: remove string concetation for production code (#43442)
refactor: prefer templates rather than `+`
2026-05-19 13:31:27 +00:00
Jamie Tanna 638c884bfc docs(manager/mise): note when short tool name is no longer supported (#43421)
At some point in the past, mise's support for the short name `kafka` was
removed.

We can warn our users that this is no longer supported, but keep our
custom logic for it, in case it returns in the future.
2026-05-19 07:52:03 +00:00
Jamie Tanna f9486a0a69 docs: add the mise version into docs (#43420)
As a way of indicating how fresh our list of supported tools in the
registry is, we can make sure we populate the version into a note above
the table.

We can extract a type to make it easier to reference the parsed JSON
file.

This requires a small tweak to handle `content`'s table insertion.
2026-05-18 15:31:49 +00:00
Jamie Tanna 44d122b762 docs: autogenerate cache namespaces (#43370)
As noted in #41214, it would be convenient to not have to manually
update this list.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-05-15 16:42:36 +00:00
Jamie Tanna a462e4ec3b refactor(docs): don't use an end for autogenerated docs (#43242)
* refactor(docs): don't use an `end` for autogenerated docs

As part of #42910, we wanted to avoid needing a "begin" and "end" to
each of our autogenerated docs replacements.

While looking into it, we're not actually using the "end" for anything,
so we can instead refactor this to be a single-line replacement.

To simplify the code and docs, we can remove this. At the point we need
this again, we can re-add the functionality.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>

* fixup! Merge remote-tracking branch 'origin/HEAD' into chore/no-replaceStop

---------

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-05-13 15:49:00 +00:00
Jamie Tanna 11d74fae24 docs(templates): correctly render list, wrap in code blocks and sort (#43264)
* docs(templates): ensure whitespace before generated list

Otherwise it doesn't render correctly as a list.

* docs(templates): sort outputted options/fields

As then it's more predictable and readable.

* docs(templates): wrap options/fields in code blocks

As then they're more clearly an option.
2026-05-12 12:05:42 +00:00
RahulGautamSingh 68cc0f27b2 docs(config/options): add supportsTemplating field (#41859)
* supportsTemplating field

* fix ci issue

* fix ci issue

* move tip below table

* apply suggestions

* docs: show list of options that support templating

* jsodc explanations for internal fields

* add test to ensure no option that applies template.compile() missed supportsTemplating=true

* apply review suggestions

* fix bad merge

* add filePatterns and commands to the list
2026-05-12 06:45:51 +00:00
Jamie Tanna 07a6ab8abe chore(json-schema): set child/parent config on shared definitions (#43036)
Instead of some of the overridden config being set in `$.properties`, we
can use `$.definitions`, so they're consistently used everywehre.
2026-05-04 08:58:50 +00:00
Jamie Tanna 56741ec71a refactor(json-schema): use $refs for property definitions (#43013)
As part of future changes, we'll introduce coverage of all properties
under `packageRules`.

Before we do this, we should use `$ref`s to make sure that we don't
duplicate the definitions too much.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-04-30 19:52:36 +00:00
Jamie Tanna e37388d91f feat: allow separate versioning for constraints (#42966)
* feat: allow separate versioning for constraints

As noted in #31831, there are times where it can be useful to override
the version that a given datasource uses, when performing
`constraintsFiltering=strict.`

This should only be applicable to the "additional" constraints, so we
make sure to validate this.

As this is new functionality, any misconfiguration should be marked as
an error.

We can make sure to provide a real-world usecase for this (taking
inspiration from `rails`' versioning of the `rubygems` constraint).

This will be used in the future by the extraction of the `go` directive,
which requires a different versioning to the default `semver`.

* fixup! feat: allow separate versioning for constraints

* fixup! feat: allow separate versioning for constraints

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>

* extra-log-context

---------

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-04-29 13:00:15 +00:00
Jamie Tanna 2bd478fff4 feat(mise): automagically support all tools through Mise Registry (#42783)
* feat(mise): automagically support all tools through Mise Registry

As noted in #42250, we should try and auto-support tools from Mise where
possible.

Similar to other areas of the codebase, we should use the "static data"
pattern, and periodically sync the `mise registry --json` output with
`lib/data/mise-registry.json`, and then auto-detect the tools that we
support through the known backends the tools support.

This takes lower precedence than existing in-code tool definitions, so
we can still provide an "override" if we can support lookups or version
extraction more appropriately.

Because we now have many more tools we (mostly) support out-of-the-box,
we need to provide an improved documentation page, and:

- only link to tools we have an explicit tools URL for
- note where a backend may not be supported

To automate the updating of this data, we:

- make sure we have `mise` in GitHub Actions, before we run
- don't pin the `mise` version to make sure that we're always seeing the
  latest supported tools
- make sure the commits generated are now `feat(...)`, as they introduce
  functionality changes (in the case new tool(s) are supported)

This improves support from ~170 tool short names to just over 1000.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>

* refactor: use Typescript

As we can now, we should.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>

* refactor(tools/static-data): use Zod schemas for parsing

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>

* refactor(mise): use Zod for types

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>

* chore(mise): prefer the GitHub backend over other sources

As we generally prefer it as a project, we should automagically use that
when looking at a mise registry entry.

With help from GPT-4.1 to write the `sortBackend` function.

Co-authored-by: gpt-4.1 <jamie.tanna+github-copilot@mend.io>

* test: ignore else coverage

* docs(mise): preference of `github` backend

* docs(mise): auto-link autogenerated tools

* perf(mise): sort registry only once

* refactor(mise): transform when parsing

Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>

* refactor: use `execa`

* perf(mise): read the Mise registry once

* perf(mise): pre-transform

---------

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
Co-authored-by: gpt-4.1 <jamie.tanna+github-copilot@mend.io>
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
2026-04-28 08:56:09 +00:00
Jamie Tanna 8278ce5370 docs(constraints): document the possible constraints and installTools (#42837)
* docs(constraints): list the possible `constraints` and `installTools`

Now we have a stronger type for what a valid tool constraint is, and
what additional constraints are, we should be very explicit with what
each option is, and specify them in the `constraints` as well as our
`installTools` docs.

* test: add coverage

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>

---------

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-04-26 16:13:09 +00:00
Jamie Tanna 41125296a0 docs(util/exec): add description field for ConstraintName/ToolName (#42907)
Instead of inline documentation with JSDoc, we can use an optional
`description` field that can be accessed programatically.

This means the `description` can also be added to our JSON Schema for a
Tool, or be the only output when a non-Tool constraint, as the
description for non-Tools are more clear than the autogenerated text.

We can make sure we continue to export the known names, as well as the
full definitions.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-04-26 14:44:05 +00:00
Jamie Tanna f391c50cd7 docs(json-schema): add constraints and installTools (#42834)
* docs(json-schema): add `constraints` and `installTools`

This requires `toolNames` and `additionalConstraintNames` are exported
for use.

* fixup! docs(json-schema): add `constraints` and `installTools`
2026-04-23 14:28:53 +00:00
Jamie Tanna 982a0219bf docs: wrap config options in <code> tags (#42836)
As they are configuration options and can be quite code-y we should
render them like this.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-04-23 11:32:05 +00:00
Jamie Tanna 98765b3e0f docs: don't re-add Platform README on experimental (#42799)
As noted in #42798, `platform=local` and other experimental platforms
are seeing the page for each of those platforms having duplicate
content.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-04-21 18:33:02 +00:00
Jamie Tanna 5a1f58766a docs(mise): render sorted table of short-names for tools (#42789)
* docs(mise): render sorted table of short-names for tools

As a way to improve the rendering of the large list of tools that we
support for mise-en-place, we can render them as a table.

This allows us to sort them by tool name, as well as make it clearer
which source the tool is from.

As part of future changes, we'll introduce more information and sources
of the table, so rendering them as a table will be more readable.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>

* docs(mise): wrap tool names in code tags

As they're generally a command.

---------

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-04-21 12:46:07 +00:00
Jamie Tanna b39b50f559 chore: expose known environment variables (#42201)
To provide more programmatic means to determine what environment
variables configure Renovate configuration options - and whether they're
Repo, Inherit or Global config options - we can expose these in two
forms:

- `getEnvOptionsMap()`
- a static JSON file, `renovate-env-options.ts`

This will provide programmatic use-cases from a plain JSON file that can
be used more readily - especially as it's distributed in the docs and
built package - as well as a function that can be used by users of
Renovate-as-a-library.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-04-14 15:27:50 +00:00
Jamie Tanna 1a3cae8b3d chore(tools): remove accidentally committed log lines (#42335)
chore(tools): remove accidentally committed log line

Missed as part of c8adab27f0.
2026-04-02 20:43:11 +00:00
Jamie Tanna c8adab27f0 docs: inter-link presets' extends (#42270)
When trying to work out how Renovate's internal presets work, it can be
a little awkward trying to jump between the different `extends`, as it
requires copy-pasting and searching.

We can utilise the annotations functionality in Material for MkDocs[0]
and generate the relevant annotations for each of the `extends` that
appears.

In the case that a preset has a description (which is most of them) we
can add that for a more interesting annotation.

This requires we:

- look up the presets' `description` ahead-of-time, as the generation
  process removes descriptions
- traverse the preset's `extends` and link it through to the destination
  preset
- create an ordered list after the code block to note the annotations
- handle parameterised presets

[0]: https://squidfunk.github.io/mkdocs-material/reference/code-blocks/#adding-annotations

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-03-31 13:10:48 +00:00
Jamie Tanna 2d239d2cc1 docs: explicitly document depTypes each manager supports (#42142)
* docs: explicitly document `depTypes` each manager supports

A long-standing question we receive is "what `depTypes` can I match
against in my project".

Although the best recommendation we usually have is "check the
`packageFiles with updates" log line (as a very key log line for users),
we can go one step further and try and create a stronger contract.

To do this, I've used Claude Sonnet 4.6 to work through the codebase,
determine areas that a `depType` is set in a manager (statically or
dynamically) and generate a structured, typed, means to document how
they're used.

Through a few iterations of the process, and attempts at human-written
documentation, we've settled on:

- prioritising autogenerated documentation (for humans to read) to note
  what `depTypes` are known, and what they are
- `knownDepTypes`, to describe any known, static, `depType`s and their
  human-readable meaning
  - with the `prettyDepType`, if used
- `supportsDynamicDepTypesNote`, to add a Markdown note to the generated
  documentation

While here, we also:

- make sure to note this in the "adding a new package manager"
  documentation
- remove any hand-written references to `depTypes` in each manager's
  documentation page
- correct the Gleam `depTypes`
- make sure to use the `knownDepTypes`'s `prettyDepType` definition if
  we know it, for a given `depType`

The descriptions have been generated by Claude Sonnet, with some
human-written tweaks where appropriate.

[0]: https://github.com/renovatebot/renovate/discussions/15176

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>

* fixup! docs: explicitly document `depTypes` each manager supports

* docs(manager): display `depTypes` documentation if none present

For consistency, and to make it more explicit.

---------

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-03-31 12:08:39 +00:00
Jamie Tanna f28349732e chore(tools): add extra newline before Markdown list (#42084)
Otherwise the Markdown list is not rendered as a list.
2026-03-24 09:19:10 +00:00
Jamie Tanna b1c1296aef docs(json-schema): set markdownDescription for rich-text editor previews (#41894)
Editors such as VSCode will look for `markdownDescription` to render the
description, if present, and will render that as Markdown, instead of
plain text.
2026-03-13 12:09:59 +00:00
Jamie Tanna c0764facb6 chore(json-schema): add $id to schemas (#41846)
To make them even more well-formed schemas, we should add the `$id`.

This allows `ajv-cli` to be able to validate using it.
2026-03-12 13:09:00 +00:00
Jamie Tanna e0ce9dabd6 docs: prefix child options with their parent (#41828)
This also makes sure that our URL fragments should be more consistent
over the years, as duplicate names (across parent and child options)
cannot clash.

This also corrects links from the code to include the new fragment.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-03-12 10:56:52 +00:00