renovate/lib/datasource
2021-09-01 13:07:55 +02:00
..
__snapshots__ refactor(datasource): More explicit snapshot tests (#11199) 2021-08-10 11:24:32 +00:00
adoptium-java refactor: no implicit override (#11395) 2021-08-23 20:50:37 +00:00
bitbucket-tags refactor: no implicit override (#11395) 2021-08-23 20:50:37 +00:00
cdnjs refactor: no implicit override (#11395) 2021-08-23 20:50:37 +00:00
clojure refactor: no implicit override (#11395) 2021-08-23 20:50:37 +00:00
crate test: Fix test descriptions and enforce it via new linting rule (#11285) 2021-08-18 05:46:56 +00:00
dart refactor: no implicit override (#11395) 2021-08-23 20:50:37 +00:00
docker feat(manager:docker): use head requests (#11484) 2021-08-31 08:23:22 +00:00
galaxy refactor: no implicit override (#11395) 2021-08-23 20:50:37 +00:00
galaxy-collection refactor: no implicit override (#11395) 2021-08-23 20:50:37 +00:00
git-refs test: Fix test descriptions and enforce it via new linting rule (#11285) 2021-08-18 05:46:56 +00:00
git-tags test: Fix test descriptions and enforce it via new linting rule (#11285) 2021-08-18 05:46:56 +00:00
github-releases fix(core/changelogs): pass though known project info (#11515) 2021-09-01 13:07:55 +02:00
github-tags fix(core/changelogs): pass though known project info (#11515) 2021-09-01 13:07:55 +02:00
gitlab-releases fix(core/changelogs): pass though known project info (#11515) 2021-09-01 13:07:55 +02:00
gitlab-tags feat(gitlab-release): implement datasource (#11226) 2021-09-01 09:36:38 +00:00
go test: Fix test descriptions and enforce it via new linting rule (#11285) 2021-08-18 05:46:56 +00:00
gradle-version refactor: no implicit override (#11395) 2021-08-23 20:50:37 +00:00
helm refactor: no implicit override (#11395) 2021-08-23 20:50:37 +00:00
hex test: Fix test descriptions and enforce it via new linting rule (#11285) 2021-08-18 05:46:56 +00:00
jenkins-plugins fix(datasource): trim trailing slash in registry url (#11392) 2021-08-30 18:28:32 +02:00
maven test: Fix test descriptions and enforce it via new linting rule (#11285) 2021-08-18 05:46:56 +00:00
npm test: Fix test descriptions and enforce it via new linting rule (#11285) 2021-08-18 05:46:56 +00:00
nuget fix(datasource): trim trailing slash in registry url (#11392) 2021-08-30 18:28:32 +02:00
orb refactor: no implicit override (#11395) 2021-08-23 20:50:37 +00:00
packagist test: Fix test descriptions and enforce it via new linting rule (#11285) 2021-08-18 05:46:56 +00:00
pod feat: enable right filtering when specifing hostRules with github-api using datasources (#11136) 2021-08-25 07:07:23 +00:00
pypi fix(datasource): trim trailing slash in registry url (#11392) 2021-08-30 18:28:32 +02:00
repology fix(datasource): trim trailing slash in registry url (#11392) 2021-08-30 18:28:32 +02:00
ruby-version refactor: no implicit override (#11395) 2021-08-23 20:50:37 +00:00
rubygems fix(datasource): trim trailing slash in registry url (#11392) 2021-08-30 18:28:32 +02:00
sbt-package test: Fix test descriptions and enforce it via new linting rule (#11285) 2021-08-18 05:46:56 +00:00
sbt-plugin test: Fix test descriptions and enforce it via new linting rule (#11285) 2021-08-18 05:46:56 +00:00
terraform-module refactor: no implicit override (#11395) 2021-08-23 20:50:37 +00:00
terraform-provider refactor: no implicit override (#11395) 2021-08-23 20:50:37 +00:00
api.ts feat(gitlab-release): implement datasource (#11226) 2021-09-01 09:36:38 +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 fix: rethrow ExternalHostError error (#10761) 2021-07-09 07:06:50 +00:00
index.spec.ts test: Fix test descriptions and enforce it via new linting rule (#11285) 2021-08-18 05:46:56 +00:00
index.ts fix(datasource): trim trailing slash in registry url (#11392) 2021-08-30 18:28:32 +02:00
metadata.spec.ts test: Fix test descriptions and enforce it via new linting rule (#11285) 2021-08-18 05:46:56 +00:00
metadata.ts feat: add changelog url for tailwindcss-classnames (#10120) 2021-05-24 13:10:19 +02:00
readme.md docs: new datasources must follow class-based programming style (#11070) 2021-08-03 22:09:19 +02:00
types.ts feat(github-releases): getDigest() (#10947) 2021-08-05 17:05:22 +02: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.