renovate/lib/datasource
2021-03-15 06:11:46 +00:00
..
__snapshots__ feat(datasource): Normalize releaseTimestamp field (#8753) 2021-02-18 15:04:14 +01:00
bitbucket-tags refactor: optimize type usage (#8947) 2021-03-02 21:44:55 +01:00
cdnjs feat(internal): fixedRegistries (#9124) 2021-03-14 20:58:47 +01:00
clojure fix(clojure): set registryStrategy 2020-06-22 22:51:03 +02:00
crate Revert "feat(internal): Massage registryUrls (#9086)" (#9098) 2021-03-12 12:27:47 +01:00
dart feat(internal): fixedRegistries (#9124) 2021-03-14 20:58:47 +01:00
docker fix: registry returned by getRegistryRepository must be a URL (#8951) 2021-03-09 21:04:10 +01:00
galaxy feat(internal): fixedRegistries (#9124) 2021-03-14 20:58:47 +01:00
git-refs feat(internal): fixedRegistries (#9124) 2021-03-14 20:58:47 +01:00
git-tags feat(internal): fixedRegistries (#9124) 2021-03-14 20:58:47 +01:00
github-releases refactor: eslint no-negated-condition (#8973) 2021-03-04 06:21:55 +01:00
github-tags refactor: eslint no-negated-condition (#8973) 2021-03-04 06:21:55 +01:00
gitlab-tags refactor: optimize type usage (#8947) 2021-03-02 21:44:55 +01:00
go feat(internal): fixedRegistries (#9124) 2021-03-14 20:58:47 +01:00
gradle-version refactor: optimize type usage (#8947) 2021-03-02 21:44:55 +01:00
helm refactor: optimize type usage (#8947) 2021-03-02 21:44:55 +01:00
hex feat(internal): fixedRegistries (#9124) 2021-03-14 20:58:47 +01:00
jenkins-plugins refactor: optimize type usage (#8947) 2021-03-02 21:44:55 +01:00
maven fix(maven): don't cache private (#9038) 2021-03-09 21:03:45 +01:00
npm feat(internal): fixedRegistries (#9124) 2021-03-14 20:58:47 +01:00
nuget fix(nuget): strip protocolVersion hash from source (#9060) 2021-03-10 15:32:15 +00:00
orb feat(internal): fixedRegistries (#9124) 2021-03-14 20:58:47 +01:00
packagist refactor: Object.assign -> object spread (#9076) 2021-03-11 08:03:37 +01:00
pod refactor: optimize type usage (#8947) 2021-03-02 21:44:55 +01:00
pypi refactor: optimize type usage (#8947) 2021-03-02 21:44:55 +01:00
repology feat(internal): fixedRegistries (#9124) 2021-03-14 20:58:47 +01:00
ruby-version feat(internal): fixedRegistries (#9124) 2021-03-14 20:58:47 +01:00
rubygems refactor: optimize type usage (#8947) 2021-03-02 21:44:55 +01:00
sbt-package fix(maven): don't cache private (#9038) 2021-03-09 21:03:45 +01:00
sbt-plugin fix(maven): don't cache private (#9038) 2021-03-09 21:03:45 +01:00
terraform-module refactor: optimize type usage (#8947) 2021-03-02 21:44:55 +01:00
terraform-provider refactor: optimize type usage (#8947) 2021-03-02 21:44:55 +01:00
api.ts refactor: remove git-submodules datasource (#9128) 2021-03-15 06:11:46 +00: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): fixedRegistries (#9124) 2021-03-14 20:58:47 +01:00
metadata.spec.ts feat(datasource): Normalize releaseTimestamp field (#8753) 2021-02-18 15:04:14 +01:00
metadata.ts fix: validate datasource URLs (#8970) 2021-03-04 06:40:08 +01:00
readme.md docs: lint 2021-03-09 23:21:38 +01:00
types.ts feat(internal): fixedRegistries (#9124) 2021-03-14 20:58: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.