renovate/lib/modules/datasource
2022-10-05 15:22:33 +02:00
..
__snapshots__ test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
adoptium-java docs(adoptium-java datasource): rewrite (#17411) 2022-08-29 13:00:34 +00:00
artifactory test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
aws-machine-image test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
aws-rds chore(deps): update jest monorepo (#17737) 2022-09-12 16:58:52 +02:00
azure-pipelines-tasks feat(datasource/azure-pipelines-tasks): add azure-pipelines-tasks datasource (#16904) 2022-08-08 21:34:29 -07:00
bitbucket-tags test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
cdnjs test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
clojure test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
conan feat(conan): add revisions support (#16871) 2022-08-11 21:07:54 +02:00
conda feat(datasource/conda): support custom registries (#17809) 2022-10-05 15:22:33 +02:00
cpan feat(datasource): add cpan datasource (#16545) 2022-07-26 06:39:51 +00:00
crate fix(datasource/crates): Crates files are in lower case, lowercase the url package name (#17608) 2022-09-08 10:50:41 +03:00
dart fix(datasource/metadata): delete homepage url case (#17372) 2022-08-25 17:18:51 +00:00
docker feat(docker/artifactory): add retry logic for docker offical images (#17925) 2022-09-30 05:06:29 +00:00
flutter-version test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
galaxy test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
galaxy-collection refactor: Create promises utilities (#17651) 2022-09-06 10:36:51 +00:00
git-refs test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
git-tags test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
github-releases chore(lint): add object shortand rule (#18080) 2022-10-02 21:20:24 +02:00
github-tags chore(lint): add object shortand rule (#18080) 2022-10-02 21:20:24 +02:00
gitlab-packages test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
gitlab-releases test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
gitlab-tags test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
go feat(go): Continue processing if an error occurs trying to get sourceUrl (#17981) 2022-09-27 12:46:41 +00:00
golang-version feat(golang-version): enable custom registryUrls (#17828) 2022-09-22 13:10:13 +02:00
gradle-version test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
helm refactor: use optional chaining (#17510) 2022-08-30 17:30:57 +02:00
hermit refactor(github): Uniform names for github datasource types (#17701) 2022-09-08 11:26:27 +02:00
hex test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
jenkins-plugins test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
maven chore(lint): add object shortand rule (#18080) 2022-10-02 21:20:24 +02:00
node test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
npm fix(npm): support short sourceUrl format (#18073) 2022-10-04 07:55:59 +03:00
nuget refactor: Create promises utilities (#17651) 2022-09-06 10:36:51 +00:00
orb test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
packagist refactor: Create promises utilities (#17651) 2022-09-06 10:36:51 +00:00
pod fix(ci): Restrict template expressions (#16834) 2022-07-30 16:28:31 +02:00
puppet-forge fix(ci): Restrict template expressions (#16834) 2022-07-30 16:28:31 +02:00
pypi test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
repology test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
ruby-version test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
rubygems test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
sbt-package fix(git): wrong git url handling (#17380) 2022-08-24 19:41:43 +00:00
sbt-plugin test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
terraform-module fix(datasource/terraform): support absolute URLs in service discovery (#18040) 2022-10-02 05:14:59 +00:00
terraform-provider fix(datasource/terraform): support absolute URLs in service discovery (#18040) 2022-10-02 05:14:59 +00:00
api.ts feat(datasource): New datasource that pulls database engine versions available for use on AWS RDS (#17345) 2022-08-26 11:44:53 +00:00
common.ts refactor: lib/modules (#14488) 2022-03-04 09:04:02 +01:00
datasource.spec.ts refactor(modules/datasource): fix null-check issues (#16153) 2022-06-20 16:24:37 +02:00
datasource.ts feat(sbt-package): Fallback to Maven datasource for GitLab packages (#16817) 2022-08-01 11:05:17 +00:00
index.spec.ts chore(lint): add object shortand rule (#18080) 2022-10-02 21:20:24 +02:00
index.ts feat(replacement): datasource changes (#17881) 2022-09-27 13:19:18 +00:00
metadata-manual.ts fix: switch changelog urls from http to https (#16349) 2022-07-01 04:57:07 +00:00
metadata.spec.ts fix(datasource/metadata): delete homepage url case (#17372) 2022-08-25 17:18:51 +00:00
metadata.ts fix(datasource/metadata): delete homepage url case (#17372) 2022-08-25 17:18:51 +00:00
readme.md docs: replace encounter with find (#14694) 2022-03-16 14:54:45 +01:00
types.ts feat(replacement): datasource changes (#17881) 2022-09-27 13:19:18 +00:00

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 adoptium-java datasource as a reference.

Add the datasource to the API in api.ts so that the new datasource is usable. If you find Pending mocks! errors in the Jest tests and your mocked URLs are correct, ensure 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 (e.g. 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, e.g. tags: { latest: '3.0.0' }. This is only used by the followTags function.

getDigest

Datasources that support the concept of digests (e.g. Docker digests and Git commit hashes) also 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 none is found then a return value of null should be returned.