renovate/lib/datasource
2020-10-13 10:56:34 +02:00
..
__snapshots__ feat(internal): datasource registryStrategy (#6549) 2020-06-19 21:29:34 +02:00
cdnjs refactor: remove unnecessary catch code in datasources (#6583) 2020-06-25 14:07:03 +02:00
clojure fix(clojure): set registryStrategy 2020-06-22 22:51:03 +02:00
crate refactor(lint): Fix some unsafe returns for datasources (#7363) 2020-09-25 08:59:05 +02:00
dart feat(dart): Support for releaseTimestamp field (#6926) 2020-08-06 16:47:39 +02:00
docker refactor(lint): Fix some unsafe returns for datasources (#7363) 2020-09-25 08:59:05 +02:00
galaxy logs: fix misnamed logs 2020-09-18 09:15:19 +02:00
git-refs build(deps): update dependency simple-git to v2 (#6783) 2020-07-21 14:52:24 +02:00
git-submodules chore(eslint): fixing some eslint warnings (#7382) 2020-10-05 18:12:01 +02:00
git-tags build(deps): update dependency simple-git to v2 (#6783) 2020-07-21 14:52:24 +02:00
github-releases refactor: remove unnecessary catch code in datasources (#6583) 2020-06-25 14:07:03 +02:00
github-tags refactor(lint): Fix some unsafe returns for datasources (#7363) 2020-09-25 08:59:05 +02:00
gitlab-tags refactor: remove unnecessary catch code in datasources (#6583) 2020-06-25 14:07:03 +02:00
go feat(go): add support for github enterprise in go datasource (#7252) 2020-09-22 17:18:35 +02:00
gradle-version refactor: remove unnecessary catch code in datasources (#6583) 2020-06-25 14:07:03 +02:00
helm refactor(lint): Fix some unsafe returns for datasources (#7363) 2020-09-25 08:59:05 +02:00
hex chore(eslint): enable typescript 3.7 rules (#6765) 2020-07-18 08:42:32 +02:00
jenkins-plugins chore(deps): update linters (major) (#7185) 2020-09-07 09:54:07 +02:00
maven refactor(lint): Fix some unsafe returns for datasources (#7363) 2020-09-25 08:59:05 +02:00
npm refactor(lint): Fix some unsafe returns for datasources (#7363) 2020-09-25 08:59:05 +02:00
nuget fix(nuget): fix error logging (#7460) 2020-10-13 10:56:34 +02:00
orb chore(deps): update linters (major) (#6769) 2020-08-10 16:18:08 +02:00
packagist chore(eslint): fixing some eslint warnings (#7382) 2020-10-05 18:12:01 +02:00
pod fix(host-rules): Disable datasource warnings for disabled hosts (#6918) 2020-08-05 13:58:50 +02:00
pypi refactor: rename compatibility -> constraints (#7308) 2020-09-30 11:02:25 +02:00
repology refactor(datasource): Fix lint warnings (#7115) 2020-08-27 09:07:58 +02:00
ruby-version chore(deps): update dependency typescript to v4 (#7092) 2020-09-08 12:26:17 +02:00
rubygems feat(rubygems): fallback to info when version fails (#7323) 2020-09-22 13:58:37 +02:00
sbt-package feat(sbt): extract source URL from POM file (#6756) 2020-07-17 10:14:50 +02:00
sbt-plugin feat(sbt): extract source URL from POM file (#6756) 2020-07-17 10:14:50 +02:00
terraform-module feat(terraform): add releaseTimestamp to latest release (#7381) 2020-09-30 10:02:02 +02:00
terraform-provider feat(terraform): add releaseTimestamp to latest release (#7381) 2020-09-30 10:02:02 +02:00
cache.ts refactor: rename globalCache to packageCache (#6580) 2020-06-25 08:32:55 +02:00
common.ts refactor: rename compatibility -> constraints (#7308) 2020-09-30 11:02:25 +02:00
index.spec.ts feat: extractVersion (#7307) 2020-09-17 10:06:06 +02:00
index.ts chore(eslint): fixing some eslint warnings (#7382) 2020-10-05 18:12:01 +02:00
metadata.spec.ts fix(pypi): support more project urls (#6420) 2020-06-03 13:31:41 +02:00
metadata.ts fix(docker): add docker/compose source url (#7311) 2020-09-18 08:55:27 +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.