renovate/lib/datasource
2021-11-19 14:22:35 +01:00
..
__snapshots__ fix(datasource): better massage github sourceUrl (#12737) 2021-11-18 14:50:53 +00:00
adoptium-java fix(datasource/adoptium-java): wrong cache key (#11658) 2021-09-09 14:46:38 +00:00
artifactory fix: modified regex to use RE2 (#12025) 2021-10-19 14:53:34 +02:00
aws-machine-image feat: aws-machine-image datasource (#11869) 2021-11-19 09:59:06 +00:00
bitbucket-tags test: fix lint (#12551) 2021-11-08 13:16:58 +01:00
cdnjs chore: eslint consistent-return 2021-11-09 07:37:22 +01:00
clojure test(maven): Cover the case of void "last-modified" jar header (#12641) 2021-11-14 08:09:54 +00:00
crate fix(crate): Reduce git concurrency to 1 for crates (#12718) 2021-11-17 21:39:06 +00:00
dart refactor: no implicit override (#11395) 2021-08-23 20:50:37 +00:00
docker chore: remove airbnb (#12557) 2021-11-08 13:03:55 +00:00
galaxy refactor: no implicit override (#11395) 2021-08-23 20:50:37 +00:00
galaxy-collection fix: enable eslint eqeqeq (#12574) 2021-11-09 07:02:59 +00:00
git-refs fix(git-refs): ignore refs/for (#12735) 2021-11-18 13:36:41 +00:00
git-tags chore: report and fix unused ESLint disable directives (#12548) 2021-11-08 20:20:03 +01:00
github-releases refactor(github): Extract getSourceUrl function (#12510) 2021-11-05 10:35:06 +00:00
github-tags refactor(github): Extract getSourceUrl function (#12510) 2021-11-05 10:35:06 +00:00
gitlab-packages feat(datasource): add Gitlab Package support (#11672) 2021-09-16 10:47:30 +00:00
gitlab-releases fix(core/changelogs): pass though known project info (#11515) 2021-09-01 13:07:55 +02:00
gitlab-tags refactor(gitlab): Extract getSourceUrl function (#12511) 2021-11-05 11:45:29 +01:00
go fix(gomod): Fix gomod digest updates (#12655) 2021-11-15 06:16:39 +00:00
gradle-version refactor: no implicit override (#11395) 2021-08-23 20:50:37 +00:00
helm test: fix lint (#12551) 2021-11-08 13:16:58 +01:00
hex test: use codeql compatible token / passwords (#11297) 2021-09-09 16:17:05 +02:00
jenkins-plugins refactor(jenkins-plugins): convert to class-based datasource (#12702) 2021-11-18 19:55:21 +00:00
maven feat(maven): Leverage index HTML for Maven Central (#12607) 2021-11-16 10:49:15 +01:00
node feat(datasource): add node datasource (#11651) 2021-09-09 12:54:12 +02:00
npm chore: report and fix unused ESLint disable directives (#12548) 2021-11-08 20:20:03 +01:00
nuget test: fix lint (#12551) 2021-11-08 13:16:58 +01:00
orb test: fix lint (#12551) 2021-11-08 13:16:58 +01:00
packagist fix: modified regex to use RE2 (#12025) 2021-10-19 14:53:34 +02:00
pod fix: modified regex to use RE2 (#12025) 2021-10-19 14:53:34 +02:00
pypi fix(pypi): normalize simple package lookup (#12544) 2021-11-17 16:02:39 +00:00
repology test: fix lint (#12551) 2021-11-08 13:16:58 +01:00
ruby-version chore: report and fix unused ESLint disable directives (#12548) 2021-11-08 20:20:03 +01:00
rubygems refactor(rubygems): convert to class-based (#11229) 2021-11-10 07:35:05 +01:00
sbt-package fix: modified regex to use RE2 (#12025) 2021-10-19 14:53:34 +02:00
sbt-plugin fix: modified regex to use RE2 (#12025) 2021-10-19 14:53:34 +02:00
terraform-module chore: report and fix unused ESLint disable directives (#12548) 2021-11-08 20:20:03 +01:00
terraform-provider fix: modified regex to use RE2 (#12025) 2021-10-19 14:53:34 +02:00
api.ts feat: aws-machine-image datasource (#11869) 2021-11-19 09:59:06 +00:00
common.ts refactor: optimize type usage (#8947) 2021-03-02 21:44:55 +01:00
datasource.spec.ts test: Fix test descriptions and enforce it via new linting rule (#11285) 2021-08-18 05:46:56 +00:00
datasource.ts chore: report and fix unused ESLint disable directives (#12548) 2021-11-08 20:20:03 +01:00
index.spec.ts feat: replace deprecated dependencies with their replacements (#5558) 2021-11-12 08:10:52 +00:00
index.ts logs: trace cached datasource response 2021-11-19 14:22:35 +01:00
metadata.spec.ts fix(datasource): better massage github sourceUrl (#12737) 2021-11-18 14:50:53 +00:00
metadata.ts fix(datasource): better massage github sourceUrl (#12737) 2021-11-18 14:50:53 +00:00
readme.md docs: new datasources must follow class-based programming style (#11070) 2021-08-03 22:09:19 +02:00
types.ts feat: replace deprecated dependencies with their replacements (#5558) 2021-11-12 08:10:52 +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.

getReleases

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

The config contains:

  • lookupName: 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 containing:

  • 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, contains 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.