renovate/lib/datasource
2020-06-19 21:29:34 +02:00
..
__snapshots__ feat(internal): datasource registryStrategy (#6549) 2020-06-19 21:29:34 +02:00
cdnjs chore: reset cdnjs datasource exports and logs 2020-06-19 11:57:45 +02:00
clojure fix: Revert "fix: Revert "feat(internal): datasource defaultRegistryUrls / appendRegistry… (#5686)"" 2020-04-07 16:14:41 +02:00
crate refactor: Import index in datasource tests (#6542) 2020-06-18 19:03:40 +02:00
dart refactor: Import index in datasource tests (#6542) 2020-06-18 19:03:40 +02:00
docker feat(internal): datasource registryStrategy (#6549) 2020-06-19 21:29:34 +02:00
galaxy refactor: Import index in datasource tests (#6542) 2020-06-18 19:03:40 +02:00
git-refs refactor: Import index for datasource tests (part 2) (#6546) 2020-06-18 21:31:40 +02:00
git-submodules refactor: Import index for datasource tests (part 2) (#6546) 2020-06-18 21:31:40 +02:00
git-tags refactor: Import index for datasource tests (part 2) (#6546) 2020-06-18 21:31:40 +02:00
github-releases refactor: Import index for datasource tests (part 2) (#6546) 2020-06-18 21:31:40 +02:00
github-tags refactor: Import index for datasource tests (part 2) (#6546) 2020-06-18 21:31:40 +02:00
gitlab-tags feat(internal): datasource registryStrategy (#6549) 2020-06-19 21:29:34 +02:00
go fix(datasource): return null instead of empty releases 2020-06-19 10:22:52 +02:00
gradle-version feat(internal): datasource registryStrategy (#6549) 2020-06-19 21:29:34 +02:00
helm feat(internal): datasource registryStrategy (#6549) 2020-06-19 21:29:34 +02:00
hex refactor: Import index in datasource tests (#6542) 2020-06-18 19:03:40 +02:00
maven feat(internal): datasource registryStrategy (#6549) 2020-06-19 21:29:34 +02:00
npm refactor: Import index for datasource tests (part 2) (#6546) 2020-06-18 21:31:40 +02:00
nuget feat(internal): datasource registryStrategy (#6549) 2020-06-19 21:29:34 +02:00
orb refactor: Import index for datasource tests (part 2) (#6546) 2020-06-18 21:31:40 +02:00
packagist feat(internal): datasource registryStrategy (#6549) 2020-06-19 21:29:34 +02:00
pod feat(internal): datasource registryStrategy (#6549) 2020-06-19 21:29:34 +02:00
pypi feat(internal): datasource registryStrategy (#6549) 2020-06-19 21:29:34 +02:00
repology refactor: Import index for datasource tests (part 2) (#6546) 2020-06-18 21:31:40 +02:00
ruby-version refactor: Import index in datasource tests (#6542) 2020-06-18 19:03:40 +02:00
rubygems feat(internal): datasource registryStrategy (#6549) 2020-06-19 21:29:34 +02:00
sbt-package feat(internal): datasource registryStrategy (#6549) 2020-06-19 21:29:34 +02:00
sbt-plugin feat(internal): datasource registryStrategy (#6549) 2020-06-19 21:29:34 +02:00
terraform-module feat(internal): datasource registryStrategy (#6549) 2020-06-19 21:29:34 +02:00
terraform-provider feat(internal): datasource registryStrategy (#6549) 2020-06-19 21:29:34 +02:00
cache.ts fix: Revert "fix(cache): distinguish between null and undefined (#6509)" 2020-06-17 10:07:22 +02:00
common.ts feat(internal): datasource registryStrategy (#6549) 2020-06-19 21:29:34 +02:00
index.spec.ts feat(internal): datasource registryStrategy (#6549) 2020-06-19 21:29:34 +02:00
index.ts feat(internal): datasource registryStrategy (#6549) 2020-06-19 21:29:34 +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.