renovate/lib/datasource
2020-06-03 13:49:34 +02:00
..
__snapshots__ fix(pypi): support more project urls (#6420) 2020-06-03 13:31:41 +02:00
cdnjs fix(cache): global cache init (#6314) 2020-05-24 10:58:58 +02:00
clojure fix: Revert "fix: Revert "feat(internal): datasource defaultRegistryUrls / appendRegistry… (#5686)"" 2020-04-07 16:14:41 +02:00
crate chore(jest): add eslint jest checks (#5986) 2020-05-18 14:33:44 +02:00
dart chore: import linting (#6105) 2020-05-01 18:03:48 +02:00
docker fix(cache): global cache init (#6314) 2020-05-24 10:58:58 +02:00
galaxy refactor: global cache (#6198) 2020-05-11 10:38:07 +02:00
git-refs fix(cache): global cache init (#6314) 2020-05-24 10:58:58 +02:00
git-submodules fix(cache): global cache init (#6314) 2020-05-24 10:58:58 +02:00
git-tags fix(cache): global cache init (#6314) 2020-05-24 10:58:58 +02:00
github-releases fix(cache): global cache init (#6314) 2020-05-24 10:58:58 +02:00
github-tags fix(cache): global cache init (#6314) 2020-05-24 10:58:58 +02:00
gitlab-tags refactor(gitlab): Use new http wrapper for Gitlab platform (#6275) 2020-05-29 07:52:40 +02:00
go chore(jest): add eslint jest checks (#5986) 2020-05-18 14:33:44 +02:00
gradle-version fix(cache): global cache init (#6314) 2020-05-24 10:58:58 +02:00
helm fix(helm): gracefully handle ETIMEDOUT 2020-06-03 13:49:34 +02:00
hex chore(jest): add eslint jest checks (#5986) 2020-05-18 14:33:44 +02:00
maven fix(cache): global cache init (#6314) 2020-05-24 10:58:58 +02:00
npm fix(cache): global cache init (#6314) 2020-05-24 10:58:58 +02:00
nuget fix(nuget): refactor parallel release fetching (#6331) 2020-05-26 22:30:48 +02:00
orb fix(cache): global cache init (#6314) 2020-05-24 10:58:58 +02:00
packagist fix(cache): global cache init (#6314) 2020-05-24 10:58:58 +02:00
pod fix(cache): global cache init (#6314) 2020-05-24 10:58:58 +02:00
pypi fix(pypi): support more project urls (#6420) 2020-06-03 13:31:41 +02:00
ruby-version fix(cache): global cache init (#6314) 2020-05-24 10:58:58 +02:00
rubygems fix(cache): run cache init (#6312) 2020-05-24 07:13:55 +02:00
sbt-package chore(jest): add eslint jest checks (#5986) 2020-05-18 14:33:44 +02:00
sbt-plugin chore(jest): add eslint jest checks (#5986) 2020-05-18 14:33:44 +02:00
terraform-module fix(cache): global cache init (#6314) 2020-05-24 10:58:58 +02:00
terraform-provider fix(cache): global cache init (#6314) 2020-05-24 10:58:58 +02:00
cache.ts refactor: global cache (#6198) 2020-05-11 10:38:07 +02:00
common.ts chore: fix types (#5904) 2020-05-07 10:23:45 +02:00
index.spec.ts chore: import linting (#6105) 2020-05-01 18:03:48 +02:00
index.ts fix(cache): run cache init (#6312) 2020-05-24 07:13:55 +02:00
metadata.spec.ts fix(pypi): support more project urls (#6420) 2020-06-03 13:31:41 +02:00
metadata.ts fix(pypi): support more project urls (#6420) 2020-06-03 13:31:41 +02:00
readme.md refactor(datasource): getPkgReleases -> getReleases (#5867) 2020-04-04 08:53:52 +02:00

Datasources

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

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.