renovate/lib/datasource
2020-06-17 10:07:22 +02:00
..
__snapshots__ fix(pypi): support more project urls (#6420) 2020-06-03 13:31:41 +02:00
cdnjs test: Use nock for tests (Part 1) (#6510) 2020-06-14 06:50:18 +02:00
clojure fix: Revert "fix: Revert "feat(internal): datasource defaultRegistryUrls / appendRegistry… (#5686)"" 2020-04-07 16:14:41 +02:00
crate fix: Revert "fix(cache): distinguish between null and undefined (#6509)" 2020-06-17 10:07:22 +02:00
dart test: Use nock for tests (Part 2) (#6519) 2020-06-16 07:11:21 +02:00
docker fix: Revert "fix(cache): distinguish between null and undefined (#6509)" 2020-06-17 10:07:22 +02:00
galaxy fix: Revert "fix(cache): distinguish between null and undefined (#6509)" 2020-06-17 10:07:22 +02:00
git-refs fix: Revert "fix(cache): distinguish between null and undefined (#6509)" 2020-06-17 10:07:22 +02:00
git-submodules fix: Revert "fix(cache): distinguish between null and undefined (#6509)" 2020-06-17 10:07:22 +02:00
git-tags fix(cache): global cache init (#6314) 2020-05-24 10:58:58 +02:00
github-releases fix: Revert "fix(cache): distinguish between null and undefined (#6509)" 2020-06-17 10:07:22 +02:00
github-tags fix: Revert "fix(cache): distinguish between null and undefined (#6509)" 2020-06-17 10:07:22 +02:00
gitlab-tags fix: Revert "fix(cache): distinguish between null and undefined (#6509)" 2020-06-17 10:07:22 +02:00
go test: Use nock for tests (Part 1) (#6510) 2020-06-14 06:50:18 +02:00
gradle-version test: Use nock for tests (Part 1) (#6510) 2020-06-14 06:50:18 +02:00
helm fix: Revert "fix(cache): distinguish between null and undefined (#6509)" 2020-06-17 10:07:22 +02:00
hex test: Use nock for tests (Part 2) (#6519) 2020-06-16 07:11:21 +02:00
maven fix: Revert "fix(cache): distinguish between null and undefined (#6509)" 2020-06-17 10:07:22 +02:00
npm fix: Revert "fix(cache): distinguish between null and undefined (#6509)" 2020-06-17 10:07:22 +02:00
nuget fix: Revert "fix(cache): distinguish between null and undefined (#6509)" 2020-06-17 10:07:22 +02:00
orb fix: Revert "fix(cache): distinguish between null and undefined (#6509)" 2020-06-17 10:07:22 +02:00
packagist fix: Revert "fix(cache): distinguish between null and undefined (#6509)" 2020-06-17 10:07:22 +02:00
pod fix: Revert "fix(cache): distinguish between null and undefined (#6509)" 2020-06-17 10:07:22 +02:00
pypi test: Use nock for tests (Part 1) (#6510) 2020-06-14 06:50:18 +02:00
repology fix: Revert "fix(cache): distinguish between null and undefined (#6509)" 2020-06-17 10:07:22 +02:00
ruby-version fix: Revert "fix(cache): distinguish between null and undefined (#6509)" 2020-06-17 10:07:22 +02:00
rubygems test: Use nock for tests (Part 2) (#6519) 2020-06-16 07:11:21 +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: Revert "fix(cache): distinguish between null and undefined (#6509)" 2020-06-17 10:07:22 +02:00
terraform-provider fix: Revert "fix(cache): distinguish between null and undefined (#6509)" 2020-06-17 10:07:22 +02:00
cache.ts fix: Revert "fix(cache): distinguish between null and undefined (#6509)" 2020-06-17 10:07:22 +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): add mypy source url (#6442) 2020-06-05 13:19:55 +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.