renovate/lib/datasource
2020-03-12 10:53:02 +01:00
..
__snapshots__ feat: replace datasource constants with IDs (#5595) 2020-03-01 08:01:12 +01:00
cdnjs fix: move datasource error handling into index (#5662) 2020-03-07 12:13:31 +01:00
crate fix: move datasource error handling into index (#5662) 2020-03-07 12:13:31 +01:00
dart fix: move datasource error handling into index (#5662) 2020-03-07 12:13:31 +01:00
docker fix: move datasource error handling into index (#5662) 2020-03-07 12:13:31 +01:00
galaxy fix(galaxy): 5xx error throws DatasourceError (#5663) 2020-03-07 14:16:41 +01:00
git-submodules fix: move datasource error handling into index (#5662) 2020-03-07 12:13:31 +01:00
git-tags fix: move datasource error handling into index (#5662) 2020-03-07 12:13:31 +01:00
github-releases fix: move datasource error handling into index (#5662) 2020-03-07 12:13:31 +01:00
github-tags fix: move datasource error handling into index (#5662) 2020-03-07 12:13:31 +01:00
gitlab-tags fix: move datasource error handling into index (#5662) 2020-03-07 12:13:31 +01:00
go feat: replace datasource constants with IDs (#5595) 2020-03-01 08:01:12 +01:00
gradle-version fix: move datasource error handling into index (#5662) 2020-03-07 12:13:31 +01:00
helm fix: move datasource error handling into index (#5662) 2020-03-07 12:13:31 +01:00
hex feat(hex): Support for releaseTimestamp field (#5677) 2020-03-09 18:53:00 +01:00
maven fix(maven): Use fallback maven registry (#5613) 2020-03-02 09:08:37 +01:00
npm fix(npm): retry ETIMEDOUT 2020-03-11 15:50:49 +01:00
nuget feat: replace datasource constants with IDs (#5595) 2020-03-01 08:01:12 +01:00
orb fix: move datasource error handling into index (#5662) 2020-03-07 12:13:31 +01:00
packagist feat: replace datasource constants with IDs (#5595) 2020-03-01 08:01:12 +01:00
pod fix(datasource): centralize lookupName check (#5661) 2020-03-07 10:19:47 +01:00
pypi fix: pypi get logging 2020-03-12 09:17:12 +01:00
ruby-version feat: replace datasource constants with IDs (#5595) 2020-03-01 08:01:12 +01:00
rubygems logs: rubygems versions fetch time 2020-03-12 09:56:07 +01:00
sbt-package fix(maven): Use fallback maven registry (#5613) 2020-03-02 09:08:37 +01:00
sbt-plugin fix(maven): Use fallback maven registry (#5613) 2020-03-02 09:08:37 +01:00
terraform-module fix: move datasource error handling into index (#5662) 2020-03-07 12:13:31 +01:00
terraform-provider fix: move datasource error handling into index (#5662) 2020-03-07 12:13:31 +01:00
common.ts feat: split sbt datasource (#5586) 2020-02-28 08:49:51 +01:00
index.spec.ts fix: move datasource error handling into index (#5662) 2020-03-07 12:13:31 +01:00
index.ts fix(datasource): return null when error caught 2020-03-12 10:53:02 +01:00
metadata.spec.ts fix: move datasource error handling into index (#5662) 2020-03-07 12:13:31 +01:00
metadata.ts chore: remove unnecessary depName variables in datasources 2020-02-27 22:04:10 +01:00
readme.md feat: rename github/gitlab datasources (#5581) 2020-02-27 21:36:31 +01:00

Datasources

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

getPkgReleases

The minimum exported interface for a datasource is a function called getPkgReleases 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

getPkgReleases 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 getPkgReleases
  • 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.