renovate/lib/datasource
2020-04-07 12:05:27 +02:00
..
__snapshots__ feat: replace datasource constants with IDs (#5595) 2020-03-01 08:01:12 +01:00
cdnjs feat(internal): cached datasource lookups (#5870) 2020-04-04 17:34:43 +02:00
clojure feat(internal): datasource defaultRegistryUrls / appendRegistry… (#5686) 2020-04-07 12:05:27 +02:00
crate refactor(datasource): getPkgReleases -> getReleases (#5867) 2020-04-04 08:53:52 +02:00
dart refactor(datasource): getPkgReleases -> getReleases (#5867) 2020-04-04 08:53:52 +02:00
docker fix(orb): fix http post JSON 2020-04-06 09:15:29 +02:00
galaxy refactor(datasource): getPkgReleases -> getReleases (#5867) 2020-04-04 08:53:52 +02:00
git-refs refactor(datasource): getPkgReleases -> getReleases (#5867) 2020-04-04 08:53:52 +02:00
git-submodules refactor(datasource): getPkgReleases -> getReleases (#5867) 2020-04-04 08:53:52 +02:00
git-tags refactor(datasource): getPkgReleases -> getReleases (#5867) 2020-04-04 08:53:52 +02:00
github-releases refactor(datasource): getPkgReleases -> getReleases (#5867) 2020-04-04 08:53:52 +02:00
github-tags refactor(datasource): getPkgReleases -> getReleases (#5867) 2020-04-04 08:53:52 +02:00
gitlab-tags refactor(datasource): getPkgReleases -> getReleases (#5867) 2020-04-04 08:53:52 +02:00
go refactor(datasource): getPkgReleases -> getReleases (#5867) 2020-04-04 08:53:52 +02:00
gradle-version refactor(datasource): getPkgReleases -> getReleases (#5867) 2020-04-04 08:53:52 +02:00
helm refactor(datasource): getPkgReleases -> getReleases (#5867) 2020-04-04 08:53:52 +02:00
hex refactor(datasource): getPkgReleases -> getReleases (#5867) 2020-04-04 08:53:52 +02:00
maven feat(internal): datasource defaultRegistryUrls / appendRegistry… (#5686) 2020-04-07 12:05:27 +02:00
npm refactor(datasource): getPkgReleases -> getReleases (#5867) 2020-04-04 08:53:52 +02:00
nuget feat(nuget): detect feeds in NuGet.confg (#5757) 2020-04-07 07:27:05 +02:00
orb refactor(datasource): getPkgReleases -> getReleases (#5867) 2020-04-04 08:53:52 +02:00
packagist refactor(datasource): getPkgReleases -> getReleases (#5867) 2020-04-04 08:53:52 +02:00
pod feat(internal): datasource defaultRegistryUrls / appendRegistry… (#5686) 2020-04-07 12:05:27 +02:00
pypi fix(orb): fix http post JSON 2020-04-06 09:15:29 +02:00
ruby-version refactor(datasource): getPkgReleases -> getReleases (#5867) 2020-04-04 08:53:52 +02:00
rubygems feat(internal): datasource defaultRegistryUrls / appendRegistry… (#5686) 2020-04-07 12:05:27 +02:00
sbt-package feat(internal): datasource defaultRegistryUrls / appendRegistry… (#5686) 2020-04-07 12:05:27 +02:00
sbt-plugin feat(internal): datasource defaultRegistryUrls / appendRegistry… (#5686) 2020-04-07 12:05:27 +02:00
terraform-module refactor(datasource): getPkgReleases -> getReleases (#5867) 2020-04-04 08:53:52 +02:00
terraform-provider refactor(datasource): getPkgReleases -> getReleases (#5867) 2020-04-04 08:53:52 +02:00
cache.ts feat(internal): cached datasource lookups (#5870) 2020-04-04 17:34:43 +02:00
common.ts feat(internal): datasource defaultRegistryUrls / appendRegistry… (#5686) 2020-04-07 12:05:27 +02:00
index.spec.ts refactor(datasource): getPkgReleases -> getReleases (#5867) 2020-04-04 08:53:52 +02:00
index.ts feat(internal): datasource defaultRegistryUrls / appendRegistry… (#5686) 2020-04-07 12:05:27 +02:00
metadata.spec.ts fix: revert datasource error handling changes 2020-03-12 12:48:57 +01:00
metadata.ts feat(datasource): gatsby changelog file (#5856) 2020-04-02 14:35:23 +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.