* refactor(linters): add prefer-coerce-array rule
Refs #45217
`x ?? []` and `coerceArray(x)` say the same thing, but only the second
one is searchable and consistent. The rule flags a `??` whose default is
a bare `[]` literal; a non-empty default or an asserted `([] as Foo[])`
still passes.
Applying it across `lib/` surfaced three spots the helper cannot cover,
which keep `?? []` with a disable comment or a narrower fix:
- `package-files.ts` destructures a tuple, which `coerceArray()` widens
- `generate.spec.ts` defaults `matchAll()`, an iterator rather than an array
- `mise/upgradeable-tooling.ts` declares a `Record` return, so its
`?? []` fallback was wrong to begin with and becomes `coerceObject()`
* refactor(platform/github): hoist the GHE version header lookup
`Object.entries(...).find()` returns a tuple, and defaulting it with
`?? []` only to destructure the second element reads as an array
default when it is not one. Name the found entry instead, which drops
the `?? []` rather than routing a tuple through `coerceArray()`.
* feat(pip-compile): support --constraint alias and --overrides for uv
uv accepts both --constraint and --constraints (clap aliases) and
records the exact form used into lockfile headers. Only --constraints
was in the uv allowlist, so --constraint headers were rejected.
Similarly, uv supports --override/--overrides for version overrides,
but neither form was recognized by Renovate at all.
This commit:
- adds --constraint to uvOptionsWithArguments (value handler already
handles both forms)
- adds --override and --overrides to uvOptionsWithArguments with a
value handler that parses overridesFiles
- tracks override files as dependencies in the file graph (like
constraints) so lockfiles are recompiled when overrides change
- uses dotted mermaid edges for overrides (same as constraints)
Ref: https://github.com/renovatebot/renovate/discussions/39488
Co-authored-by: Cursor <cursoragent@cursor.com>
* test(pip-compile): add coverage for overrides dependency tracking
Add a test case in extract.spec.ts that exercises the overridesFiles
loop in extractAllPackageFiles, fixing the codecov/patch failure.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
When a requirements file includes another via the `-r` flag it's always
treated as relative to the directory where the requirements file is, not
the directory where the command is being run. Those are often the same,
but not always.