Commit Graph

4 Commits

Author SHA1 Message Date
Sebastian Poxhofer 1e6ffa8171 refactor(datasource): add cached() helper to the Datasource base class (#46102)
Every datasource that caches its releases hand-wrote the same
`withCache({ namespace: `datasource-${id}`, ... }, () => this._getReleases(config))`
wrapper, repeating the namespace literal and using underscore-prefixed
method names that `docs/development/best-practices.md` discourages.

Add `Datasource.cacheNamespace` (derived from the datasource id) and a
protected `Datasource.cached()` helper that defaults `namespace` to it,
exporting `CachedOptions` from `with-cache.ts`. Migrate 29 datasources
onto the helper, dropping their namespace literals, the static
`cacheNamespace` field in `github-digest`, and renaming the wrapped
`_getX` methods to `fetchX`.

Behaviour change: `golang-version` used the constant cache key `'all'`
while declaring `customRegistrySupport = true`, so a custom registryUrl
shared the cache entry with the default one. The key is now
`${config.registryUrl}`, which invalidates existing entries once.
2026-09-22 19:30:25 +00:00
Sergei Zharinov c07814ca4d refactor: Remove decorators for ESM compatibility (#40736)
* refactor: Migrate to decorator alternatives

* refactor: Remove decorators

* Fixes

* build: Remove decorator support from build pipeline

* fix: Remove extra brace in cdnjs getDigest cache key
2026-01-28 13:22:53 +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
Borja Domínguez 195e3084e5 feat(datasource): Add Nextcloud (#37292)
* feat(datasource): Add Nextcloud

* fix tests

* fix errors

* Update lib/modules/datasource/nextcloud/readme.md

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

* Update lib/modules/datasource/nextcloud/index.ts

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

* Update lib/modules/datasource/nextcloud/index.ts

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

* Update lib/modules/datasource/nextcloud/index.ts

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

* chore: move member

* move changelogUrl assignment

* wip

* wip

* wip

* wip

* Update schema.ts

* Update lib/modules/datasource/nextcloud/index.ts

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

* chore: change homepage to sourceUrl

* chore: change backticks to single quotes

---------

Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>
2025-11-19 10:26:54 +00:00