renovate/lib/datasource
2020-04-01 22:09:37 +02:00
..
__snapshots__ feat: replace datasource constants with IDs (#5595) 2020-03-01 08:01:12 +01:00
cdnjs chore(internal): disallow implicit braces (#5730) 2020-03-17 12:15:22 +01:00
crate fix: revert datasource error handling changes 2020-03-12 12:48:57 +01:00
dart fix: revert datasource error handling changes 2020-03-12 12:48:57 +01:00
docker fix: revert datasource error handling changes 2020-03-12 12:48:57 +01:00
galaxy fix: revert datasource error handling changes 2020-03-12 12:48:57 +01:00
git-refs fix(git-refs): git-refs always returning null (#5848) 2020-04-01 22:09:37 +02:00
git-submodules feat: add git-refs datasource (#5727) 2020-03-27 17:41:29 +01:00
git-tags fix(git-refs): git-refs always returning null (#5848) 2020-04-01 22:09:37 +02:00
github-releases feat(github-releases): Add support for "releaseTimestamp" (#5711) 2020-03-13 14:11:47 +01:00
github-tags fix: revert datasource error handling changes 2020-03-12 12:48:57 +01:00
gitlab-tags feat(gitlab-tags): Add support for "releaseTimestamp" for GitLa… (#5712) 2020-03-18 12:32:17 +01:00
go fix(go): check for res from github datasource before continuing 2020-03-28 10:13:26 +01:00
gradle-version feat(gradle-version): Add "releaseTimestamp" to Gradle versions (#5713) 2020-03-18 06:35:34 +01:00
helm feat(helm): Add "releaseTimestamp" to Helm datasource (#5714) 2020-03-13 14:10:06 +01:00
hex chore(internal): fix coverage (#5717) 2020-03-13 19:50:56 +01:00
maven chore(internal): disallow implicit braces (#5730) 2020-03-17 12:15:22 +01:00
npm feat(npm): Added host rules support (#5164) 2020-03-30 09:04:25 +02:00
nuget feat(NuGet): add support for specificying protocol version in r… (#5746) 2020-03-19 21:58:37 +01:00
orb feat(orb): Add "releaseTimestamp" to orb datasource (#5715) 2020-03-18 06:34:34 +01:00
packagist feat: replace datasource constants with IDs (#5595) 2020-03-01 08:01:12 +01:00
pod chore(internal): disallow implicit braces (#5730) 2020-03-17 12:15:22 +01:00
pypi chore(internal): disallow implicit braces (#5730) 2020-03-17 12:15:22 +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 chore(internal): disallow implicit braces (#5730) 2020-03-17 12:15:22 +01:00
sbt-plugin chore(internal): disallow implicit braces (#5730) 2020-03-17 12:15:22 +01:00
terraform-module fix: revert datasource error handling changes 2020-03-12 12:48:57 +01:00
terraform-provider fix: revert datasource error handling changes 2020-03-12 12:48:57 +01:00
common.ts feat(internal): generate dynamic datasource imports (#5500) 2020-03-24 07:17:59 +01:00
index.spec.ts feat(internal): generate dynamic datasource imports (#5500) 2020-03-24 07:17:59 +01:00
index.ts feat(internal): generate dynamic datasource imports (#5500) 2020-03-24 07:17:59 +01:00
metadata.spec.ts fix: revert datasource error handling changes 2020-03-12 12:48:57 +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.