Commit Graph

133 Commits

Author SHA1 Message Date
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
Michael Kriese b35d7c9cad chore(tools): use async execa (#41712)
* chore(tools): use async execa

* chore: fix lint errors
2026-03-10 16:55:44 +00:00
Jamie Tanna 82a649d8b9 docs(versioning): auto-generate pin documentation (#41423)
As a follow-up from #36261, we should auto-generate this in our
documentation to keep it up-to-date.

If the `getPinnedValue` function is present, we should imply
`rangeStrategy=pin`.

Co-authored-by: Claude Sonnet 4.5 <jamie.tanna+github-copilot@mend.io>
2026-03-10 14:41:41 +00:00
Jamie Tanna fdbbf037d3 fix(json-schema): use anyOf for allowedValues (#41772)
As a follow-up to #41697, we were requiring that either the `enum` or
the free-form text must be used, whereas it could be one/both of them.
2026-03-09 18:52:10 +00:00
Jamie Tanna ed6f713c36 refactor(tools): use a distinct replacement start/end the lockFileMaintenance table (#41251)
As it makes it clearer what's being done.
2026-03-09 14:37:19 +00:00
Jamie Tanna 2026b4fdff docs: auto-generate config filenames (#41254)
As noted in #40608, we're currently showing an outdated list of possible
configuration filenames.

We can instead automate this by using the known configuration files we
know.

As we don't yet support the Platform-specific filenames, we shouldn't
include them, but add a TODO so we don't miss it.
2026-03-09 13:13:12 +00:00
Jamie Tanna e5e5f91d47 fix(json-schema): allow free-string text if option has allowString (#41755)
As noted in #40804, `matchUpdateTypes` can either be an `UpdateType`, or
it can be a glob.

This makes sure that the schema is aware it's either an enum, or it's an
arbitrary string.
2026-03-09 12:22:27 +00:00
Michael Kriese e75097e6a7 chore(tools): fix github issue collector command (#41721) 2026-03-06 17:51:01 +00:00
Michael Kriese 68f623b5d2 docs: use tools exec to fetch github issues (#41711)
* docs: use tools exec to fewtch github issues

* Update tools/utils/exec.ts

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

---------

Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
2026-03-06 10:14:06 +00:00
Jamie Tanna 3ebe3f0727 docs(json-schema): add suggested extends values (#41697)
As noted in #40439, it would be useful to provide editor suggestions for
the possible values of `extends`, so a user can start their
configuration with recommended presets.

We can do this using a custom `anyOf` that includes these options as an
`enum`.

Co-authored-by: Claude Sonnet 4.5 <jamie.tanna+github-copilot@mend.io>
2026-03-05 12:47:58 +00:00
Baptiste Lyet 0152b900ef docs: reword . in parents to (the root document) (#41689)
* docs(parents) : reword . to the root document

* docs(parents) : ensure .foo parents is well displayed and not transformed as with the single .
2026-03-05 12:12:06 +00:00
Baptiste Lyet 52b449dfe7 docs: split parents over multiple lines (#41573)
* docs/41127-parents-may-want-to-split-over-multiples-lines

* refactor(docs): sort parents alphabetically in table and add unit tests

* refactor(docs): table - use expect instead of assert

* refacto(docs) : remove unnecessary vitest import

Co-authored-by: Michael Kriese <michael.kriese@gmx.de>

* refactor(docs): table - rename index so there are rowIndex and colIndex

* refactor(docs): rename config.test.ts to utils.test.ts

---------

Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
2026-03-03 16:51:58 +00:00
Jamie Tanna 80e181605a chore(tools): use type for supportedRangeStrategies (#41422)
Claude Sonnet 4.5 (GitHub Copilot + `crush`)
2026-02-23 16:52:12 +00:00
Jamie Tanna a300036a1c refactor(platform): programatically mark Platforms as experimental (#41220)
* refactor(platform): programatically mark Platforms as experimental

As part of future changes, we'll want to be able to more
straightforwardly determine whether a given Platform is experimental.

To do this, we can add a new optional `experimental` flag to the
`Platform`.

As part of having this available, we can refactor how our docs for
Platforms are built, and replace a hand-authored experimental notice, we
can automagically insert it into the built docs.

To make sure that we don't break the rendering of the Markdown for
Mkdocs, we need to insert the experimental notice after the page
heading.

As we're now using the Platform itself, not only the ID, we need to
refactor how `tools/docs/platforms.ts` renders the pages.

* docs(platforms): clarify which Platforms are experimental (#41249)

* chore: format code block

---------

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2026-02-18 09:07:25 +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
Jamie Tanna 0332bac9f2 refactor(tools): allow specifying replacement start/end (#41250)
As part of future changes, we need to be able to specify the start/end
of replacements in documentation, as we have multiple entries in the
same page.

We can also rename the variable so it's clearer that it's the default
value, not the current scoped value.
2026-02-17 21:39:35 +00:00
Michael Kriese 70333c6b0e refactor: drop tsx (#41221) 2026-02-16 16:17:00 +00:00
Jamie Tanna fb14b89505 docs: don't show multiple defaults (#41219)
As noted in #40969, this can be confusing, so we should only add these
`default`s if there's not already one found.
2026-02-16 14:48:49 +00:00
Jamie Tanna 56b2d2ab7a docs(managers): indicate Lock File Maintenance support (#41151)
To surface which Managers support Lock File Maintenance more
prominently, we can note which file(s) are available for it when we
autogenerate the docs.
2026-02-16 12:30:43 +00:00
RahulGautamSingh 4005872ff6 docs: autogenerate list of managers supporting lockfileMaintenance (#41135)
* feat(nuget): add supportsLockFileMaintenance flag

The NuGet manager supports lock file maintenance via `packages.lock.json`
but was missing the `supportsLockFileMaintenance` export.

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

* feat(manager): add lockFileNames metadata to all lock file managers

Add `lockFileNames` field to `ManagerApi` interface and export it from
all 24 managers that support lock file maintenance. This metadata will
be used to auto-generate the lock file support table in docs.

Also adds a validation test ensuring managers with
`supportsLockFileMaintenance` always provide `lockFileNames`.

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

* feat(docs): auto-generate lockFileMaintenance lock files table

Replace the hardcoded lock file support table in configuration-options.md
with autogenerate markers and generate it from manager metadata during
docs build. This ensures the table stays in sync with manager code
automatically.

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 07:59:29 +00:00
Sergei Zharinov 9d857c1f68 refactor(lint): Organize imports with biome (#40966) 2026-02-06 13:40:01 +00:00
Sergei Zharinov 2b0e80b884 feat!: Switch to ESM modules (#40756) 2026-01-29 14:21:41 +00:00
Jamie Tanna 192ae368fa chore(json-schema)!: forbid global-only options in repo configuration (#38619)
As noted in #38728, we want to make sure that we only have repo level
configuration in repo configuration.

This makes sure that the resulting JSON Schemas are output with only the
configuration options that are relevant.

Additionally, as a way to inform users that they are using a documented
global-only option in their repo-level configuration, we can use JSON
Schema validation rules to provide a nudge to users that they're using
incorrectly placed configuration.

This isn't currently enforced when Renovate runs, nor is the JSON Schema
used to apply validation.

However, it will surface information to the user (i.e. in folks' local
editors) and provide faster feedback of "oh, I shouldn't be using this
configuration".

With some help from GPT-4.1 to craft the `not.required`, and correct the
typing.

Co-authored-by: gpt-4.1 <jamie.tanna+github-copilot@mend.io>
2026-01-29 13:28:05 +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
Jamie Tanna 0b42055fbe fix(json-schema): add a separate schema for Inherit Config (#40683)
In shared preset repositories, some users will use a mix of Inherit
Config and Repo Config options with the existing JSON Schema.

As part of Renovate 43, we're removing the ability for any global
options to be usable in Repo Config, which would also mean that it's now
either a case of "ignoring warnings in my editor" and "using Global
Config JSON Schema", which isn't a great option.

We can instead create a third JSON Schema, one which is focussed on
shared presets that can include Inherit Config options.

This makes it clear that the repo config's JSON Schema should not be
used for anything Inherit Config.
2026-01-26 15:44:54 +00:00
Jamie Tanna 13869dd7d1 fix(config): ensure that config options are immutable (#40682)
Noticed while making changes in the JSON Schema generation, but we're
currently returning a mutable reference to all of our options, which
means that it might be possible to (accidentally) change configuration
options that then affects all of the running Renovate process.

To handle this, we can make sure to `Object.freeze` the options, as well
as making sure our types clarify this is read-only.

This isn't something that should be user-facing, but makes sure that
we're keeping these immutable.

We also need to make sure any modifications now return a new config
option.

When we return a default value, we need to return a clone, so it's not
the frozen default value, as that then means it can't be modified (i.e.
in tests).

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2026-01-26 15:05:14 +00:00
Jamie Tanna 90baa36491 chore(types): make generateDocs' version argument typed (#40550)
As part of future changes to introduce further typings for Commander
(#40546), we need to provide stronger types as the `version` will now be
typed.

We can erase the `SemVer` type, and pass around a `string`, instead as
it's not necessary to keep.
2026-01-20 21:07:42 +00:00
Jamie Tanna e2a8843196 fix(docs): look up open issues on main builds for Renovate docs (#39818)
We're currently always skipping the detection of open bugs/features, so
even though [0] introduced authentication to GitHub, this didn't
actually lead to the lookup when running in CI.

If we're not running in Renovate's CI build (i.e. as part of the release
process) or the docs site's CI build (as part of post-release
operations) we should continue to skip the build, when running in CI.

This also makes it clearer with a WARN log line to explain why this is
being skipped.

This is a re-apply of ae46c57f56, as well
as making sure that the `GITHUB_TOKEN` is explicitly passed as
`extraEnv`, otherwise we see i.e.

```
ERROR: Error getting query results
       "err": {
         "cmd": "/bin/sh -c gh issue list --json \"title,number,url,labels\" --search \"type:Bug\" --limit 1000",
         "stderr": "gh: To use GitHub CLI in automation, set the GH_TOKEN environment variable.\n",
         "stdout": "",
         "options": {
           "encoding": "utf-8",
           "env": ["CI", "HOME", "PATH", "LANG"],
           "maxBuffer": 10485760,
           "timeout": 900000
         },
         "exitCode": 4,
         "name": "ExecError",
         "message": "Command failed: gh issue list ...\ngh: To use GitHub CLI in automation, set the GH_TOKEN environment variable.\n",
         "stack": "ExecError: Command failed: gh issue list ...\ngh: To use GitHub CLI in automation, set the GH_TOKEN environment variable.\n\n    at ..."
       }
```

As we can see, the `env` isn't automagically picking up the
`GITHUB_TOKEN`, so we should explicitly pass it.

[0]: https://github.com/renovatebot/renovatebot.github.io/pull/746
2025-12-09 10:28:39 +00:00
Jamie Tanna 83e0b97ffb fix(docs): revert lookup for open issues on main (#39813)
* Revert "fix(docs): wire in `GH_TOKEN` for `gh` CLI (#39812)"

This reverts commit 295eaac4d0.

* Revert "fix(docs): add required permissions for `build:docs` (#39809)"

This reverts commit bbd30ce930.

* Revert "fix(docs): look up open issues on `main` builds for Renovate docs (#39801)"

This reverts commit ae46c57f56.
2025-12-05 17:50:31 +00:00
Jamie Tanna ae46c57f56 fix(docs): look up open issues on main builds for Renovate docs (#39801)
We're currently always skipping the detection of open bugs/features, so
even though [0] introduced authentication to GitHub, this didn't
actually lead to the lookup when running in CI.

If we're not running in Renovate's CI build (i.e. as part of the release
process) or the docs site's CI build (as part of post-release
operations) we should continue to skip the build, when running in CI.

This also makes it clearer with a WARN log line to explain why this is
being skipped.

[0]: https://github.com/renovatebot/renovatebot.github.io/pull/746
2025-12-05 16:54:29 +00:00
Jamie Tanna b78764cde2 chore(tools/generate-docs): correctly pass version to generateSchema (#39563)
chore: correctly pass version to `generateSchema`

Otherwise we get an `undefined`.
2025-11-26 20:25:22 +00:00
RahulGautamSingh 89edd5e9f6 docs: render empty array in code tag (#39200)
docs: render emoty array in code tag
2025-11-10 14:26:38 +00:00
Jamie Tanna 9fa82ff6d4 chore(docs): render allowedValues as JSON (#38930)
With `allowedValues`, we will almost always have multiple values. To
render them better, we can render this array as the JSON stringified
alternative, which reads a little better.

This requires we make sure that the array isn't pre-stringified, which
would JSON stringify as i.e. `"auto, enabled"`.
2025-11-04 15:45:45 +00:00
Sebastian Poxhofer 3b69692d02 docs(templates): use list for exposed config options (#39043) 2025-11-04 08:01:38 +00:00
RahulGautamSingh a7a968c2f9 refactor(docs): display platforms in list (#39028)
refactor(docs: display platforms in list
2025-11-03 13:55:51 +00:00
Jamie Tanna 941fe14091 chore(docs): correct array type (#38929)
As it's not a `list`, as it mirrors the JSON Schema name.
2025-10-30 09:37:47 +00:00
Jamie Tanna 8bf665c827 chore(schema): deprecate globalOnly options in renovate-schema.json (#38805)
Now we have a global schema for self-hosting configuration, we can
deprecate the use of global configuration in a repository configuration.

Unfortunately the JSON Schema version we use does not provide native
deprecation functionality, so we can prepend the deprecation notice to
the `description`.

Then, as part of #38728, we will remove this in the next major version
of Renovate.

Closes #38729.
2025-10-23 16:01:55 +00:00
Jamie Tanna 3b9489bf2e chore(schema): add JSON Schema for global configuration (#38800)
As noted in #38727, it would be convenient to distribute a separate JSON
Schema that is explicitly for "global" / "admin" / "self-hosted"
configuration, separate to the repository configuration in our current
`renovate-schema.json`.

This gets wired in as an additional JSON file, and will have a different
set of configuration options in the future, noted by the `isGlobal`.

Closes #38727.
2025-10-23 14:30:42 +00:00
Jamie Tanna 26e7d05428 refactor(tools/schema): use an options object (#38797)
So we can, in the future, modify other configuration more easily.

We should also rename `configurationOptions` to clarify they're Renovate
configuration, not options for this function.
2025-10-23 12:32:15 +00:00
Jamie Tanna 2582722f06 refactor(tools/schema): pass filename around (#38795)
So we can, in the future, modify other configuration.
2025-10-23 09:58:45 +00:00
Jamie Tanna 3eb4a0475b chore(schema): upgrade to JSON Schema draft-07 (#38751)
As noted in #38749, we need to upgrade to draft-07 of JSON Schema to
upgrade our dependency on AJV.

To do so, we "just" need to update the `$schema`, as we're not using
anything that's been deprecated/removed/changed as part of draft-07.

This doesn't impact anything user-facing, and the schema doesn't change.

This appears to be supported by `vscode-json-languageservice`, which is
used by several IDEs (including VSCode) and editors to perform JSON
Schema validation in-editor.

Note that if we don't update `schemaId` to `auto`, we end up with errors
such as:

    Error: no schema with key or ref "http://json-schema.org/draft-07/schema#"

Closes #38749.
2025-10-21 10:09:33 +00:00
Felipe Santos 20f658a580 docs: avoid editors flagging comments in renovate.json (#38640)
fix: avoid editors flagging comments in renovate.json
2025-10-15 14:22:45 +00:00
Jamie Tanna cf25ae5407 fix(json-schema): correctly set version in generated JSON Schema (#38621)
fix(tools/json-schema): correctly set version in generated JSON Schema

In #38567 we tried to wire in the version of Renovate into the generated
JSON Schema. This unfortunately didn't work, as we don't have the
release number known at the time we're currently calling the JSON Schema
generation.

To fix this, we can make sure that at the point we're generating the
JSON Schema as part of the release process, we can wire in the version
as part of `generateSchema`.
2025-10-15 08:33:27 +00:00
Jamie Tanna 0550c46490 refactor(tools/json-schema): extract generation into a function (#38620)
In #38567 we tried to wire in the version of Renovate into the generated
JSON Schema. This unfortunately didn't work, as we don't have the
release number known at the time we're currently calling the JSON Schema
generation.

To fix this, we need to pass in the version as part of `generateSchema`.

However, to do so, we'd need to make the `schema.title` and
`schema.x-renovate-version` no longer constants that derive the version
from the `package.json`.

As a prefactor, we can refactor this into the `generateSchema` function,
instead of being file-level (constant) variables, and make sure we pass
around the `options` and `properties` variables, too.
2025-10-15 08:03:53 +00:00
Jamie Tanna cc5d666162 chore(json-schema): add version information to generated schema (#38567)
Per #37994 we don't currently provide any historical copies of JSON
Schema documents for Renovate's repo configuration file format.

It would therefore be useful to provide this metadata to users, both in
the `title`, but also as an extra field that can be relied upon.
2025-10-14 08:30:01 +00:00
Anne Stellingwerf 7bfb4fc45d feat(schema): add requiredIf property for conditional schema validation (#38148) 2025-09-24 12:02:55 +00:00
Michael Kriese 3211d56e21 refactor(zod): rename schema to match our best practices guide (#37499) 2025-08-14 10:35:03 +00:00