Commit Graph

28 Commits

Author SHA1 Message Date
Sebastian Poxhofer 97327c3d28 refactor(linters): add prefer-coerce-array rule (#45492)
* 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()`.
2026-08-28 09:27:58 +00:00
Michael Hofmann 934c01dd62 feat(pip-compile): support --constraint alias and --overrides for uv (#43485)
* 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>
2026-05-22 12:45:23 +00:00
Sebastian Poxhofer 73b90e958b refactor: remove string concetation for production code (#43442)
refactor: prefer templates rather than `+`
2026-05-19 13:31:27 +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
Miles Budnek 6a9aba1fd6 fix(pip-compile): Relative includes were handled incorrectly (#38355)
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.
2025-10-15 08:40:21 +00:00
Miles Budnek 5ec2a13826 feat(pip-compile): Support compiling dependencies from pyproject.toml (#37457) 2025-08-25 15:08:37 +00:00
RahulGautamSingh bc7d0595d0 feat(config): managerFilePatterns (#34615)
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>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2025-05-04 08:30:24 +00:00
renovate[bot] 55845508b6 chore(deps): update eslint monorepo to v9 (major) (#33573)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2025-02-20 11:31:13 +00:00
renovate[bot] f2f8f84bd6 chore(deps): update linters to v8.22.0 (#33880)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: secustor <sebastian@poxhofer.at>
2025-02-04 22:05:57 +00:00
RahulGautamSingh 0d23707604 refactor(logger): remove templating from WARN log messages (#33488) 2025-01-14 13:03:05 +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
Norbert Szulc 2e78a7117d fix!: normalize Python depName in every manager (#27733) 2024-07-25 15:28:16 +02:00
Miles Budnek 2a08238f04 feat(pip-compile): Treat included paths as relative to the package file (#29499) 2024-06-07 06:11:39 +00:00
Miles Budnek 75b7ee545f refactor(pip-compile): Move matchManager to common.ts (#29359) 2024-05-30 19:04:24 +00:00
Norbert Szulc dbd17ed1d7 refactor(datasource/pypi): rename normalization function (#28584) 2024-04-22 15:37:37 +00:00
Miles Budnek c4a5ac800f feat(manager/pip-compile): Handle some edge-cases with -r dependencies (#28208)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2024-04-16 05:34:31 +00:00
Norbert Szulc 0df4ff5ce8 feat(manager/pip-compile): Allow security updates for transitive dependencies (#27561) 2024-03-30 07:37:27 +00:00
Miles Budnek f9ba8463b3 feat(manager/pip-compile): Support -r dependencies between files (#28052)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2024-03-29 21:23:00 +00:00
Norbert Szulc 8f02c53039 feat(manager/pip-compile): Allow paths relative to repository root (#27272)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2024-02-20 17:45:15 +00:00
Norbert Szulc 82651110a0 refactor(manager/pip-compile): Move topological sort to utils (#27398) 2024-02-19 12:43:34 +00:00
Norbert Szulc 971f9c11f9 feat(manager/pip-compile): Sort package files based on dependencies between them (#27252) 2024-02-18 15:14:13 +00:00
Norbert Szulc 0ba9e35fcc feat(manager/pip-compile): Add lockedVersion to package file deps (#27242)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2024-02-15 12:07:20 +00:00
Norbert Szulc 31dd7660d9 refactor(manager/pip-compile): Move generateMermaidGraph (#27311) 2024-02-15 10:08:20 +00:00
Norbert Szulc 09ad053a35 fix(manager/pip-compile): extractHeaderCommand error to warn message (#27310) 2024-02-15 09:48:57 +00:00
Norbert Szulc bd9fb30314 refactor(manager/pip-compile): Rename results of extractHeaderCommand (#27308) 2024-02-15 09:27:50 +00:00
Norbert Szulc 1eedcf9cba feat(manager/pip-compile): enable support for setup.py (#27282)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2024-02-14 10:52:58 +00:00
Norbert Szulc 2df7ef51aa feat(manager/pip-compile): Change fileMatch behaviour to target pip-compile output files (#26858)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2024-02-13 13:53:23 +00:00
Norbert Szulc 235951a1a2 feat(manager/pip-compile): Create wrapper for pip extractPackageFile (#27154)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2024-02-08 17:29:50 +00:00