renovate/lib/datasource
2021-04-20 15:37:57 +02:00
..
__snapshots__ feat(internal): return registryUrl from datasources (#9177) 2021-03-17 13:34:47 +01:00
bitbucket-tags refactor(http): Use default "accept-encoding" value (#9652) 2021-04-20 15:37:57 +02:00
cdnjs refactor(http): Use default "accept-encoding" value (#9652) 2021-04-20 15:37:57 +02:00
clojure refactor: customRegistrySupport (#9142) 2021-03-15 13:56:23 +01:00
crate refactor(http): Use default "accept-encoding" value (#9652) 2021-04-20 15:37:57 +02:00
dart refactor(http): Use default "accept-encoding" value (#9652) 2021-04-20 15:37:57 +02:00
docker refactor(http): Use default "accept-encoding" value (#9652) 2021-04-20 15:37:57 +02:00
galaxy refactor(http): Use default "accept-encoding" value (#9652) 2021-04-20 15:37:57 +02:00
galaxy-collection refactor(http): Use default "accept-encoding" value (#9652) 2021-04-20 15:37:57 +02:00
git-refs fix(git-refs): insert token if found in host-rules (#9581) 2021-04-16 15:13:30 +02:00
git-tags refactor(datasource): Enforce getName usage (#9524) 2021-04-14 17:28:20 +02:00
github-releases refactor(http): Use default "accept-encoding" value (#9652) 2021-04-20 15:37:57 +02:00
github-tags refactor(http): Use default "accept-encoding" value (#9652) 2021-04-20 15:37:57 +02:00
gitlab-tags refactor(http): Use default "accept-encoding" value (#9652) 2021-04-20 15:37:57 +02:00
go refactor(http): Use default "accept-encoding" value (#9652) 2021-04-20 15:37:57 +02:00
gradle-version refactor(http): Use default "accept-encoding" value (#9652) 2021-04-20 15:37:57 +02:00
helm refactor(http): Use default "accept-encoding" value (#9652) 2021-04-20 15:37:57 +02:00
hex refactor(http): Use default "accept-encoding" value (#9652) 2021-04-20 15:37:57 +02:00
jenkins-plugins refactor: elapsed time utilities 2021-04-17 09:26:28 +02:00
maven refactor(datasource): Enforce getName usage (#9524) 2021-04-14 17:28:20 +02:00
npm refactor(http): Use default "accept-encoding" value (#9652) 2021-04-20 15:37:57 +02:00
nuget refactor(http): Use default "accept-encoding" value (#9652) 2021-04-20 15:37:57 +02:00
orb refactor(http): Use default "accept-encoding" value (#9652) 2021-04-20 15:37:57 +02:00
packagist refactor(http): Use default "accept-encoding" value (#9652) 2021-04-20 15:37:57 +02:00
pod refactor(http): Use default "accept-encoding" value (#9652) 2021-04-20 15:37:57 +02:00
pypi refactor(http): Use default "accept-encoding" value (#9652) 2021-04-20 15:37:57 +02:00
repology refactor(http): Use default "accept-encoding" value (#9652) 2021-04-20 15:37:57 +02:00
ruby-version refactor(http): Use default "accept-encoding" value (#9652) 2021-04-20 15:37:57 +02:00
rubygems refactor(http): Use default "accept-encoding" value (#9652) 2021-04-20 15:37:57 +02:00
sbt-package refactor(datasource): Enforce getName usage (#9524) 2021-04-14 17:28:20 +02:00
sbt-plugin refactor(datasource): Enforce getName usage (#9524) 2021-04-14 17:28:20 +02:00
terraform-module refactor(http): Use default "accept-encoding" value (#9652) 2021-04-20 15:37:57 +02:00
terraform-provider refactor(http): Use default "accept-encoding" value (#9652) 2021-04-20 15:37:57 +02:00
api.ts feat(ansible-galaxy): implement galaxy-collection DS and extend manager for collections (#9387) 2021-04-09 17:02:57 +02:00
common.ts refactor: optimize type usage (#8947) 2021-03-02 21:44:55 +01:00
index.spec.ts feat(internal): fixedRegistries (#9124) 2021-03-14 20:58:47 +01:00
index.ts feat(internal): return registryUrl from datasources (#9177) 2021-03-17 13:34:47 +01:00
metadata.spec.ts refactor(datasource): Enforce getName usage (#9524) 2021-04-14 17:28:20 +02:00
metadata.ts Add sharp to manualChangelogUrls (#9320) 2021-03-30 05:42:34 +02:00
readme.md docs: capitalize proper noun Docker (#9197) 2021-03-18 13:06:56 +00:00
types.ts feat(internal): return registryUrl from datasources (#9177) 2021-03-17 13:34:47 +01: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.