renovate/lib/datasource
renovate[bot] 2d2e95c747
chore(deps): update dependency typescript to v4 (#7092)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jamie Magee <jamie.magee@gmail.com>
Co-authored-by: Jamie Magee <JamieMagee@users.noreply.github.com>
2020-09-08 12:26:17 +02:00
..
__snapshots__ feat(internal): datasource registryStrategy (#6549) 2020-06-19 21:29:34 +02:00
cdnjs refactor: remove unnecessary catch code in datasources (#6583) 2020-06-25 14:07:03 +02:00
clojure fix(clojure): set registryStrategy 2020-06-22 22:51:03 +02:00
crate refactor: remove unnecessary catch code in datasources (#6583) 2020-06-25 14:07:03 +02:00
dart feat(dart): Support for releaseTimestamp field (#6926) 2020-08-06 16:47:39 +02:00
docker feat: additionalBranchPrefix 2020-09-01 14:36:10 +02:00
galaxy refactor(datasource): Fix lint warnings (#7115) 2020-08-27 09:07:58 +02:00
git-refs build(deps): update dependency simple-git to v2 (#6783) 2020-07-21 14:52:24 +02:00
git-submodules build(deps): update dependency simple-git to v2 (#6783) 2020-07-21 14:52:24 +02:00
git-tags build(deps): update dependency simple-git to v2 (#6783) 2020-07-21 14:52:24 +02:00
github-releases refactor: remove unnecessary catch code in datasources (#6583) 2020-06-25 14:07:03 +02:00
github-tags chore(eslint): enable typescript 3.7 rules (#6765) 2020-07-18 08:42:32 +02:00
gitlab-tags refactor: remove unnecessary catch code in datasources (#6583) 2020-06-25 14:07:03 +02:00
go chore(deps): update linters (major) (#7185) 2020-09-07 09:54:07 +02:00
gradle-version refactor: remove unnecessary catch code in datasources (#6583) 2020-06-25 14:07:03 +02:00
helm refactor: remove unnecessary catch code in datasources (#6583) 2020-06-25 14:07:03 +02:00
hex chore(eslint): enable typescript 3.7 rules (#6765) 2020-07-18 08:42:32 +02:00
jenkins-plugins chore(deps): update linters (major) (#7185) 2020-09-07 09:54:07 +02:00
maven feat(maven): Support 'releaseTimestamp' for Maven Central (#7061) 2020-08-27 09:23:21 +02:00
npm refactor(datasource): Fix lint warnings (#7115) 2020-08-27 09:07:58 +02:00
nuget fix(nuget): Fix cache key and URL construction (#7169) 2020-09-03 08:37:15 +02:00
orb chore(deps): update linters (major) (#6769) 2020-08-10 16:18:08 +02:00
packagist feat(composer): lazy repository url (#6982) 2020-08-17 19:54:00 +02:00
pod fix(host-rules): Disable datasource warnings for disabled hosts (#6918) 2020-08-05 13:58:50 +02:00
pypi chore(deps): update dependency typescript to v4 (#7092) 2020-09-08 12:26:17 +02:00
repology refactor(datasource): Fix lint warnings (#7115) 2020-08-27 09:07:58 +02:00
ruby-version chore(deps): update dependency typescript to v4 (#7092) 2020-09-08 12:26:17 +02:00
rubygems refactor(datasource): Fix lint warnings (#7115) 2020-08-27 09:07:58 +02:00
sbt-package feat(sbt): extract source URL from POM file (#6756) 2020-07-17 10:14:50 +02:00
sbt-plugin feat(sbt): extract source URL from POM file (#6756) 2020-07-17 10:14:50 +02:00
terraform-module feat(internal): migrate to got v11 (#6725) 2020-07-22 20:15:48 +02:00
terraform-provider feat(terraform): support extended required_providers (#6959) 2020-08-13 09:47:45 +02:00
cache.ts refactor: rename globalCache to packageCache (#6580) 2020-06-25 08:32:55 +02:00
common.ts refactor(datasource): Fix lint warnings (#7115) 2020-08-27 09:07:58 +02:00
index.spec.ts feat(internal): make datasource loading syncronous (#6748) 2020-07-15 13:12:50 +02:00
index.ts refactor(datasource): Fix lint warnings (#7115) 2020-08-27 09:07:58 +02:00
metadata.spec.ts fix(pypi): support more project urls (#6420) 2020-06-03 13:31:41 +02:00
metadata.ts fix(datasource): add manual metadata (#7118) 2020-08-27 11:31: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.