renovate/lib/datasource
2020-11-05 15:10:57 +01: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: lower log for empty galaxy results 2020-10-19 11:05:13 +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 feat(github-releases): Support custom registryUrl (#7657) 2020-11-05 15:10:57 +01: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 tests(go): Use http mocks for downstream datasources (#7656) 2020-11-05 11:49:25 +01:00
gradle-version refactor: remove unnecessary catch code in datasources (#6583) 2020-06-25 14:07:03 +02:00
helm chore(deps): update dependency @types/js-yaml to v3.12.5 (#6614) 2020-10-23 11:57:55 +02:00
hex chore(eslint): enable typescript 3.7 rules (#6765) 2020-07-18 08:42:32 +02:00
jenkins-plugins chore: spelling (#7499) 2020-10-20 08:49:28 +02:00
maven refactor(lint): Fix some unsafe returns for datasources (#7363) 2020-09-25 08:59:05 +02:00
npm fix(npm): fix canBeUnpublished computation (#7637) 2020-11-03 09:07:59 +01:00
nuget feat(nuget): fetch sourceUrl from all v3 registries (#7592) 2020-10-29 09:33:08 +01: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 fix(terraform): wrong internal provider lookup (#7520) 2020-10-22 10:22:04 +02:00
cache.ts refactor: rename globalCache to packageCache (#6580) 2020-06-25 08:32:55 +02:00
common.ts feat(github-releases): use prerelease metadata in filtering (#7567) 2020-10-27 14:02:34 +01: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.