renovate/lib/modules/datasource
Mike Glazer 7eef0d3ed0
feat(datasource/orb): Add support for internal CircleCI Registries (#33213)
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
2024-12-20 16:07:28 +00:00
..
__snapshots__ fix(datasource): remove unnecessary PyPI changelog URL overrides (#27725) 2024-03-15 19:46:07 +00:00
artifactory feat(datasource): `sourceUrl` & `releaseTimestamp` support (#29122) 2024-05-21 07:04:12 +00:00
aws-machine-image chore: eslint to enforce for typed imports (#30844) 2024-08-19 13:15:27 +00:00
aws-rds docs(datasource/aws-rds): improve readme (#29870) 2024-12-06 09:41:34 +00:00
azure-bicep-resource fix(datasource/bicep): suppress resourceFunctions (#28379) 2024-04-16 07:41:58 +00:00
azure-pipelines-tasks refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
bazel fix(bazel): use bazel-module versioning for bazel datasource (#25649) 2023-11-08 15:42:36 +00:00
bitbucket-tags fix: Align cache decorator parameters (#30862) 2024-08-19 07:34:36 +00:00
bitrise refactor: use yaml instead of js-yaml for parsing YAML files (#31336) 2024-09-16 18:03:23 +00:00
cdnjs refactor(cdnjs): Use single cache namespace (#31032) 2024-08-27 18:02:39 +00:00
clojure feat(maven): Use release post-fetch processing (#31261) 2024-09-26 13:20:54 +00:00
conan fix: updated url (#32801) 2024-11-29 17:14:19 +00:00
conda feat(datasource): `sourceUrl` & `releaseTimestamp` support (#29122) 2024-05-21 07:04:12 +00:00
cpan feat(datasource/cpan): populate latest tag (#32677) 2024-11-25 08:23:12 +00:00
crate feat(crate): Support `releaseTimestamp` (#31467) 2024-10-11 11:40:19 +00:00
custom feat(jsonata): validation, caching, better logging (#31832) 2024-10-08 09:11:15 +00:00
dart feat(datasource): `sourceUrl` & `releaseTimestamp` support (#29122) 2024-05-21 07:04:12 +00:00
dart-version feat(datasource): `sourceUrl` & `releaseTimestamp` support (#29122) 2024-05-21 07:04:12 +00:00
deb docs(datasource/deb): fix note admonition (#31538) 2024-09-23 14:24:27 +00:00
deno refactor(deno): Use single cache namespace (#31034) 2024-08-27 03:48:21 +00:00
docker feat(manager/flux): Allow OCI media type used by `flux push artifact` to enable Release Notes lookup (#32783) 2024-11-28 17:13:54 +00:00
dotnet-version feat(datasource): `sourceUrl` & `releaseTimestamp` support (#29122) 2024-05-21 07:04:12 +00:00
endoflife-date refactor: Rename `EndoflifeDatePackagesource` to `EndoflifeDateDatasource` (#30898) 2024-08-20 04:55:57 +00:00
flutter-version feat(datasource): `sourceUrl` & `releaseTimestamp` support (#29122) 2024-05-21 07:04:12 +00:00
galaxy fix(datasource/galaxy): support multiple results (#29664) 2024-09-23 06:43:56 +00:00
galaxy-collection refactor(galaxy-collection): Use single cache namespace (#31036) 2024-08-27 18:03:31 +00:00
git-refs chore: eslint to enforce for typed imports (#30844) 2024-08-19 13:15:27 +00:00
git-tags chore: eslint to enforce for typed imports (#30844) 2024-08-19 13:15:27 +00:00
gitea-releases feat(datasource): `sourceUrl` & `releaseTimestamp` support (#29122) 2024-05-21 07:04:12 +00:00
gitea-tags feat(datasource): `sourceUrl` & `releaseTimestamp` support (#29122) 2024-05-21 07:04:12 +00:00
github-release-attachments refactor(github): Use single cache namespace for release attachments (#31037) 2024-08-27 03:32:15 +00:00
github-releases feat(datasource): `sourceUrl` & `releaseTimestamp` support (#29122) 2024-05-21 07:04:12 +00:00
github-runners feat(datasource/github-runners): deprecate Ubuntu 20.04 (#33139) 2024-12-16 19:42:20 +00:00
github-tags feat(datasource): `sourceUrl` & `releaseTimestamp` support (#29122) 2024-05-21 07:04:12 +00:00
gitlab-packages feat(datasource): `sourceUrl` & `releaseTimestamp` support (#29122) 2024-05-21 07:04:12 +00:00
gitlab-releases feat(datasource): `sourceUrl` & `releaseTimestamp` support (#29122) 2024-05-21 07:04:12 +00:00
gitlab-tags refactor(gitlab-tags): Use single cache namespace (#31038) 2024-08-27 16:56:32 +00:00
glasskube-packages chore: eslint to enforce for typed imports (#30844) 2024-08-19 13:15:27 +00:00
go fix(go): Request only info for versions with the same major (#33169) 2024-12-20 15:01:58 +00:00
golang-version feat(datasource): `sourceUrl` & `releaseTimestamp` support (#29122) 2024-05-21 07:04:12 +00:00
gradle-version chore: eslint to enforce for typed imports (#30844) 2024-08-19 13:15:27 +00:00
hackage feat(datasource): add Hackage datasource (#32944) 2024-12-13 07:17:26 +00:00
helm refactor: use yaml instead of js-yaml for parsing YAML files (#31336) 2024-09-16 18:03:23 +00:00
hermit refactor(hermit): Use single cache namespace (#31052) 2024-08-27 19:27:32 +00:00
hex fix(hex): Relax case in typing of schema (#32963) 2024-12-08 16:35:11 +00:00
hexpm-bob feat(datasource): `sourceUrl` & `releaseTimestamp` support (#29122) 2024-05-21 07:04:12 +00:00
java-version refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
jenkins-plugins refactor(jenkins): Rename cache namespace (#30868) 2024-08-19 05:45:50 +00:00
kubernetes-api refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
maven refactor(maven): Unified result type for http fetch (#32813) 2024-12-09 18:58:07 +00:00
node-version feat(datasource): `sourceUrl` & `releaseTimestamp` support (#29122) 2024-05-21 07:04:12 +00:00
npm test: Improve errors for missing/unused HTTP mocks (#31678) 2024-09-30 05:26:53 +00:00
nuget refactor(nuget): Rename cache namespace (#30880) 2024-08-19 15:39:58 +00:00
orb feat(datasource/orb): Add support for internal CircleCI Registries (#33213) 2024-12-20 16:07:28 +00:00
packagist refactor(packagist): Use single cache namespace (#31053) 2024-08-27 19:26:53 +00:00
pod refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
puppet-forge feat(datasource): `sourceUrl` & `releaseTimestamp` support (#29122) 2024-05-21 07:04:12 +00:00
pypi feat(datasource/pypi): always fallback to try simple endpoints (#32024) 2024-11-27 08:57:59 +00:00
python-version refactor: Rename `EndoflifeDatePackagesource` to `EndoflifeDateDatasource` (#30898) 2024-08-20 04:55:57 +00:00
repology refactor(repology): Rename cache namespace (#30881) 2024-08-19 15:27:20 +00:00
ruby-version feat(datasource): `sourceUrl` & `releaseTimestamp` support (#29122) 2024-05-21 07:04:12 +00:00
rubygems refactor: Rename `unwrapOrElse` to `unwrapOr` for `Result` utility (#32787) 2024-11-28 17:04:02 +00:00
sbt-package refactor(maven): Unified result type for http fetch (#32813) 2024-12-09 18:58:07 +00:00
sbt-plugin refactor(maven): Unified result type for http fetch (#32813) 2024-12-09 18:58:07 +00:00
terraform-module feat(datasource): `sourceUrl` & `releaseTimestamp` support (#29122) 2024-05-21 07:04:12 +00:00
terraform-provider refactor(terraform-provider): Use single cache namespace (#31054) 2024-08-28 05:24:41 +00:00
unity3d chore: eslint to enforce for typed imports (#30844) 2024-08-19 13:15:27 +00:00
api.ts feat(datasource): add Hackage datasource (#32944) 2024-12-13 07:17:26 +00:00
common.spec.ts fix: Handle `extractVersion` with release post-processing (#32540) 2024-11-16 10:32:33 +00:00
common.ts fix: Handle `extractVersion` with release post-processing (#32540) 2024-11-16 10:32:33 +00:00
datasource.spec.ts refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
datasource.ts refactor: Restrict `postprocessRelease` method types (#31626) 2024-09-26 04:56:14 +00:00
index.spec.ts chore(deps): update typescript-eslint monorepo to v8 (major) (#30750) 2024-08-14 10:33:02 +00:00
index.ts refactor(datasource): Simplify merge registry logic (#31430) 2024-09-18 05:54:47 +00:00
metadata-manual.ts test(lib/data): schemas for changelog and source urls (#32151) 2024-10-30 08:19:48 +00:00
metadata.spec.ts fix(datasource): remove unnecessary PyPI changelog URL overrides (#27725) 2024-03-15 19:46:07 +00:00
metadata.ts chore(deps): update typescript-eslint monorepo to v8 (major) (#30750) 2024-08-14 10:33:02 +00:00
postprocess-release.spec.ts fix: Handle `extractVersion` with release post-processing (#32540) 2024-11-16 10:32:33 +00:00
postprocess-release.ts fix: Handle `extractVersion` with release post-processing (#32540) 2024-11-16 10:32:33 +00:00
readme.md test: Improve errors for missing/unused HTTP mocks (#31678) 2024-09-30 05:26:53 +00:00
schema.ts fix(datasource/cdnjs): update logic to accomodate api changes (#27212) 2024-02-11 10:57:56 +00:00
types.ts feat(datasource/cpan): populate latest tag (#32677) 2024-11-25 08:23:12 +00:00
util.ts feat(uv): support GCloud credentials for Google Artifact Registry when locking (#32545) 2024-11-17 09:01:33 +00:00
utils.spec.ts refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00

readme.md

Datasources

Datasources are used in Renovate primarily to fetch released versions of packages.

Follow the class-based programming style

New datasources must follow the class-based programming style. Use the java-version datasource as a reference.

Add the datasource to the API in api.ts so that the new datasource is usable. If you find Unused HTTP mocks errors in the Jest tests and your mocked URLs are correct, make sure the datasource is correctly registered.

getReleases

The minimum exported interface for a datasource is a function called getReleases that takes a lookup config as input.

The config has:

  • packageName: the package's full name including scope if present (e.g. @foo/bar)
  • registryUrls: an array of registry URLs to try

getReleases should return an object having:

  • releases: an array of strings of matched versions. This is the only mandatory field
  • deprecationMessage: a string description of the package's deprecation notice, if applicable
  • sourceUrl: a HTTP URL pointing to the source code (for example on GitHub)
  • homepage: a HTTP URL for the package's homepage. Ideally should be empty if the homepage and sourceUrl are the same
  • changelogUrl: a URL pointing to the package's changelog (could be a Markdown file, for example). If not present then Renovate will search the sourceUrl for a changelog file
  • tags: an object mapping tag -> version, for example tags: { latest: '3.0.0' }. This is only used by the followTags function

getDigest

Datasources that support digests (like Docker digests and Git commit hashes) can export a getDigest function.

The getDigest function has two inputs:

  • config: the Renovate config for the package being updated, has the same fields as getReleases
  • newValue: the version or value to retrieve the digest for

The getDigest function returns a string output representing the digest value. If no digest is found, the getDigest function should return null.