Commit Graph

3913 Commits

Author SHA1 Message Date
Sebastian Poxhofer 91e068f1fd test(linters): add linting rule to enforce v8 ignore reason declaration (#44726)
* ci(linter): add renovate/v8-ignore-reason rule

Flag coverage-ignore comments ("v8 ignore") that carry no justification.
Accepted forms: "-- reason" / "--- reason" (recommended) and the legacy
colon form "v8 ignore <kind>[ <count>]: reason", which is already
widespread in the codebase (29 sites). Bare "v8 ignore stop" markers are
exempt because the justification lives on the paired "start" marker. The
"v8 ignore next <N>" count form remains allowed; this rule only requires
a justification.

Registered as "warn" instead of "error": the repo currently has 119
reason-less v8 ignore comments, too many to fix mechanically in one PR,
so existing sites are left untouched and can be fixed incrementally.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* ci(linter): promote renovate/v8-ignore-reason to error

Record the empirical verdict on the contested "v8 ignore next <N>" count
semantics in the rule doc: verified against vitest 4 with
ast-v8-to-istanbul that the count is not honored - the ignore hint always
exempts exactly the next AST node regardless of N. Counts are therefore
inert and stay allowed; the rule keeps requiring only a justification.

Promoting to error so all remaining reason-less coverage-ignore comments
must be fixed; the burndown follows in subsequent commits.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RxHFNsSworLcv23xXk9Hk

* refactor: add justifications to coverage-ignore comments (batch 1)

Give every reason-less "v8 ignore" comment outside the large platform
index files a site-specific justification explaining why the exempted
branch is untestable or defensive, as now required by the
renovate/v8-ignore-reason rule.

Also guard against a nullish comment.loc in the rule itself; the
merged-in stricter tools typechecking flagged the unguarded access.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RxHFNsSworLcv23xXk9Hk

* refactor: add justifications to coverage-ignore comments (batch 2)

Cover the five large platform index files (github, bitbucket,
bitbucket-server, codecommit, gitlab) with site-specific reasons on
every "v8 ignore" comment, completing the renovate/v8-ignore-reason
burndown. Two meaningless ignore hints inside commented-out CodeCommit
mergePr code are dropped instead of annotated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RxHFNsSworLcv23xXk9Hk

* Apply suggestions from code review

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

* Update lib/util/regex.ts

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

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2026-07-20 13:01:39 +00:00
Sebastian Poxhofer 1e03699cd6 test: add linter for as LongCommitSha in test files (#44681)
* test: add linter for `as LongCommitSha` in test files

Adds a custom oxlint rule `renovate/prefer-fake-sha-in-specs` that flags
`as LongCommitSha` casts in spec files and suggests the deterministic
`fakeSha()` helper from `test/util` instead. Enabled at error level for
`**/*.spec.ts` and `test/**`; all 131 pre-existing casts across 22 spec
files replaced.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Update lib/modules/platform/bitbucket-server/index.spec.ts

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 10:08:09 +00:00
Jamie Tanna 7ac677dc9b fix(platform/azure): evaluate policies before attempting to merge PR (#44631)
When a PR created on Azure is inside a project or repository that has
additional policy evaluations that need to be fulfilled for a given PR,
we should not attempt to perform a manual `mergePr` unless the policies
allow us to.

Previously, we would attempt to `mergePr` and would result in

    DEBUG: Failed to set the PR as completed.

Platform-native auto-merge functionality would still work as expected,
as once the evaluations had succeeded (for instance, a PR is approved by
a human) Azure will auto-merge it.

However, the failure in attempting to merge it is noisy, and should be
avoided by evaluating the policies before attempting to merge.

Co-authored-by: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>
2026-07-20 09:21:55 +00:00
Jamie Tanna 0e6429b13e refactor(types): document localDir isn't a globalOnly option (#44635)
* refactor(types): document `localDir` isn't a `globalOnly` option

To make sure that it's clear when reviewing `GlobalConfig`, as well as
working with our types, we can move the `localDir` definition into a
separate type.

* fixup! refactor(types): document `localDir` isn't a `globalOnly` option

* fixup! refactor(types): document `localDir` isn't a `globalOnly` option

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

* fixup! refactor(types): document `localDir` isn't a `globalOnly` option

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

* fixup! refactor(types): document `localDir` isn't a `globalOnly` option

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

---------

Co-authored-by: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>
2026-07-20 08:07:17 +00:00
renovate[bot] ac6614eb32 docs: update references to python to 311ea5b (main) (#44716)
docs: update references to python to 311ea5b

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-07-20 01:40:09 +00:00
Jonathan Hill 0f06e635df feat(platform-azure): initial bearer token auth support for Azure DevOps (#43888)
* feat(platform/azure): support bearer token auth (auto-detect token type)

* refactor(platform/azure): use isPlainObject for JWT header check

Replace manual typeof/null check with isPlainObject() from
@sindresorhus/is in isProbablyJwt(). Remove unused _GlobalConfig
import from test file.

* refactor(platform/azure): use parseJsonc to parse JWT header

* test(platform/azure): use a real JWT in the set bearer token/endpoint test

* feat(platform/azure): log detected token type

* refactor(platform/azure): guard token before JWT check; remove outdated todo comment

* docs(platform/azure): restore TODO note about possibly-undefined token (#22198)

* refactor(platform/azure): move isProbablyJwt() and tests to new files lib/util/http/jwt.ts and lib/util/http/jwt.spec.ts

* refactor(platform/azure): use Json.safeParse() instead of parseJsonc() in isProbablyJwt()

* refactor(platform/azure): accept undefined token in isProbablyJwt and add guard to drop non-null assertions

* test(platform/azure): extract shared buildTestJwt helper and dedupe

* docs(platform/azure): reword the Entra ID token instructions

* chore(platform/azure): remove irrelevant lines from docstring

* refactor(platform/azure): export buildTestJwt() from new test/jwt-util.ts

* docs(platform/azure): use 1 for numbered lists

* refactor(test): extract arrow function from buildTestJwt

---------

Co-authored-by: Bastian Wenske <bastianwenske@outlook.de>
2026-07-19 23:01:52 +00:00
Sebastian Poxhofer 58771bb183 refactor(linters): enabled oxlints func-style (#44691)
* refactor(oxlint): enable func-style

Enable the built-in func-style rule as ["warn", "declaration"] so that
named functions are written as function declarations instead of arrow or
function expressions assigned to variables, matching the convention in
docs/development/best-practices.md (Functions section). Inline arrow
callbacks are unaffected; prefer-arrow-callback continues to cover the
callback direction.

Severity is "warn" instead of "error" as a fallback: a repo-wide run
found 196 pre-existing violations (70 in spec files, 126 in production
code), exceeding the 80-violation fix threshold for this change, so no
violations were fixed here. Follow-up work can convert the offenders
(largest clusters: lib/modules/versioning/ruby, lib/util/cache/package,
lib/modules/versioning/maven, lib/modules/versioning/gradle) and then
raise the rule to "error". Note oxlint 1.72 also supports an
allowTypeAnnotation option if typed consts should remain arrows.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* ci(linter): enforce func-style at error

* refactor(func-style): convert const-arrow functions to declarations in with-cache spec and ruby versioning

* refactor(func-style): convert const-arrow functions to declarations in maven/gradle modules

* refactor(func-style): convert const-arrow functions to declarations in remaining versioning modules

* refactor(func-style): convert const-arrow functions to declarations in platform modules

Discriminated-union closures (ensureCommentRemoval byTopic/byContent
helpers in github, gitlab, bitbucket, bitbucket-server) needed the
narrowed field passed explicitly as a parameter, since function
declarations are hoisted and lose the outer if-narrowing that inline
arrow-function closures previously relied on.

* refactor(func-style): convert const-arrow functions to declarations across util/manager/datasource modules

One case (logger/renovate-logger.ts logOnceFn) is kept as an arrow
function with a documented oxlint-disable: it is stored on
this.logger.once[level] and relies on lexically-bound this, which a
hoisted function declaration would not preserve.

* refactor(func-style): convert remaining const-arrow test helpers to declarations

get-updated.spec.ts: hoisted expectPipCompilePackageAndLockFile to
module scope (it only closes over the module-level pipCompile mock)
and added a documented oxlint-disable for vitest/expect-expect on its
caller test, since oxlint's expect-expect check does not trace
assertions through an externally-defined helper function.

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 11:14:22 +00:00
Sebastian Poxhofer 5ad36a2387 test(linters): add linting rule to enforce usage of host rules test util (#44692)
* ci(linter): add renovate/no-host-rules-mock rule

Flags vi.mock()/vi.doMock() calls whose module specifier contains
"host-rules" in spec files. Tests should configure real rules via
hostRules.add() instead of mocking the host-rules module.

Enabled at "warn" severity instead of "error": the repo currently has
35 pre-existing violations across 34 spec files, which exceeds the
agreed fix threshold of 12 files. No violation fixes are included;
migrating each spec to real hostRules.add()/clear() setup is a
semantic test rewrite that should be done incrementally, after which
the rule can be promoted to "error".

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* ci(linter): enforce renovate/no-host-rules-mock at error

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test(datasource): use real host-rules instead of mocking

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test(manager): use real host-rules instead of mocking

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test(platform): use real host-rules instead of mocking

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test(util,workers): use real host-rules instead of mocking

Also narrow renovate/no-host-rules-mock to the host-rules module itself so that mocking e.g. host-rules-from-env is not flagged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* ci(linter): mention '~test/host-rules.ts' util in no-host-rules-mock message

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 10:36:12 +00:00
Felipe Santos 8e6a7fc2e6 fix(git): detect commits modified through rebase or amend (#44587)
* fix(config): make platformCommit global-only

* fix(git): reapply committer check for isBranchModified

Reapply #42975 (reverted in #43171): treat a different committer
(rebase/amend/Gerrit UI) as a branch modification.

* fix(git): ignore platformCommit committer from init-time list

Register noreply@${host} at GitHub initPlatform when platform commits
are active. isBranchModified only consumes the list — correct for
github.com, ghe.com, and self-hosted GHES.

Share isPlatformCommitEnabled() with GithubScm so commit path and
ignore-list registration use the same rule.

* refactor: stop threading platformCommit through commits

Decision is resolved once in GitHub initPlatform
(isPlatformCommitEnabled). Workers no longer pass the raw option on
CommitFilesConfig — it was unused after that change.

* refactor: simplify platformCommit / ignore-author wiring

Drop cached platformCommitEnabled flag — isPlatformCommitEnabled() is
a pure read of GlobalConfig + isGHApp. Trim redundant tests and
trace noise.

* Simplify env var setting

* revert: keep platformCommit packageRules-capable

Do not make platformCommit global-only. Restore CommitFilesConfig
threading and GithubScm reading commitConfig.platformCommit so rules
can still set platformCommit per package (see #44585 discussion).

* fix(github): always ignore platformCommit noreply committer

Do not gate noreply@host on isPlatformCommitEnabled (that needed
global platformCommit). Always register host noreply at init so
packageRules can still flip platformCommit per commit while
isBranchModified stays correct.

Remove isPlatformCommitEnabled; GithubScm again uses
commitConfig.platformCommit.

* Simplify some stuff

* Add one assertion

* Change some comments
2026-07-18 12:47:11 +00:00
Eugene Harold Krabs 7ab2063040 fix(nuget): fall back to nupkg metadata on nuspec 404 (#44388) 2026-07-18 06:05:31 +00:00
Felipe Santos 18c9c9340e feat(gerrit): rework scm implementation (#38966)
* fix(gerrit): remove memCache to fix prNo coming as null when pr-created

* perf(gerrit): remove custom scm functions

* Fully remove login parameter from configureScm()

* Fetch refspecs in batches

* Remove unnecessary error handling

* Add tests

* Throw if branch init fails

* Simplify tests a little

* Reduce more the tests

* More test changes

* Reuse the existing test setup more

* Undo test import change

* Improve initializeBranchesFromRefspecs JSDoc

* The same for deleteBranchCreatedFromRefspec

* Reduce a log to trace level

* Abandon Code-Review -2 changes before initializing repository

* Simply initialize the branches after git.initRepo()

* Rework approach to be more generic

* Add TODO comment about commitAndPush()

* fix(gerrit): defer change creation to `createPr()`

Signed-off-by: Felipe Santos <felipe.santos@ericsson.com>

* Refactor hashtags handling

* Add prTitle to all missing commitAndPush()

* Fix type check

* Fix test issue

* Fix gerrit tests

* Add warning when prTitle is set in updatePr

* Remove now useless labels from commitAndPush

* Fix gerrit client coverage

* Fix gerrit scm coverage

* Fix rebase coverage

* Improve TODO about assignees

* Fix formatting

* Fix review comment

* Extract to a pushForReview function

* Fix after #41382

* Fix onboarding

* Cleanup code

* Fix ESLint

* Fix tests

* Restore gitRetry for git.merge

* Fix tests

* Simplify hashtags code

* Delete pendingChangeBranch in pushForReview()

* Fix test name

* Remove unnecessary test comments

* Improve test name again

* Fix another test name

* Delete local branch in Gerrit SCM

* Add test for deleting pending branch

* Add tests for pushForReview()

* Simplify/optimize commitAndPush

* Align jsdoc terminology on virtual branches

* Remove no longer relevant TODO

* Update virtal branch on push

* Simplify deleteVirtualBranch

* Fix test case name

* Improve another test name

* Restore test deleted by mistake

* Fix another small test inconsistency

* Fix coverage

* Fix Renovate not detecting modified commits

* Simplify Gerrit commitAndPush by leveraging git.commitFiles

* Fix some code style issues

* Revert "Simplify Gerrit commitAndPush by leveraging git.commitFiles"

This reverts commit d71edcc279.

* Fix another small code style issue

* Use isUndefined instead

* Fix one small test style issue

* Fix more code style issues

* Fix Gerrit mergeToLocal trying to fetch (and probably failing)

* Extract refs/remotes/origin to a function

* Rename virtualBranchRef to remoteBranchRef

* Fix remoteBranchRef tsc

* Consistently use currentRevision in Gerrit tests

* Remove unnecessary type assertion

* Instrument "fetch virtual branches"

* Remove pendingChangeBranches, avoid overriding deleteBranch and mergeToLocal

* Optimize virtual branches fetch (no longer requires update-ref), convert virtualBranches to Record, rename setVirtualBranch to registerVirtualBranch

* Combine registerVirtualBranch and updateVirtualBranch into a single setVirtualBranch, and update ref in virtual branch too

* Fix virtualBranches not being initialized

* Add some debug logs

* Simplify mergeToLocal for virtual branches

* Revert "Simplify mergeToLocal for virtual branches"

This reverts commit 375d57a474.

* Remove useless isVirtual const

* test(git): add toThrow message for virtualBranches fetch error

Satisfy vitest/require-to-throw-message so oxlint passes.

* Update lib/util/git/types.ts

Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>

* Address review feedback

---------

Signed-off-by: Felipe Santos <felipe.santos@ericsson.com>
Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>
2026-07-17 21:47:08 +00:00
Will Pfleger 556b1be775 fix(manager/hermit): propagate git credentials to hermit install (#43524)
* fix(manager/hermit): propagate git credentials to hermit install

hermit install runs without git auth, failing silently for packages
hosted in private repos. Spread getGitEnvironmentVariables(['hermit'])
into extraEnv, matching the pattern used by cargo, gomod, poetry,
copier, vendir, and conan managers.

Passing ['hermit'] as additionalHostTypes ensures hostRules configured
with hostType: 'hermit' are picked up alongside the standard platform
host types.

Also guards against undefined stderr in the outer catch block —
non-UpdateHermitError exceptions rendered "undefined" in PR comments.

* test(manager/hermit): cover non-Error thrown value fallback

Exercise the String(err) branch in the generic error handler when
a non-Error value propagates from updateHermitPackage.

* fix: address review comments on hermit git auth

Remove unnecessary spread operator from getGitEnvironmentVariables() result
assignment and apply one-sentence-per-line docs convention.
2026-07-17 13:21:54 +00:00
Aaron 78c978790d feat(datasource/docker): Identify private ECR registries across AWS partitions (#44655)
feat: Identify private ECR registries across AWS partitions
2026-07-17 11:58:44 +00:00
Pieter Willekens e0c13b6c57 feat(manager/npm): read private registries from pnpm-workspace.yaml (#44083)
* feat(manager/npm): read private registries from pnpm-workspace.yaml

Honor the `registry` and `registries` settings (pnpm v11+) declared in pnpm-workspace.yaml, applying them to workspace catalog/override deps and member package.json deps. Registry values containing ${...} are ignored, matching pnpm v11.5.3+.

* refactor(manager/npm): share pnpm registry resolution across extract paths

Extract a single applyPnpmWorkspaceRegistries helper so both the
pnpm-workspace catalog path and the package.json extract path apply
registries through one chokepoint, with env-var registry URLs filtered
once and consistently.

* refactor(manager/npm): filter pnpm env-var registries in schema

Move the env-var registry filtering into the PnpmWorkspaceFile schema as a
transform so registries are filtered once at parse time, and use the Nullish
helper for the registry/registries fields.

* refactor(manager/npm): simplify pnpm-workspace check and log parse errors
2026-07-17 11:56:13 +00:00
Tobias Bieniek 2c7060849d feat(github-actions): support jdx/mise-action version input (#44660)
This extracts `with.version` as a `jdx/mise` GitHub Releases dependency while keeping the action reference independent.
2026-07-17 11:35:43 +00:00
Sebastian Poxhofer 4add67e86e test: add linter for as any in test files (#44658)
* ci(linter): add prefer-partial-in-specs oxlint rule

Flags object literals cast to `any` (`{...} as any`) in spec/test files and steers toward `partial<T>()` from `test/util`. Enabled at error in the spec-files override so CI blocks new occurrences.

Closes #44646

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

* test: drop unnecessary object-literal `as any` casts

The casts masked values already assignable to the expected type (migration configs accepted as Record<string, unknown>, all-optional param types, etc.); removing them restores real type checking.

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

* test: replace object-literal `as any` casts with partial<T>()

Uses partial<T>() from test/util so incomplete mock/config objects keep proper typing. Azure API mocks switch to mockResolvedValue(partial<T>()) and their inner method mocks to mockResolvedValue(), matching the sibling-file idiom.

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

* test: suppress prefer-partial-in-specs for intentionally-invalid inputs

Some tests deliberately pass malformed or legacy data to exercise validation/error paths, where no real type fits; keep the cast with a reasoned oxlint-disable-next-line.

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

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-17 10:47:30 +00:00
Alexander Lindeskär 2783859337 fix(terraform): normalize lock file constraint order after provider update (#44530)
* fix(terraform): normalize lock file constraint order after provider update

Terraform and OpenTofu reject a .terraform.lock.hcl whose constraints are
not in normalized form. When a provider version is updated in place, a bumped
exact pin can overtake an inherited `~>` range, leaving e.g.
"5.9.0, ~> 5.0" which fails "init" with "must be written in normalized form".
Re-sort the sub-constraints (boundary version ascending, ties broken by
operator priority) to match Terraform's canonical serialization.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor(terraform): address review on constraint normalization

- link the Terraform source the sort logic mirrors
- avoid a regex lookahead in constrainToZero (RE2 wrapper compatibility)
- resolve the hashicorp versioning API once at module load

* Update lib/modules/manager/terraform/lockfile/util.ts

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

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
2026-07-17 10:15:31 +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
Emanuel Besliu 2d431ea7a7 fix(platform/azure): don't create Dependency Dashboard for projects without an Issue type (#44592)
* fix(platform/azure): guard against null work item on issue creation

The Azure DevOps REST client resolves createWorkItem to null (instead of
throwing) on a 404 or any 2xx response with an empty/non-JSON body, such
as a 203 sign-in page returned by an expired token or an SSO/proxy in
front of the instance. ensureIssue then dereferenced newWorkItem.id
unconditionally, crashing the dependency dashboard run with
"Cannot read properties of null (reading 'id')".

Guard the result and skip the issue with a warning instead.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* feat(platform/azure): detect missing Issue work item type

Check that the project's process defines the 'Issue' work item type
before attempting to create one. Processes such as Scrum do not define
it, so createWorkItem returned a 404 that the REST client surfaces as
null, producing a cryptic crash. Log an actionable warning instead.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* test(platform/azure): mock getWorkItemTypes in ensureIssue create test

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-15 09:57:02 +00:00
Hajime-san 335d663ac6 fix(manager/deno): set --frozen=false default to update lock file correctly (#43058)
* fix

* consider `lockFileMaintenance`

* fix command

* Revert "fix command"

This reverts commit 3ceece0187.

* Revert "fix"

This reverts commit 8cdac91205.

* always override frozen flag

* rm args

* fix
2026-07-15 06:48:25 +00:00
Felipe Santos b3a21cfc51 fix(gerrit): enforce username in SSH Git URLs (#43651) 2026-07-14 18:21:10 +00:00
Sebastian Poxhofer 00043d193e test(linters): add codeblock linter rule for spec fixtures (#44551)
* ci(linter): add renovate/codeblock-in-spec-fixtures rule

Add a custom oxlint rule that requires the codeBlock (or stripIndent)
template helper from common-tags for multi-line string fixtures in spec
files (enabled for **/*.spec.ts and test/** only).

The rule only flags shapes whose value can round-trip through the
common-tags helpers unchanged, since both codeBlock and stripIndent trim
the end result and strip the shortest line indentation:

- only literals spanning multiple source lines are flagged (escaped \n
  one-liners are left alone: tagging them is not value-preserving in
  general and gains nothing)
- values with leading/trailing whitespace (e.g. fixtures ending in a
  newline) are not flagged
- tagged templates, describe/it titles, and inline snapshot arguments
  are skipped

All 55 pre-existing violations (22 files) were fixed with a one-off
codemod that re-emits each fixture indented to the statement depth and
verifies value preservation by evaluating codeBlock on the rewritten
template (substitutions kept as opaque placeholders). One site
(pip_requirements/artifacts.spec.ts) mixes line continuations with
escaped newlines and was tagged verbatim instead of re-indented.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* ci(linter): address review findings

Make getSimpleRequirementsFile in pip-compile/extract.spec.ts
value-preserving again: tagging the whole template with codeBlock
trimmed the trailing blank line when deps is empty (the headerOnly.txt
case), silently changing the fixture from ending in '#\n\n' to '#'.
Tag only the static header and append the deps section via a
single-line template, which reproduces the original string exactly
for both empty and non-empty deps (verified by executing old vs new
in node).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 13:00:02 +00:00
Sebastian Poxhofer 64e6a4c71f refactor(oxlint): enable unicorn/prefer-at (#44556)
Enable the unicorn/prefer-at rule as error in .oxlintrc.json and fix all
43 pre-existing violations (arr[arr.length - 1] -> arr.at(-1)) via oxlint
autofix. Where .at() widened the type to T | undefined, non-null
assertions were added at sites where surrounding logic guarantees the
element exists (length guards, split results), preserving the original
runtime behavior and typing.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 12:57:23 +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
Sebastian Poxhofer e9c9c92e10 test(oxlint): enable vitest/consistent-test-it (#44554)
refactor(oxlint): enable vitest/consistent-test-it

Enforce `it` over `test` in spec files via
vitest/consistent-test-it (fn: "it"), matching repo convention.
Renamed all 52 pre-existing `test(`/`test.each` usages across
13 spec files to `it(`/`it.each` using oxlint --fix.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 12:28:52 +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
Emanuel Besliu 483890a8f1 fix(platform/azure): resolve work item states from process (#44412)
* fix(platform/azure): resolve work item states from process

Renovate hardcoded the Azure Boards work item state to `New` on
create/reopen and `Closed` on close. Processes that don't have those
states (Basic uses To Do/Done; custom inherited processes vary) reject
the request with "The field 'State' contains the value 'New' that is not
in the list of supported values", so the Dependency Dashboard (and any
issue) could not be created or closed.

Resolve the concrete open/closed state names for the `Issue` work item
type from its process via `getWorkItemTypeStates`, grouped by state
category (Proposed/InProgress = open, Completed/Resolved/Removed =
closed). Omit `System.State` on create so Azure DevOps applies the work
item type's default initial state. Classify issues open/closed by state
category rather than the literal `Closed`. Fall back to the previous
`New`/`Closed` names when the states cannot be read (e.g. older ADO
Server). Result is cached per repository.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(platform/azure): prefer Completed state as close target

Address review: closedNames[0] picked the first state across the
Completed/Resolved/Removed categories in workflow order, so processes that
order a Resolved-category state before the Completed one (e.g. a custom
inherited Agile process) would close work items to `Resolved` instead of
`Closed`, changing prior behavior.

Resolve the close target from the `Completed` category first, falling back to
the wider closed set only when no Completed state exists. The full closed set
is still used to classify already-closed items.

Add tests covering a process where `Resolved` is ordered before `Closed`.

* fix(platform/azure): address review feedback on state resolution

- Extract namesByCategory into a module-level function declaration instead
  of an arrow function assigned to a variable.
- Add a test where the Issue type exposes a closed-category state but no
  Completed state, exercising the completedNames[0] ?? closedNames[0]
  fallback (restores 100% patch coverage).
- Reword the readme to avoid possessives per the style guide.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* refactor(platform/azure): simplify state resolution per review

- use stateColors.find for the Completed close target instead of an
  extra namesByCategory pass over a single-element array
- document that the open-state fallback may pick a closed state when a
  process exposes only closed states (intentional, not a bug)
- reuse the workItemType const instead of repeating the 'Issue' literal

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(platform/azure): resolve work item states via Lazy

getWorkItemStates was async with a plain null-check cache guard, so two
concurrent callers could both pass the guard and each fire a duplicate
getWorkItemTypeStates request. Wrap resolution in `Lazy<Promise<...>>`
so the executor runs once and all callers share the same promise.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-14 11:49:32 +00:00
Sebastian Poxhofer 7436b80cda test(linter): add renovate/no-redundant-mock-reset rule (#44557)
ci(linter): add renovate/no-redundant-mock-reset rule

Vitest sets mockReset: true globally in vitest.config.mts, which resets
all mocks before each test. This makes vi.resetAllMocks() /
vi.clearAllMocks() and per-mock .mockReset() / .mockClear() calls inside
beforeEach/afterEach hooks redundant. Add a custom oxlint rule (enabled
for **/*.spec.ts and test/**) flagging such calls, and remove the 40
redundant calls it found. restoreAllMocks/mockRestore are not flagged
because restoreMocks is not enabled globally.

Two sites keep an inline disable with a reason: nested beforeEach hooks
in filter-checks.spec.ts and onboarding/pr/index.spec.ts intentionally
call mockReset() to discard once-values queued by an outer beforeEach.

Requested by maintainer review feedback (review comment 3052324877).

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 11:26:20 +00:00
Sebastian Poxhofer 4176a3bc3a test(linter): add renovate/no-stateful-global-regex rule (#44566)
ci(linter): add renovate/no-stateful-global-regex rule

Flag module-scope const/let bindings initialized with a g- or y-flagged
regex (regex literal, regEx('...', 'g'), or regEx(/.../g)) that are
later used with .test() or .exec() in the same file. Such regexes are
stateful (lastIndex) and shared across calls, causing intermittent
match failures. Uses via matchAll()/replace()/split() are not flagged.

Fix the four pre-existing violations:
- gitea/forgejo utils: drop the pointless g flag from
  reconfigurePrRegex, which made .test() alternate results.
- mix extract: convert module-scope exec() loops on g-flagged regexes
  to matchAll().

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 10:52:27 +00:00
Sebastian Poxhofer a31f9cf0f9 refactor(schemas): prefer Nullish schema utils instead of z.nullish() (#44565)
* ci(linter): add renovate/prefer-zod-nullish rule

Add a custom oxlint rule that flags zod chains calling .optional() and
.nullable() adjacently (in either order) and suggests .nullish(), which
is equivalent (both accept undefined | null in zod v4).

Fix all 26 pre-existing violations across 6 schema files.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* ci(linter): prefer schema-utils Nullish over zod .nullish()

Rename prefer-zod-nullish to prefer-nullish-util and extend it to flag
.nullish() itself, including the standalone forms z.nullish(x) and
z.optional(z.nullable(x)). Migrate all call sites to Nullish() and
DeepNullish() from schema-utils, which normalize null to undefined in
parsed output. Schemas with more than one nullish position are wrapped
in DeepNullish(); nullish object properties with nullish members use
Nullish(DeepNullish(...)) to keep the optional property type marker.

Spec files are exempt (result.spec.ts intentionally tests
null-preserving parses). Spec assertions expecting null in parsed
output were updated to undefined. Note: docker manifests with an
explicit "mediaType": null are now accepted and treated like an absent
mediaType instead of failing the discriminated union.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 10:15:55 +00:00
Aman Agrawal c8fcd63278 refactor(platform/gitlab): fetch detailed_merge_status (#44122)
* refactor(platform/gitlab): changed merge_request to detailed_merge_request.

* refactor(platform/gitlab): changed merge_request to detailed_merge_request in scehma.ts and in pr-cache-tests

* refactor(platform/gitlab): enums added for detailed_merge_requests #44114

* refactor(platform/gitlab): added enums for detailed_merge_status and unit tests modified #44114

* refactor(platform/gitlab): detailed_merge_status field added in pr-cache unit tests

* refactor(platform/gitlab): made detailed_merge_status optional and catch statement to handle newer status for future #44114
2026-07-13 21:28:36 +00:00
renovate[bot] 6f1dc71a61 docs: update references to astral-sh/setup-uv to v8.3.2 (main) (#44516)
docs: update references to astral-sh/setup-uv to v8.3.2

| datasource  | package            | from   | to     |
| ----------- | ------------------ | ------ | ------ |
| github-tags | astral-sh/setup-uv | v8.3.0 | v8.3.2 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-07-13 00:32:05 +00:00
Pieter Willekens 0019a19858 fix(platform/gitlab): guard non-string error message in setBranchStatus (#44117)
GitLab can return a non-string `message` in error bodies (e.g. validation errors as an object), which crashed `message.startsWith` with "err.body?.message?.startsWith is not a function". Guard with an `isString` check.
2026-07-11 10:42:03 +00:00
Nikolay Frantsev a602d166a5 feat(bitbucket): add draft PRs support (#43965) 2026-07-11 05:53:46 +00:00
David Straub d3cbca91db fix(npm): allow rename when replacement value is unchanged (#44486) 2026-07-11 05:50:32 +00:00
Sebastian Poxhofer 27cc994470 refactor(oxlint): enable vitest/no-standalone-expect (#44417)
Wrap `expect` calls that sat directly in `describe` bodies in their
own `it` blocks (gomod and haskell-cabal extract/index specs), then
re-enable the rule.

Part of #43845

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-10 10:06:16 +00:00
RahulGautamSingh 198a4a7bb7 fix(custom/jsonata): support autoReplaceStringTemplate (#43535)
* fix(custom/jsonata): support autoReplaceStringTemplate

* apply suggestions

* fix types
2026-07-10 06:29:59 +00:00
Robert Waffen 54407b683d fix(datasource/puppet-forge): filter out deleted forge releases so that they don't count as updates anymore (#43906)
* fix(datasource/puppet-forge): filter out deleted forge releases so that they don't count as updates anymore

Signed-off-by: Robert Waffen <rw@betadots.de>

* Update lib/modules/datasource/puppet-forge/schema.ts

Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>

* Update lib/modules/datasource/puppet-forge/schema.ts

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

* fix: add missing import for isTruthy

Signed-off-by: Robert Waffen <rw@betadots.de>
Co-authored-by: ChatGPT Codex <codex@openai.com>

* fix: uses Nullish zod helper

Signed-off-by: Robert Waffen <rw@betadots.de>
Co-authored-by: ChatGPT Codex <codex@openai.com>

---------

Signed-off-by: Robert Waffen <rw@betadots.de>
Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: ChatGPT Codex <codex@openai.com>
2026-07-09 19:18:43 +00:00
Ignacio Calderon 191cf7c1cf feat(manager/mint): add support for fully qualified urls for Mint packages (#44305)
* feat: add support for fully qualified urls for Mint packages

* address http ambiguity

* increase coverage
2026-07-08 12:25:54 +00:00
Zack Kanter 371412d4c1 fix(datasource/npm): require public Cache-Control to cache responses (#42822)
* fix(datasource/npm): require public Cache-Control to cache responses

The npm datasource opts out of the authorization-header privacy check
(checkAuthorizationHeader: false) and relies on Cache-Control alone to
classify responses. Previously, when a registry omitted Cache-Control
entirely, cacheAllowed fell through to "cache it" — so private packages
served by GitHub Packages (which sends no Cache-Control header) were
cached in the shared package cache.

Flip the semantic of checkCacheControlHeader: true to require an
affirmative Cache-Control: public signal. Missing or non-public headers
now disallow caching. registry.npmjs.org is unaffected because it
already sends Cache-Control: public, max-age=...

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(cache): avoid renewing disallowed package cache on 304

* Revert "fix(cache): avoid renewing disallowed package cache on 304"

This reverts commit 64801bb036269352465aac580b9861c5b7716cc1.
2026-07-07 19:27:47 +00:00
Ethan Setnik 8a8f830da3 fix(datasource/repology): honor abortOnError instead of aborting the run on every error (#44326)
* fix(datasource/repology): honor abortOnError instead of aborting the run on every error

* fix(datasource/repology): dedupe unexpected-error warning with logger.once

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FfPmUMCN5G5sFXa5oigWei

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 19:18:41 +00:00
Sebastian Poxhofer ad0b59f8b7 refactor(oxlint): enable vitest/require-to-throw-message (#44421) 2026-07-07 17:47:04 +00:00
Sebastian Poxhofer b106668a95 refactor(oxlint): enable typescript/no-useless-default-assignment (#44419)
- Convert `param: T | undefined = undefined` to optional `param?: T`.
- Drop dead `= false` defaults on the required cache-provider options.
- Make `GraphqlPaginatedContent.nodes/edges` optional so the `= []`
  fallbacks (load-bearing for partial GraphQL connections) are valid.
- Type the unchecked `default_branch` response field as optional so
  the `'HEAD'` fallback is retained.
- Drop `tag = undefined` from the Forgejo/Gitea/GitLab preset configs.

Part of #43845

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 16:38:48 +00:00
Sebastian Poxhofer aac8365dd6 refactor(oxlint): enable vitest/prefer-snapshot-hint (#44420)
Add distinct hints to the multi-snapshot tests flagged by the rule
and regenerate the affected snapshot files, then re-enable the rule.

Part of #43845

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 16:35:22 +00:00
Sergei Zharinov 9b8dfd6259 feat(versioning): Add Paket versioning (#44366)
* feat(versioning): add paket versioning

* docs(versioning): use JSDoc for paket function comments
2026-07-07 10:28:20 +00:00
Tobias Schlatter a80e811696 fix(npm): do not fail on version-only replacements (#44380) 2026-07-06 10:07:03 +00:00
renovate[bot] 59e96e1cf3 docs: update references to astral-sh/setup-uv to v8.3.0 (main) (#44373)
docs: update references to astral-sh/setup-uv to v8.3.0

| datasource  | package            | from   | to     |
| ----------- | ------------------ | ------ | ------ |
| github-tags | astral-sh/setup-uv | v8.2.0 | v8.3.0 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-07-06 00:31:51 +00:00
renovate[bot] 8992670558 docs: update references to python to 09b29c3 (main) (#44372)
docs: update references to python to 09b29c3

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-07-06 00:30:55 +00:00
Chickenhen 834fd2ef75 fix(terraform): strictly strip ".git" suffix from source URLs (#44350) 2026-07-03 10:11:45 +00:00
RahulGautamSingh cb9a5ae71b fix(versioning/debian): keep numeric value on dated codename update (#44335) 2026-07-03 06:28:13 +00:00