Commit Graph

65 Commits

Author SHA1 Message Date
Sebastian Poxhofer 8d08b51db0 refactor: return a RepositoryResult while onboarding (#45531)
* refactor(onboarding): return repository result from ensureOnboarding

Rename ensureOnboardingPr to ensureOnboarding and have it return a new
'onboarding' RepositoryResult. renovateRepository now branches on
repoIsOnboarded, so exactly one of ensureOnboarding/updateRepo produces
the repository result and the non-null assertion on the update result
(TODO #22198) is no longer needed. updateRepo/update no longer return
undefined for non-onboarded repositories.

* refactor(onboarding): keep ensureOnboardingPr name
2026-08-28 11:50:28 +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
Sebastian Poxhofer d57843c60d refactor(oxlint): enable typescript/no-unnecessary-type-arguments (#44555)
Enable the type-aware typescript/no-unnecessary-type-arguments rule as
error and remove all 44 pre-existing redundant type arguments (type
arguments identical to the type parameter default), e.g.
HttpResponse<string>, ZodError<unknown>,
PackageDependency<Record<string, any>>.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 12:33:42 +00:00
Jamie Tanna 01f2479eab feat(osv): mark malicious packages with skipReasons (#42510)
* fix(workers/repository): don't include `skipReason`'d dependencies in flattened updates

When we're preparing the final, flattened, list of branches to prepare
updates for, we're not filtering out any dependencies that have a
`skipReason` in them.

In the case that, as part of future changes like #42510, a `skipReason`
may be added after the `lookup` phase, we can still get PRs raised even
when they shouldn't be.

We already filter out `enabled=false`, so we should make sure to also
filter anything with a `skipReason`.

* feat(osv): mark malicious packages with `skipReason`s

As part of current ongoing supply chain attacks, there have been cases
where Renovate updates packages to a malicious version.

We'll be introducing a more in-depth means to surface these, including
from different API sources, as part of the Enrichment functionality,
but in the short-term we can utilise osv.dev's ingestion of OpenSSF's
Malicious Packages data.

To do this, we need to:

- look for any `MAL-` advisories
- match it against the current dependency's version, and if affected, mark it
  as `skipReason: malicious-version-in-use` (which will be unset in
  the `lookup()` function, so we still perform updates
- match it against the dependency's available updates, and if any are
  affected, mark the dependency
  as `skipReason: malicious-update-proposed`

* fixup! feat(osv): mark malicious packages with `skipReason`s

* fixup! feat(osv): mark malicious packages with `skipReason`s

* test(workers/repository): add missing coverage

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

* chore: simplify type

* wip-opus

* Revert "wip-opus"

This reverts commit e7b5f297c9.

* simplify

* sq

* sq

* fixup

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

---------

Co-authored-by: Claude Opus 4.6 <jamie.tanna+claude-code@mend.io>
2026-04-14 13:11:04 +00:00
Jamie Tanna a945d8bc5a chore(workers/repository): split malicious dependency checks (#42508)
* chore(workers/repository): report malicious packages before `packageFiles with updates`

As part of future changes, we may modify the `skipReason`s before the
update phase, which means that we should ensure these are correct before
logging out `packageFiles with updates`.

* chore(workers/repository): split malicious dependency checks

We will likely run into two specific cases of malicious dependencies -
you're currently using one, or you're receiving an update to one.

We should make these separate, explicit, cases so users are aware what
`malicious` actually means, and what the path forward is.
2026-04-09 19:06:50 +00:00
Jamie Tanna 1caa918bb9 chore(workers/repository): log warning on skipReason: malicious (#42504)
As part of future changes, we'll be introducing `skipReason: malicious`
against dependencies that have been found to be actively malicious.

Once we've looked up all our dependencies, we should then - centrally -
log any malicious package usages as a WARN, to highlight this to users.
2026-04-09 11:29:28 +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 55a447e805 chore(instrumentation): further instrument extract phase (#39614)
As it's interesting to see how much each of these take.
2025-11-28 14:19:09 +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 95ea2c9078 fix(branchPrefix): include base branch name iff multiple bases expected (#35423)
* use branchPrefix if multiple base branches expected

* fix test

* fix coverage

* apply suggestions

* apply suggestions

* use utility fn

* refactor tests

* fix test

* major overhaul: use baseBranches field internally

suggested by @secustor

* refactor: cleanup

* test: use better descriptions

* add tests

* fix logic

* fix test

* exclude unlisted versions when finding latestStable

---------

Co-authored-by: Rhys Arkins <rhys@arkins.net>
2025-10-20 06:27:56 +00:00
RahulGautamSingh 3691ff90b2 feat(config): baseBranchPatterns (#35579) 2025-07-14 19:05:27 +00:00
RahulGautamSingh 326cfb5b0d feat: interactive reconfigure pr (#34696)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2025-06-15 22:04:26 +00:00
RahulGautamSingh b06ef83e9a refactor(workers): enhance some fns (#35941) 2025-05-17 11:09:39 +00:00
Sergei Zharinov 24f51381bc feat(cache): Clean datasource memory cache after fetch (#35713) 2025-05-06 11:28:04 +00:00
Michael Kriese b5ff90f2bd fix: improve coverage (#34667) 2025-03-06 17:05:19 +00:00
Sebastian Poxhofer e78c78a2ef feat(instrumentation/reporting): add libyear support (#34278) 2025-02-18 06:19:21 +00:00
Rhys Arkins db603320bc feat: libyear (#33521) 2025-01-11 21:42:18 +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
Rhys Arkins 8ae744857c fix(cache): add extract revision, stop deleting skipReason (#33172) 2024-12-17 16:41:41 +00:00
Rhys Arkins 07c005869c feat: extend skipStage to extract, lookup (#33108) 2024-12-14 10:32:51 +00:00
Sebastian Poxhofer 3681b2a945 chore: eslint to enforce for typed imports (#30844) 2024-08-19 13:15:27 +00:00
RahulGautamSingh b6d2c4bb32 refactor: remove old code related to deprecationWarningIssues (#29743) 2024-06-24 08:24:01 +00:00
Sergei Zharinov b69416ce17 refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
Rhys Arkins 36e2b328bb chore: update types reference 2023-08-15 11:31:15 +02:00
Rhys Arkins 7965b5ae98 chore: log when osv true 2023-06-01 07:03:31 +02:00
Rhys Arkins 9276a54069 refactor(scm): use scm for getFileList, checkoutBranch (#22006) 2023-05-07 04:12:15 +00:00
Sebastian Poxhofer 9d2871085c refactor(vulnerabilities): rename fetchVulnerabilities to appendVulnerabilityPackageRules (#21468) 2023-04-12 20:34:13 +00:00
Markus Schulz dd6c8e5147 feat: Move some Git commands behind a PlatformScm interface (#19327)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2023-02-22 08:18:53 +00:00
Rhys Arkins cc33d34ca8 refactor: PackageFile types (#20498)
Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2023-02-20 14:58:49 +00:00
Rhys Arkins 3cef2f2e4f refactor: PackageFile -> PackageFileContent (#20502) 2023-02-19 12:43:48 +00:00
Johannes Feichtner a91ca62b46 feat(vulnerabilities): add feature-flagged support for OSV (#20226)
Co-authored-by: Jamie Magee <jamie.magee@gmail.com>
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>
2023-02-10 10:13:47 +00:00
Rhys Arkins cf6be1719e feat(cache): retain fingerprints for all matched managers (#20138) 2023-02-01 09:12:45 +01:00
RahulGautamSingh c7c5c8fb47 refactor: ExtractResult (#20131) 2023-01-31 20:05:23 +01:00
RahulGautamSingh 92abdc9b4d feat(cache): reduce configHash fields for fingerprinting (#18216) 2022-12-16 15:50:35 +00:00
Rhys Arkins 3aa94d46f4 chore: no meta for debug statements 2022-10-21 08:02:05 +02:00
RahulGautamSingh 3bbd8b8914 chore: set ignoreRestSiblings to true (#18193) 2022-10-07 17:35:01 +02:00
Rhys Arkins dbc4d0b669 fix: exclude unstable data from cache fingerprints (#18148) 2022-10-06 15:39:15 +02:00
Gabriel-Ladzaretti 9f837f226d feat(lib/logger): add base branch metadata for multi-base repositories (#17027) 2022-08-12 08:19:31 +00:00
Sergei Zharinov f8c789efb4 feat(github): Log warning when GitHub token is not configured (#16566)
* feat(github): Log warning when GitHub token is not configured

* Check `sourceUrl`

* Add tests

* Fix test

* Fix

* Remove `sourceUrl` check

* Test nullable input

* Fix nulls
2022-08-01 06:16:09 +00:00
IKEDA Sho 45d0dbf884 refactor(workers): Prefer interface over type (#16727)
https://github.com/renovatebot/renovate/blob/main/docs/development/best-practices.md#general
2022-07-24 08:53:54 +03:00
Michael Kriese e5c6f38d75 refactor: enable strict checks (#16168)
* refactor:  enable strict checks

* chore: revert changes

* chore: fix tsconfig
2022-06-21 13:00:21 +02:00
Sergei Zharinov 0cf4f48842 refactor: Strict null checks for all files except tests (#16071)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2022-06-20 11:47:07 +02:00
Rhys Arkins dca3418bbd refactor: lib/modules (#14488)
Moves datasource, manager, platform and versioning code from lib/ into new lib/modules/

BREAKING CHANGE: External tools must update paths to datasource, manager, platform and versioning
2022-03-04 09:04:02 +01:00
Rhys Arkins d3808fbc3b refactor: log branchName for each update 2021-03-07 22:11:19 +01:00
Michael Kriese 74d7691bef refactor: optimize type usage (#8947) 2021-03-02 21:44:55 +01:00
Rhys Arkins 728082b3c3 fix(cache): correct revision 2021-02-22 19:39:33 +01:00
Rhys Arkins 814986e9f8 fix(cache): delete dep updates after load 2020-10-21 09:45:10 +02:00
Jamie Magee 5896d9cb37 chore(eslint): fixing some eslint warnings (#7382)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2020-10-05 18:12:01 +02:00
Rhys Arkins 1627db8c3f refactor: simplify baseBranchSha, reduce checkouts (#7159) 2020-09-01 18:32:58 +02:00
Rhys Arkins c1245b2d4b feat(internal): lazy git initialization (#7006)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2020-08-28 10:08:39 +02:00