Commit Graph

3688 Commits

Author SHA1 Message Date
Rhys Arkins 0d5d7a8669 refactor!: remove rangeStrategy=pin from versioning modules (#36261)
Refactors `getNewValue` logic to replace it with an optional
`getPinnedValue()` where rangeStrategy=pin. This way each versioning
module doesn't need to add and test extensive "pin" logic.

This should not be breaking, but out of an abundance of caution, we'll
mark it as such.
2025-11-06 08:07:40 +00:00
Jamie Tanna 1cf9b1c6a4 feat(minimumReleaseAge)!: require a release timestamp by default (#38843)
As noted in #37952, we've seen a significant increase in recent years on
a number of package ecosystems being targeted with supply chain security
attacks.

We're in a particularly strong position to improve the level of security
across the world by setting a default for `minimumReleaseAge` in the
`best-practices` config preset.

To do this, we can introduce a new preset,
`security:minimum-release-age` to house these recommended options.

We use new presets `security:minimum-release-age` and
`security:minimum-release-age-npm`, to allow consumers to utilise
`ignorePresets` to undo this configuration, if they so wish.

As a first step towards securing our users, we can set a default for
npm, which as a large ecosystem with an increased number of packages
that depend on other packages (compared to other ecosystems), has been a
more targeted area.

In the future, we can expand this for other managers, as it makes sense,
and as support is added for them to use `minimumReleaseAge`.

Closes #38457.
2025-11-06 08:07:40 +00:00
Rhys Arkins 4e4a0f99b0 fix!: remove the "Bot" from user-agent header (#37535) 2025-11-06 08:07:40 +00:00
Jamie Tanna 3c98e9dca5 chore(minimumReleaseAge): add missing word in log message (#39068) 2025-11-05 10:19:35 +00:00
Jamie Tanna ec91e744b1 chore(config-migration): capitalise Renovate (#38985)
* chore(config-migration): capitalise `Renovate`

* fixup! chore(config-migration): capitalise `Renovate`
2025-11-04 20:37:46 +00:00
Sergei Zharinov 14f69984cc fix: Reorder saveCache and pruneStaleBranches in repository finalization (#39072)
* fix: Reorder saveCache and pruneStaleBranches in repository finalization

* Remove unused variable in repository cache save method

* Update lib/workers/repository/finalize/index.ts
2025-11-04 19:13:10 +00:00
Jamie Tanna 1e2f87fb6b chore(minimumReleaseAge): log the updateType when skipping updates (#39070)
As part of future changes, where it's more important to know what
`updateType` is being filtered, we will want to have this information
output to the logs.

This also changes the log field outputting, as `depNames` no longer
makes sense now we have both `depName` and `updateType`.
2025-11-04 17:27:48 +00:00
Felix Breuer 19c396a44a chore(minimumReleaseAgeBehaviour): reduce number of WARN log lines (#39001)
* chore: debug log message when timestamp is optional

When setting minimumReleaseAgeBehaviour to optional
it is intended that packages that does not have a release timestamp
will get updated. Writing a warning to the console is spam for an
intentional setting.

* chore: re-add WARN log, once

To make sure that users are still aware, we can make sure a single
warning log message is emitted.

---------

Co-authored-by: Jamie Tanna <jamie.tanna@mend.io>
2025-11-04 10:20:13 +00:00
renovate[bot] b4ed9e65d9 chore(deps): update dependency @vitest/eslint-plugin to v1.3.23 (main) (#38702)
* chore(deps): update dependency @vitest/eslint-plugin to v1.3.23

| datasource | package               | from   | to     |
| ---------- | --------------------- | ------ | ------ |
| npm        | @vitest/eslint-plugin | 1.3.16 | 1.3.23 |

* remove now unnecessary exceptions

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: secustor <sebastian@poxhofer.at>
2025-10-31 07:50:48 +00:00
RahulGautamSingh 34486b39b7 chore: log when pending upgrades are filtered (#38352)
* chore: add log if pending updates are filtered

* apply suggestions

* fix: filter pending upgrades logic

* add test

* fix typo

* add new test

* Update lib/workers/repository/updates/generate.ts

Co-authored-by: Jamie Tanna <github@jamietanna.co.uk>

* only add a log msg

* revert

* fix failing tests

---------

Co-authored-by: Jamie Tanna <github@jamietanna.co.uk>
2025-10-29 10:14:37 +00:00
RahulGautamSingh cdd0ab4b88 fix(workers/branch): skip branch update if pendingChecks=true (#38720)
* fix: skip branch update if pendingChecks=true

* no-work -> pending

* apply suggestions

* Apply Suggestions
2025-10-29 08:56:26 +00:00
RahulGautamSingh 3c4b2f6935 feat(logs): convert invalid config log level to warn (#38925)
logLevel: info -> warn
2025-10-29 07:12:50 +00:00
RahulGautamSingh c62635d6d1 fix(changelog): handle codeblocks in markdown (#38860)
* fix: do not modify # within codeblocks

* fix: parse fenced section in markdown

* add test

* Update lib/workers/repository/update/pr/changelog/release-notes.ts

* use re2
2025-10-25 17:35:45 +00:00
Jamie Tanna 1ec6ea4011 chore(instrumentation): instrument empty extraction (#38845)
To make sure that we're always providing a trace for the `extract`
split, we should instrument, regardless of whether it's a no-op.
2025-10-25 11:49:05 +00:00
RahulGautamSingh e148b9986e fix(workers): do not swallow init error (#38764) 2025-10-21 07:44:40 +00:00
Volker 086af99876 refactor(lookup): optimize version filtering logic in filterVersions and lookupUpdates (#38539)
* Optimize version filtering logic in filterVersions and lookupUpdates functions

* Simplifies version filtering optimization to cover conditions by existing tests.

* Further reduction of versioning API usage.

* Keeping compatibility of exported function filterVersions()
2025-10-20 10:53:13 +00:00
Jamie Tanna a62837ae95 chore(instrumentation): instrument the init repo split (#38607)
As part of a step towards better OpenTelemetry instrumentation as part
of #38609, we need to capture the `init` repository split, as the other
splits are currently instrumented.

Note that we've duplicated the error handling, as the `localDir` may be
unset, and we need to handle it.
2025-10-20 08:18:56 +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 a86b32ea0f feat: configurable repo config filenames (#36644)
* feat: configurable repo config filenames

* docs: configFileNames

* fix tests

* update tests

* fix coverage

* Apply Suggestions

* refactor: remove platform-based filename filtering

* docs

* refactor

* docs: add note for config-validator use

* feat: add inherited config support

* fix: build

* fix lint

* fix test
2025-10-20 06:19:01 +00:00
Maxime Brunet 765a5eb5ae chore(minimumReleaseAgeBehaviour): correct warning message (#38663)
fix: correct minimumReleaseAgeBehaviour=timestamp-optional warning message
2025-10-17 10:46:45 +00:00
Jamie Tanna 4393503d55 feat(minimumReleaseAge): optionally enforce presence of releaseTimestamp (#38363)
As noted in #38290, #38348, a "rough edge" of the current implementation
of `minimumReleaseAge` is that:

- if we have set `minimumReleaseAge` to apply to a given dependency
- and we have 3 dependencies that need an update
  - 2 of which have a `releaseTimestamp` that is not yet "stable"
  - 1 of which does not have a `releaseTimestamp`

The dependency update that does not have a `releaseTimestamp` will be
treated as "stable", and will receive an update immediately.

To make this a little more predictable, and explicit, we should add a
new configuration item, `minimumReleaseAgeBehaviour`, to control this
behaviour.

This adds the new configuration field, as well as making it available as
a strongly typed field in the codebase.

In the case that `minimumReleaseAgeBehaviour=timestamp-optional` is
being used, we will WARN on any packages that are being updated, but
maybe shouldn't be, as a way to proactively inform the user of possible
misconfiguration.

Closes #38290, #38348.
2025-10-16 10:27:03 +00:00
Jamie Tanna 3d3224c581 test: document the test isn't intended to succeed (#38636)
While working on #38607 and #38633, I noticed that this doesn't actually
successfully return.

We should document this more clearly for the next person interacting
with it.
2025-10-15 13:53:21 +00:00
Jamie Tanna 06c6d2bb5f test: correctly override localDir (#38635)
While working on #38607 and #38633, I noticed that this doesn't actually
override the value of `localDir`, as `GlobalConfig.set` overrides any
existing configuration, and when we call `renovateRepository`, this also
calls `GlobalConfig` and overrides the value.
2025-10-15 13:48:07 +00:00
Jamie Tanna d43af5a5be chore(orphan): log skipped branch names (#38522)
As it makes it more straightforward to determine which branch is being
marked as "orphaned" when reading the logs.
2025-10-14 10:07:06 +00:00
renovate[bot] 1280fe4dc7 chore(deps): update dependency @vitest/eslint-plugin to v1.3.16 (main) (#38502)
* chore(deps): update dependency @vitest/eslint-plugin to v1.3.16

| datasource | package               | from   | to     |
| ---------- | --------------------- | ------ | ------ |
| npm        | @vitest/eslint-plugin | 1.3.13 | 1.3.16 |

* fix linting errors

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: secustor <sebastian@poxhofer.at>
2025-10-13 09:24:15 +00:00
Jamie Tanna a942f63bd5 fix(merge-confidence): use packageName for all lookups (#38468)
When performing lookups in Mend's Merge Confidence APIs, our contract
requires that we use the `packageName` not the `depName`.

In 9b7ae6aa98 and
b67eae2180 we made changes to make sure
that this wasn't the case, but we ended up missing a couple of cases.
2025-10-09 13:54:08 +00:00
Jamie Tanna 65d7080920 chore: add Repository Result metadata to "Repository Finished" log (#37089)
chore: add Repository Result metadata to log messages

The `Repository result` log message is useful for understanding
at-a-glance why a Renovate run may have not worked.

Adding the metadata that currently exists in the log line as Meta keys
would allow for logging tools to be able to more meaningfully
interpolate the data, without requiring parsing of the underlying
string.

Co-authored-by: Jamie Tanna <jamie.tanna@elastic.co>
2025-10-07 14:48:38 +00:00
Jamie Tanna ddfa560100 test: correct test name (#38364)
* chore(tests): correct test names

As they're not quite in line with reality.

* sq
2025-10-06 13:39:18 +00:00
Jamie Tanna d621588e1c test(minimumReleaseAge): document releaseTimestamp leads to immediate PRs (#38362)
As part of discussion in #38290, #38348 and #38324, the current
behaviour of `minimumReleaseAge` has been flagged as not particularly
great, as when we run with `minimumReleaseAge` enforced, a package that
does not return a `releaseTimestamp` will no longer be treated as
release that is bound by `minimumReleaseAge`'s checks to make it
pending.

As noted in the discussions, this can lead to cases where users are in a
"false sense of security", as they feel comfortable with
`minimumReleaseAge` in place, but it is not being enforced, only when
the `releaseTimestamp` is present.

Before we change this, we should add a test to document the existing
behaviour.

[0]: https://github.com/renovatebot/renovate/discussions/38290
[1]: https://github.com/renovatebot/renovate/discussions/38348
2025-10-06 12:00:55 +00:00
Jamie Tanna 0f47c71bd6 test: remove snapshots from filter-checks (#38365)
chore(tests): remove snapshots from `filter-checks`

As CI complains about it when modifying tests in this file, so we should
prefactor these snapshots out.
2025-10-06 10:56:04 +00:00
RahulGautamSingh 15e2af3e72 fix: don't fetch repo config file when in fork mode (#38384) 2025-10-06 10:13:39 +00:00
travisshivers 49db650766 fix(gerrit): pass config labels to commitAndPush (#38288)
* fix(gerrit): pass config labels to commitAndPush

Pass the config labels to commitAndPush so they get properly populated
for gerrit.

This follows from https://github.com/renovatebot/renovate/pull/35900
which added label support for gerrit but didn't properly pass them
along in all places.

* test: fix tests

Fix tests

* test: extend commit test to ensure labels are passed

Extend the commit test to ensure labels are passed

* refactor: add comment indicating labels are needed only for gerrit

Add comment indicating labels are needed only for gerrit.
2025-10-03 07:28:02 +00:00
Sergei Zharinov d877999ea2 fix: Reopen autoclosed PRs with new title (#38347)
* refactor: Pass new title when reopening autoclosed PR

* Add title parameter to `tryReuseAutoclosedPr`
2025-10-02 19:55:45 +00:00
RahulGautamSingh 244af72e2a test: add digest only update case (#38298)
test: add digest only update
2025-09-30 23:27:47 +00:00
Michael Kriese d01a34673c fix: Revert "fix(jsonata): updates when version and digest changed (#36461)" (#38265)
Revert "fix(jsonata): updates when version and digest changed (#36461) (#38066)"

This reverts commit 15c1fa662c.
2025-09-28 09:37:34 +00:00
Grégoire Paris 6f1c64fec8 fix: use a instead of an in reconfigure PR comment (#38199) 2025-09-24 11:56:48 +00:00
Grégoire Paris 0579f6c670 feat: print reconfigureBranch (#38181) 2025-09-23 15:33:04 +00:00
Mirko Kruschke cb695e3907 feat(npm): support yarn catalogs via yarn-plugin-catalogs (#37293)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>
2025-09-22 14:41:46 +00:00
Florian Greinacher 43894ea1ed fix(status-checks): do not set status checks in dry run (#38110) 2025-09-20 14:10:40 +00:00
Jalil David Salamé Messina 15c1fa662c fix(jsonata): updates when version and digest changed (#36461) (#38066)
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
2025-09-19 19:52:09 +00:00
Johannes Feichtner 17293d503b feat(vulnerabilities): add support for CVSS 4.0 in OSV alerts (#35209) 2025-09-12 04:57:36 +00:00
Anne Stellingwerf b5c4657f7e feat(dependency-dashboard): support for grouping branches in the dependency dashboard (#37140)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2025-09-11 22:20:51 +00:00
RahulGautamSingh 3823baa7dc fix(config): validate & migrate base branch config (#37902) 2025-09-09 06:29:25 +00:00
Maxime Brunet 971e951d80 fix: add manager/packageFile field to fetchUpdates trace logs (#37839) 2025-09-05 06:30:59 +00:00
Michael Kriese 7ac5c93070 fix(platform): open or update issue correctly (#37831) 2025-09-04 10:29:04 +00:00
Joshua Spence d8fc0dadcc feat: Add workingDirTemplate to postUpgradeTasks (#37697)
Co-authored-by: Birger Johan Nordølum <33870508+MindTooth@users.noreply.github.com>
Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
2025-09-03 09:54:45 +00:00
Joshua Spence a345257655 feat: Pass git environment variables to postUpgradeCommands (#37694)
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
2025-08-28 20:54:54 +00:00
Sergei Zharinov 476b5ece1c fix: Supersede managers exclusively (#37737) 2025-08-28 04:50:16 +00:00
Sergei Zharinov 585f1d5886 refactor: Reduce loop nesting for processSupersedesManagers (#37733) 2025-08-27 15:43:15 +00:00
RahulGautamSingh 9799cb01c7 fix(config/parse): merge extends iff additionalConfigFile has extends (#37717) 2025-08-27 10:36:37 +00:00