Commit Graph

39 Commits

Author SHA1 Message Date
renovate[bot] 9d74625d93 build(deps): update dependency prettier to v3.9.6 (main) (#45815)
* build(deps): update dependency prettier to v3.9.6

| datasource | package  | from  | to    |
| ---------- | -------- | ----- | ----- |
| npm        | prettier | 3.8.1 | 3.9.6 |

* chore: prettier fixes

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@mend.io>
2026-09-09 13:50:03 +00: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
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 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
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
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 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 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 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 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
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
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 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
RahulGautamSingh f20e7411ad feat(config/options): allow root(.) and UpdateType as parents (#36522)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2025-07-04 10:29:58 +00:00
Sam Chung 6c00935e8b docs: fix nullable json schema (#31938)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2024-10-14 11:50:34 +00:00
Ben Langfeld ea5e20ebb1 fix(schema): Correct schema for descriptions (#27260) 2024-02-13 05:51:24 +00:00
RahulGautamSingh d908ca3c2e refactor: config option parent -> parents (#26609)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2024-01-22 08:23:59 +00:00
Sergei Zharinov b69416ce17 refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
Michael Kriese 1c13cf4302 fix: update json-schema (#22262) 2023-05-17 08:27:04 +00:00
Michael Kriese e3e286bd01 build: simplify and strict tools (#14154)
Co-authored-by: Jamie Magee <jamie.magee@gmail.com>
2022-02-11 07:51:51 +00:00
Michael Kriese e4c938b7a5 docs: release as asset (#11429)
* docs: prepare release as asset

* chore: cleanup

* fix: wrong extension

* fix: wrong logger

* fix: wrong path

* chore: clean and create tmp

* chore: fix types

* fix: update generation

* Update .github/workflows/build.yml

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* Update lib/datasource/types.ts

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
2021-12-09 21:12:49 +01:00