Commit Graph

231 Commits

Author SHA1 Message Date
Sebastian Poxhofer 6e03e8326f refactor(linters): add rule to enforce inline single use fixtures (#45230)
* feat(lint): add renovate/prefer-is-helpers and renovate/prefer-is-object rules

Flag ad-hoc type checks that have @sindresorhus/is equivalents:
- .filter(Boolean) -> .filter(isTruthy)
- typeof x === 'string' -> isString(x)
- x === null || x === undefined -> isNullOrUndefined(x) (and negation)

The typeof x === 'object' shape lives in a separate suggestion-only rule
(renovate/prefer-is-object, kept at warn) because isObject()/isPlainObject()
are not drop-in equivalents: null, arrays and functions behave differently.

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

* refactor: fix renovate/prefer-is-helpers violations

Replace ad-hoc type checks with @sindresorhus/is helpers across lib/:
- 13x .filter(Boolean) -> .filter(isTruthy)
- 36x typeof x ==/!== 'string' -> isString(x) / !isString(x)
- 6x x === null || x === undefined -> isNullOrUndefined(x) (and negation)

Promote renovate/prefer-is-helpers to error now that the codebase is clean.
renovate/prefer-is-object stays at warn: its 15 remaining sites guard
parsed YAML/JSON or unknown values where isObject()/isPlainObject() are
not provably equivalent (null/array/function semantics).

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

* refactor: enforce renovate/prefer-is-object at error level

Resolve the 15 remaining warnings and raise the rule from warn to error:

- Migrate 10 sites to isObject() where the guarded value provably cannot
  be a function (parsed YAML/JSON, typed exec command arguments, or
  test-controlled fixtures): helm-values, woodpecker, bun, pre-commit
  managers, exec utils, file package cache, and the github http spec.
  In the bun manager this also fixes a latent crash where a null
  `workspaces` value would throw on the `in` operator.
- Keep 5 sites as reasoned oxlint-disable comments where excluding
  functions is load-bearing: the byte-exact fingerprint canonicalizer
  (2), the circularity walker, the zod result guard, and the generic
  hasKey helper.

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

* feat(lint): add renovate/inline-single-use-fixtures rule

In spec files, a module-scope const fixture that is referenced from
exactly one it()/test() block should be inlined into that test so the
test is self-contained. The rule is a warn-level nudge (naming for
clarity is a valid exception) with no autofix (moving code is risky).

Uses oxlint jsPlugins scope analysis (getDeclaredVariables) for exact,
shadowing-safe reference counting and bails out conservatively: only
top-level non-exported single-declarator consts with multiline,
non-function initializers whose every reference sits inside the callback
function of one and the same test call are flagged.

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

* refactor: inline single-use spec fixtures into their tests

Fix 26 renovate/inline-single-use-fixtures warnings in specs where the
move is mechanical and value-preserving: codeBlock fixtures were
re-indented uniformly (codeBlock strips the common indentation, so the
produced string is unchanged) and Fixtures.get() calls resolve relative
to the spec file, so relocating them inside the test body has no effect.

The remaining 59 warnings are left for per-site judgment, as the rule is
a warn-level nudge by design.

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

* refactor: inline remaining relocation-safe single-use spec fixtures

Move the 24 remaining single-use module-scope fixtures whose initializer
is a codeBlock tagged template or a Fixtures accessor call into the one
it() block that uses them. Both shapes are value-preserving to relocate:
codeBlock strips the common leading indentation, so the uniformly
re-indented templates produce identical strings, and Fixtures.get()
resolves relative to the spec file, not the call site's position in it.

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

* feat(lint): enforce inline-single-use-fixtures as error

Narrow the rule to the initializer shapes where moving the declaration
into the test body is provably value-preserving and unambiguously an
improvement: codeBlock/stripIndent tagged templates (indentation-
normalizing, so re-indenting is safe) and Fixtures accessor calls
(resolve relative to the spec file). Plain object/array literals,
untagged template literals (whose leading-newline formatting would need
ugly re-indentation) and arbitrary call expressions remain per-site
judgment calls and are no longer flagged.

With the rule reduced to true defects and all remaining violations
inlined, bump it from warn to error in the spec override block.

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

* refactor: inline contents of fixtures relocated into single-use tests

The previous commits moved single-use module-scope Fixtures.get() consts
into their one it() block, which only relocated the file indirection.
Replace those relocated Fixtures.get() calls with the fixture file's
actual content — codeBlock tagged templates for text fixtures — so the
tests are self-contained, and delete the fixture files that no longer
have any references. Relocated fixtures too large to inline comfortably
(terraform-provider releases, sbt private-variable file, nuget v2 pkg
list, bundled package-lock) keep their Fixtures.get() calls.

Value preservation was verified by unchanged vitest results for every
touched spec; all consumers parse the content, so codeBlock's trailing
newline normalization is behavior-neutral.

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

* refactor: inline remaining large single-use fixtures

Inline the four Fixtures.get() sites that were previously exempted for
size, so every single-use fixture is now inlined regardless of size:

- nuget v2_withoutProjectUrl.xml -> codeBlock (served via http mock)
- terraform-provider releaseBackendIndexGoogleBeta.json -> plain object
  literal passed to the nock reply
- npm locked-dependency bundled.package-lock.json -> codeBlock JSON
  string (consumed as raw lockFileContent)
- sbt private-variable-dependency-file.scala -> codeBlock

All consumers parse the content, so codeBlock's trailing-newline
normalization is behavior-neutral; vitest results are unchanged for
every touched spec, including the two pre-existing nuget failures.

The nuget, terraform-provider and sbt fixture files have no remaining
references and are deleted. bundled.package-lock.json is kept because
package-lock/get-locked.spec.ts still reads it via Fixtures.getJson().

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

* refactor: keep large bundled package-lock fixture in a file

The bundled package-lock.json inlined into the "fails remediation if
bundled" test is ~150 KB (~4,400 lines); inlining it as a codeBlock
hurts readability more than it helps. Read it via Fixtures.get inside
the test block instead — the inline-single-use-fixtures rule permits a
Fixtures.get() call in test scope, and the fixture file is still present.

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

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-09-03 07:42:45 +00:00
renovate[bot] 29e582b59f docs: update references to python to b0aed0e (main) (#45559)
docs: update references to python to b0aed0e

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-31 00:29:47 +00:00
renovate[bot] 9ce288efba docs: update references to python to 4fad234 (main) (#45407)
docs: update references to python to 4fad234

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-24 00:29:58 +00:00
renovate[bot] 5ca534a0c8 docs: update references to python to 3a9d2dd (main) (#45179)
docs: update references to python to 3a9d2dd

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-10 00:26:08 +00:00
renovate[bot] f9532ad1db docs: update references to python to 5f1cdbc (main) (#44863)
docs: update references to python to 5f1cdbc

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-07-27 00:26:59 +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
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 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
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
renovate[bot] a1669f3ba7 docs: update references to python to 5c48543 (main) (#44279)
docs: update references to python to 5c48543

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-29 00:32:57 +00:00
renovate[bot] b60b4058b0 docs: update references to python to 4d7dd74 (main) (#44136)
docs: update references to python to 4d7dd74

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-22 00:29:01 +00:00
renovate[bot] 1ac09e77e2 docs: update references to python to 6f473f8 (main) (#43993)
docs: update references to python to 6f473f8

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-15 00:28:08 +00:00
renovate[bot] d755b7a98d docs: update references to python to 250e5c9 (main) (#43705)
docs: update references to python to 250e5c9

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-01 00:27:00 +00:00
Sebastian Poxhofer 15f4bd8eff chore: migrate from zod/v3 to zod/v4 (#43691)
* chore: migrate from zod/v3 to zod/v4

This commit contains the logic changes

* chore: migrate imports from zod/v3 to zod/v4

This contains import updates and adds explicit record keys as zod/v4 requires these now

* ci: enforce usage of zod/v4
2026-05-30 16:01:58 +00:00
Sebastian Poxhofer 9a27d7aa78 ci(prettier): add prettier plugin for admonitions (#43615)
* ci: add local mkdocs-admonitions plugin for prettier to allow admonition preservation

* docs: remove uses of `prettier-ignore` for admonitions

* test: rather use await expect

* chore: use named group exclusively
2026-05-27 09:39:52 +00:00
Jamie Tanna 33e857e04a docs: migrate all admonitions and lists to using 2-space indents (#43607)
* docs: ensure 2 spaces used for generated admonitions

As a follow-up to 4b0146ab7b and
1844916259b6dc17f532e491eb93f6116327c324., this correctly renders
admonitions with 2 spaces (1 indent).

* fixup! docs: use 2-space indentation for Markdown (#43537)

Plus using 3-space for mixed-style `<ul>` and `<ol>`s.

* fixup! docs: use 2-space indentation for Markdown (#43537)

As otherwise it breaks the rendering of the table.
2026-05-26 20:03:23 +00:00
renovate[bot] 588e536282 docs: update references to python to 6928095 (main) (#43575)
docs: update references to python to 6928095

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-25 00:25:34 +00:00
renovate[bot] c784b22a04 docs: update references to python to 89a288a (main) (#43407)
docs: update references to python to 89a288a

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-18 00:23:52 +00:00
renovate[bot] 265161c4a6 docs: update references to python to 511f025 (main) (#43223)
docs: update references to python to 511f025

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-11 00:24:09 +00:00
renovate[bot] a6f1c71036 docs: update references to python to 0ba0018 (main) (#43068)
docs: update references to python to 0ba0018

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-04 00:25:44 +00:00
renovate[bot] e3bdee9853 docs: update references to python to 4bdca44 (main) (#42914)
docs: update references to python to 4bdca44

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-27 00:27:06 +00:00
renovate[bot] 6473c4006d docs: update references to python to 63fdc2b (main) (#42748)
docs: update references to python to 63fdc2b

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-20 00:27:20 +00:00
renovate[bot] c549ff7cef docs: update references to python to 8428c32 (main) (#42572)
docs: update references to python to 8428c32

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-13 00:27:43 +00:00
Jamie Tanna 2d239d2cc1 docs: explicitly document depTypes each manager supports (#42142)
* docs: explicitly document `depTypes` each manager supports

A long-standing question we receive is "what `depTypes` can I match
against in my project".

Although the best recommendation we usually have is "check the
`packageFiles with updates" log line (as a very key log line for users),
we can go one step further and try and create a stronger contract.

To do this, I've used Claude Sonnet 4.6 to work through the codebase,
determine areas that a `depType` is set in a manager (statically or
dynamically) and generate a structured, typed, means to document how
they're used.

Through a few iterations of the process, and attempts at human-written
documentation, we've settled on:

- prioritising autogenerated documentation (for humans to read) to note
  what `depTypes` are known, and what they are
- `knownDepTypes`, to describe any known, static, `depType`s and their
  human-readable meaning
  - with the `prettyDepType`, if used
- `supportsDynamicDepTypesNote`, to add a Markdown note to the generated
  documentation

While here, we also:

- make sure to note this in the "adding a new package manager"
  documentation
- remove any hand-written references to `depTypes` in each manager's
  documentation page
- correct the Gleam `depTypes`
- make sure to use the `knownDepTypes`'s `prettyDepType` definition if
  we know it, for a given `depType`

The descriptions have been generated by Claude Sonnet, with some
human-written tweaks where appropriate.

[0]: https://github.com/renovatebot/renovate/discussions/15176

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

* fixup! docs: explicitly document `depTypes` each manager supports

* docs(manager): display `depTypes` documentation if none present

For consistency, and to make it more explicit.

---------

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-03-31 12:08:39 +00:00
renovate[bot] b786b3bfa1 docs: update references to python to ffebef4 (main) (#42058)
docs: update references to python to ffebef4

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-23 00:26:54 +00:00
renovate[bot] 426261e5d2 docs: update references to python to 7aea682 (main) (#41937)
docs: update references to python to 7aea682

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-16 00:38:05 +00:00
renovate[bot] f344727e03 docs: update references to python to 6134653 (main) (#41577)
docs: update references to python to 6134653

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-02 00:34:57 +00:00
renovate[bot] 4a2578d18d build(deps): update dependency zod to v4 (main) (#41225)
* build(deps): update dependency zod to v4

| datasource | package | from    | to    |
| ---------- | ------- | ------- | ----- |
| npm        | zod     | 3.25.76 | 4.3.6 |

* fix: zod migration

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2026-02-18 07:37:50 +00:00
renovate[bot] 3b9d2472c2 docs: update references to python to 151ab35 (main) (#41193)
docs: update references to python to 151ab35

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-16 00:26:06 +00:00
renovate[bot] 10b2d3ae6a docs: update references to python to 4b827ab (main) (#41007)
docs: update references to python to 4b827ab

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-09 00:27:09 +00:00
Sergei Zharinov 9d857c1f68 refactor(lint): Organize imports with biome (#40966) 2026-02-06 13:40:01 +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
renovate[bot] 742854c004 chore(deps): update python:3.14 docker digest to 17bc9f1 (main) (#40582)
chore(deps): update python:3.14 docker digest to 17bc9f1

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-21 16:27:16 +00:00
renovate[bot] d633e3386b chore(deps): update python:3.14 docker digest to 37cba11 (main) (#40415)
chore(deps): update python:3.14 docker digest to 37cba11

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-14 01:34:08 +00:00
renovate[bot] 6e59bcd7b6 chore(deps): update python:3.14 docker digest to 93c7740 (main) (#40412)
chore(deps): update python:3.14 docker digest to 93c7740

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-13 22:25:44 +00:00
renovate[bot] 3560775ffc chore(deps): update python:3.14 docker digest to 0abd92b (main) (#40404)
chore(deps): update python:3.14 docker digest to 0abd92b

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-13 12:33:20 +00:00
renovate[bot] 47838a1562 chore(deps): update python:3.14 docker digest to 9953689 (main) (#40401)
chore(deps): update python:3.14 docker digest to 9953689

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-13 10:34:40 +00:00
renovate[bot] 9846f0d50f chore(deps): update python:3.14 docker digest to 6d58c1a (main) (#40262)
chore(deps): update python:3.14 docker digest to 6d58c1a

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-03 20:27:07 +00:00
renovate[bot] 021ace67a6 chore(deps): update python:3.14 docker digest to f05033a (main) (#40222)
chore(deps): update python:3.14 docker digest to f05033a

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-30 16:28:12 +00:00
renovate[bot] 4c7edafceb chore(deps): update python:3.14 docker digest to 5279485 (main) (#40211)
chore(deps): update python:3.14 docker digest to 5279485

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-30 10:28:06 +00:00
renovate[bot] 14b4782b8c chore(deps): update python:3.14 docker digest to 5fdc8eb (main) (#40210)
chore(deps): update python:3.14 docker digest to 5fdc8eb

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-30 07:28:56 +00:00
renovate[bot] e1d620e21c chore(deps): update python:3.14 docker digest to 8797f8e (main) (#40209)
chore(deps): update python:3.14 docker digest to 8797f8e

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-30 04:25:36 +00:00
renovate[bot] 9f49cbff46 chore(deps): update python:3.14 docker digest to 492b292 (main) (#40018)
chore(deps): update python:3.14 docker digest to 492b292

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-16 01:47:43 +00:00
renovate[bot] 63afd15031 chore(deps): update python:3.14 docker digest to 2febcd1 (main) (#39886)
chore(deps): update python:3.14 docker digest to 2febcd1

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-09 23:32:26 +00:00
renovate[bot] 43a9a884ba chore(deps): update python:3.14 docker digest to 6632dac (main) (#39879)
chore(deps): update python:3.14 docker digest to 6632dac

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-09 14:32:44 +00:00
renovate[bot] 33a2554e2f chore(deps): update python:3.14 docker digest to 165e434 (main) (#39870)
chore(deps): update python:3.14 docker digest to 165e434

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-09 08:27:05 +00:00
renovate[bot] 7b8caf3c34 chore(deps): update python:3.14 docker digest to c1684c8 (main) (#39869)
chore(deps): update python:3.14 docker digest to c1684c8

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-09 05:26:04 +00:00
renovate[bot] 9a33020fac chore(deps): update python:3.14 docker digest to 1f8e9bf (main) (#39865)
chore(deps): update python:3.14 docker digest to 1f8e9bf

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-08 23:28:22 +00:00
renovate[bot] b92d8fdcd6 chore(deps): update python:3.14 docker digest to 595140b (main) (#39722)
chore(deps): update python:3.14 docker digest to 595140b

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-03 05:26:36 +00:00
renovate[bot] 35252e217e chore(deps): update python:3.14 docker digest to edf6433 (main) (#39486)
chore(deps): update python:3.14 docker digest to edf6433

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-24 05:22:33 +00:00