Commit Graph

26 Commits

Author SHA1 Message Date
Sebastian Poxhofer e01b50c6ab refactor(linter): oxlint prefer partial typed casts for consts (#45239)
* refactor: flag all typed object literal casts in prefer-partial-in-specs

* refactor: type maven spec httpError helper against got response shape
2026-08-12 08:50:57 +00:00
Sebastian Poxhofer 0793274b86 refactor: prefer templates rather than + in test files (#43441)
refactor: prefer templates rather than `+`
2026-05-19 09:52:28 +00:00
Jamie Tanna 2832648dda fix(datasource/maven): treat rate-limit errors for Maven Central mirror as Maven Central (#43432)
In 01bcd4fd43 we introduced knowledge of
the Maven Central mirror, but haven't taken it into account when looking
at rate limit errors.

To prevent this in the future, we can introduce a new helper function,
`isMavenCentral`, for other usage.
2026-05-18 15:43:33 +00:00
Jamie Tanna b898e4a146 fix(datasource/maven): cache 404s on maven-metadata.xml for 12h (#43373)
* fix(datasource/maven): cache 404s on `maven-metadata.xml` for 24h

As part of efforts to reduce the general overload on Maven Central[0]
from Renovate, we can look to reduce unnecessary HTTP lookups.

The Maven Datasource will use the `registryStrategy=merge`, which leads
to looking up a package in each of our registries, and merging them if
present.

However, this means that when looking up a package that /will only ever
be in a given registry/ (such as in
01bcd4fd43) we're hitting other registries
with packages they are unlikely to have.

This is unnecessary, significantly increases traffic to Maven Central,
and leads to us re-fetching the same 404s which count towards rate
limits, and increased, unnecessary, server load on Maven Central.

We can instead introduce a new cache for 404s for the
`maven-metadata.xml`, for 24 hours, which should reduce traffic to Maven
Central (and other configured registries) if they only have a subset of
dependencies.

[0]: https://www.sonatype.com/blog/maven-central-and-the-tragedy-of-the-commons

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

* fixup! fix(datasource/maven): cache 404s on `maven-metadata.xml` for 24h

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

* cache-down

* perf(datasource/maven): add jitter

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

* sq

---------

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-05-16 08:33:14 +00:00
Jamie Tanna afb9bf84d4 fix(datasource/maven): cache immutable .pom URLs for 28 days (#43367)
fix(datasource/maven): cache `.pom` URLs for 7 days

As part of efforts to reduce the general overload on Maven Central[0]
from Renovate, we can look to reduce unnecessary HTTP lookups.

For instance, when a `.pom` URL is retrieved, it is re-checked every 15
minutes in case it has been updated.

This is unnecessary, significantly increases traffic to Maven Central,
and leads to us re-checking constantly for artifacts that are not
updating.

Each time we perform the lookup, we'll use the ETag result to do an
`If-None-Match`, but this still introduces an HTTP call upstream that
counts towards rate limits, and server load on Maven Central.

Instead, we can wrap the lookups for immutable pom.xml results with a 28
day soft cache. In a rare case where a `.pom` URL is updated, we'll then
re-fetch it after 28 days, but until then, it'll be safely returned from
cache.

[0]: https://www.sonatype.com/blog/maven-central-and-the-tragedy-of-the-commons

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-05-15 17:14:07 +00:00
Sebastian Poxhofer 03baf6ee4a test(noNewURL): add new rule enforcing parseUrl() from 'lib/util/url.ts' (#43247)
* test(noNewURL): add new rule enforcing parseUrl() from 'lib/util/url.ts'

* replace newURL with parseUrl

* remove non-null assertions marks if appropiate

* test: add additional tests

* test: add additional tests and ignore where it makes sense

* implement suggestions

* test: further improve coverage

* apply suggestion
2026-05-13 16:23:10 +00:00
Sergei Zharinov e33aa4cc39 feat(cache): Add writeSchema to Maven cache provider (#42570)
* feat(cache): Add `writeSchema` to Maven cache provider

* Use toEqual and codeBlock in maven schema tests
2026-04-13 14:28:30 +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] 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
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
Sergei Zharinov 6e8de16295 feat: Add Maven Central rate limit logging (#37704)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2025-08-28 04:50:27 +00:00
Sergei Zharinov 77fa0a0010 feat(maven): Unify fetching utilities (#32999) 2025-03-30 16:38:49 +00:00
Michael Kriese 19c115c813 test: cleanup (#34785) 2025-03-13 17:52:09 +00:00
Michael Kriese 593a92655e feat: refactor http (#34550) 2025-02-28 14:40:04 +00:00
Sergei Zharinov 606ab430d1 refactor(maven): Unified result type for http fetch (#32813) 2024-12-09 18:58:07 +00:00
Sergei Zharinov b90840283a refactor(maven): Unified result type for s3 fetch (#32814) 2024-12-08 21:44:07 +00:00
Sergei Zharinov e5655a806d refactor(maven): Fix types for util functions (#32702) 2024-11-24 14:39:21 +00:00
Sergei Zharinov e7543eba78 refactor(maven): Simplify downloadHttpProtocol return type (#31641) 2024-09-26 21:01:14 +00:00
Sergei Zharinov 8ea0538a0f refactor(maven): Change signatures for S3 resource checks (#31269) 2024-09-09 05:22:03 +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
Sergei Zharinov b69416ce17 refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
Rhys Arkins 36e2b328bb chore: update types reference 2023-08-15 11:31:15 +02:00
Michael Kriese 88c9ca6aa3 fix(datasource/maven): use sdk v3 api (#17408) 2022-08-25 12:00:54 +02:00
Michael Kriese 0838ca209c refactor: strict datasource tests (#16150) 2022-06-20 13:15:02 +02:00
Kenneth Jorgensen 6ea0d5d6fb feat(maven): S3 Support (#14938)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Sergei Zharinov <zharinov@users.noreply.github.com>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2022-05-04 05:59:14 +02:00