Commit Graph

51 Commits

Author SHA1 Message Date
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
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
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 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 57f01ae0a1 chore(workers/global): improve error message on parsing environment vars (#41324)
As part of #41323, we noticed that the error that's thrown isn't super
helpful, as it doesn't include the environment variable name.

To improve this, we can wrap the `Error` with the environment variable
name that's in use, as well as the error message.

In the future we can improve this further.
2026-02-19 11:59:28 +00:00
Jamie Tanna 2536f535c0 fix(workers/global): migrate string-based repositoryCacheForceLocal (#41323)
* fix(workers/global): migrate string-based `repositoryCacheForceLocal`

For users who had previously set `RENOVATE_X_REPO_CACHE_FORCE_LOCAL` to
a non-empty string, we can make sure to auto-migrate them to the
expected value of `true`.

Because this is an environment variable, we cannot use a migration, and
so instead need to handle it when we're performing the manual migration.

* test(workers/global): clarify empty `X_REPO_CACHE_FORCE_LOCAL` does not get migrated
2026-02-19 11:55:22 +00:00
Jamie Tanna 067a19490b feat: promote repositoryCacheForceLocal out of experimental (#41207)
We've been happily using this with Mend Renovate Self-Hosted customers
since introduction in 2024, and so we're happy making this
non-experimental now.

This follows other changes where we've promoted an experimental option
to non-experimental, and heavily driven by Claude Sonnet 4.5.

We can also rename config item to use the same `repositoryCache` prefix.

Co-authored-by: Claude Sonnet 4.5 <jamie.tanna+github-copilot@mend.io>
2026-02-16 11:20:30 +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
Michael Kriese c641239c19 fix: use stricter types for renovate config (#39594)
* fix: use stricter types for renovate config

* fix: revert changes

* Apply suggestions from code review
2025-11-28 13:16:27 +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
RahulGautamSingh 3691ff90b2 feat(config): baseBranchPatterns (#35579) 2025-07-14 19:05:27 +00:00
Rhys Arkins 319de90d4f feat(config)!: validate allowedCommands against post-compiled commands (#35564)
Drops `allowCommandTemplating` so that templating is always allowed. Changes validation logic so that `allowedCommands` are now compared to the post-compiled command instead of pre-compiled.

BREAKING CHANGE: `allowedCommands` filters need to be updated to match against the post-compiled `postUpgradeCommands` in cases where templating was in use.
2025-04-30 10:54:47 +02:00
Sebastian Poxhofer 78002a0993 feat: add RENOVATE_ prefix to Github com token and env host rules (#34568) 2025-03-05 12:54:30 +00:00
Rhys Arkins 12a62cc0c7 feat: rename allowedPostUpgradeCommands/allowPostUpgradeCommandTemplating (#32657) 2025-01-24 12:30:09 +00:00
Gabriel-Ladzaretti 19a99d2ca9 feat(config): add repo phase enviorment config (#33360) 2025-01-07 06:56:48 +00:00
Gabriel-Ladzaretti 6aa5c4238f refactor(config): reusable env getConfig function (#33350)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2024-12-31 13:28:26 +00:00
renovate[bot] dc6bf16c37 chore(deps): update linters (#32318)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2024-12-20 15:02:34 +00:00
RahulGautamSingh 8ec8391310 feat(self-hosted): convert experimental vars to config options (#29137)
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
2024-08-19 15:45:49 +00:00
renovate[bot] eb8c08079e chore(deps): update typescript-eslint monorepo to v8 (major) (#30750)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2024-08-14 10:33:02 +00:00
RahulGautamSingh 3857332a9e feat(self-hosted): convert experimental env vars to config options (#29154)
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
2024-08-07 07:28:34 +00:00
RahulGautamSingh bb6c27faf8 feat(github): convert platformCommit to enum (#29156)
BREAKING CHANGE: platformCommit will be automatically enabled if running as a GitHub app
2024-07-25 15:28:16 +02:00
RahulGautamSingh 044dc0fa28 feat(self-hosted): mergeConfidenceEndpoint and mergeConfidenceDatasources (#28880)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
2024-05-21 13:57:56 +00:00
RahulGautamSingh 10a4a8bb26 feat(self-hosted): autodiscoverRepoSort and autodiscoverRepoOrder (#28738)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2024-05-06 18:16:01 +00:00
RahulGautamSingh de65584bf8 feat(config): validate file config on repo runs (#26379)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2024-04-13 08:52:28 +00:00
Sergei Zharinov b69416ce17 refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
Jiahao Guo 8ad31261d7 feat(github): support fine-grained token (#23810) 2023-08-16 05:53:48 +00:00
RahulGautamSingh 2c264af8d2 feat: migraterecreateClosed to recreateWhen (#21039)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2023-06-12 15:48:40 +00:00
Marcin Zajączkowski b48a3d30d7 fix(github): Typo in token warning message (#20334) 2023-02-10 18:24:34 +01:00
Jamie Magee e3b163f07a feat: log when using fine-grained PATs (#20097)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2023-01-30 08:48:29 +01:00
RahulGautamSingh c56588eaba refactor: convert PlatformmId to union (#18458) 2022-11-01 14:46:09 +00:00
Rhys Arkins 43c3ea1acb fix(config)!: unify env and cli coercions (#13171)
Unifies CLI and env coercions.

BREAKING CHANGE: boolean variables must be true or false when configured in env, and errors will be thrown for invalid values. Previously invalided values were ignored and treated as false.
2022-10-23 06:48:35 +02:00
Colin O'Dell 976f805d44 fix(config): remove empty items from comma-separated env-supplied config options (#18067) 2022-10-02 05:01:08 +00:00
Michael Kriese 4f82df4c3d feat(buildpack): enable cache (#16591) 2022-07-21 07:00:02 +00:00
RahulGautamSingh 996e4a6e57 feat: rename aliases to registryAliases (#15877) 2022-06-10 05:14:49 +00:00
Maron 0cf2ab4823 feat: refactor requireConfig option (#15594) 2022-05-18 10:21:51 +00:00
Michael Kriese ef470f7f92 feat(config): parse json files as json5 (#15187) 2022-04-29 08:34:55 +00:00
MaronHatoum 3e312fd641 feat: refactor dry-run option (#14849)
* feat : added dryRun new behavior + added more migration

* feat : revert extra space

* feat : revert extra code

* feat : added unit tests

* feat : added unit tests

* feat : removed extra tests + removed unnecessary condition

* feat: changes after CR

* feat: added dry run migration cli and env + unit tests

* Update lib/workers/global/config/parse/cli.ts

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

* feat: migration changes + added logs + added unit test

* feat: removed log msgs + change unit test

* feat: update

* feat: update

* Update lib/workers/global/config/parse/cli.ts

Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2022-04-11 20:29:02 +00:00
Michael Kriese 5723be1ac5 refactor: add strict null checks (#14169) 2022-02-11 11:02:30 +01:00
Sebastian Poxhofer 5eea19b5be feat(autodiscover): reverts autodiscoverfilter as array (#13169)
This reverts commit a0a770338f.
2021-12-17 13:44:40 +01:00
Sebastian Poxhofer a0a770338f feat(autodiscover): allow array for autodiscoverfilter (#13100) 2021-12-16 15:12:35 +00:00
HonkingGoose ab018191fa chore: report and fix unused ESLint disable directives (#12548) 2021-11-08 20:20:03 +01:00
Florian Greinacher 70700eedae feat(config)!: make host rule detection configurable and opt-in (#12294)
Add configuration option `detectHostRulesFromEnv`.

BREAKING CHANGE: `hostRules` are no longer automatically derived from env variables such as `NPM_X_TOKEN`. Set `detectHostRulesFromEnv=true` in config to re-enable same functionality.
2021-11-05 08:10:27 +01:00
RahulGautamSingh 91f067b39f fix: refactor regex to use re2 part3 (#12283)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2021-10-27 14:37:11 +00:00
Florian Greinacher 42fd18d101 refactor: encapsulate hostRulesFromEnv (#12277) 2021-10-23 06:38:23 +00:00
Sergei Zharinov 6f649eb661 feat(platform): Use uniform platformAutomerge option (#12069)
Existing `azureAutoComplete` and `gitLabAutomerge` options are now unified/renamed to `platformAutomerge`, and also defaulting to `true`.

BREAKING CHANGE: Azure autocomplete will now only be enabled when `automerge` is also enabled (to align with how GitLab automerge already worked). If you were using `azureAutoComplete` before without explicitly enabling Renovate `automerge` field then you will now need to do so. Platform automerge is now the default behavior whenever automerge is enabled.
2021-10-11 06:36:07 +00:00
Sergei Zharinov 1b6ea2447f refactor(config): Better prefix handling and enhanced coverage (#12083) 2021-10-09 09:08:00 +02:00
Maksim 1f86b71fd5 refactor: constants (#11690) 2021-10-06 07:43:32 +02:00
Rhys Arkins 7b3e14c5cc logs: global env hostRules 2021-09-17 11:19:27 +02:00
Rhys Arkins 750bc1656e refactor: config/definitions -> config/options 2021-08-17 07:57:45 +02:00
Sergei Zharinov 31785b8742 fix(config): Replace '__' to '_' globally when decoding hostRules from env (#10939) 2021-07-23 10:09:30 +00:00