renovate/lib/datasource
2021-02-26 11:11:02 +01:00
..
__snapshots__ feat(datasource): Normalize releaseTimestamp field (#8753) 2021-02-18 15:04:14 +01:00
bitbucket-tags test: add missing httpMock.reset (#8836) 2021-02-24 11:31:59 +01:00
cdnjs refactor: cdnjs use centralized caching 2021-01-31 10:54:38 +01:00
clojure fix(clojure): set registryStrategy 2020-06-22 22:51:03 +02:00
crate test(datasource/crate): Add missing httpMock.setup/reset() calls (#8566) 2021-02-06 12:44:31 +00:00
dart feat(datasource): Normalize releaseTimestamp field (#8753) 2021-02-18 15:04:14 +01:00
docker refactor: dockerRepository 2021-02-18 08:21:22 +01:00
galaxy feat(datasource): Normalize releaseTimestamp field (#8753) 2021-02-18 15:04:14 +01:00
git-refs build(deps): update dependency simple-git to v2 (#6783) 2020-07-21 14:52:24 +02:00
git-submodules chore(eslint): fixing some eslint warnings (#7382) 2020-10-05 18:12:01 +02:00
git-tags build(deps): update dependency simple-git to v2 (#6783) 2020-07-21 14:52:24 +02:00
github-releases feat(datasource): Normalize releaseTimestamp field (#8753) 2021-02-18 15:04:14 +01:00
github-tags test: add missing httpMock.reset (#8836) 2021-02-24 11:31:59 +01:00
gitlab-tags test: add missing httpMock.reset (#8836) 2021-02-24 11:31:59 +01:00
go fix(go): handle null (#8861) 2021-02-25 14:06:31 +00:00
gradle-version feat(datasource): Normalize releaseTimestamp field (#8753) 2021-02-18 15:04:14 +01:00
helm refactor: remove unused ReleaseResult fields (#8737) 2021-02-17 21:29:25 +01:00
hex feat(datasource): Normalize releaseTimestamp field (#8753) 2021-02-18 15:04:14 +01:00
jenkins-plugins feat(datasource): Normalize releaseTimestamp field (#8753) 2021-02-18 15:04:14 +01:00
maven refactor(maven): Use valid timestamps in testing code (#8700) 2021-02-15 17:08:22 +00:00
npm refactor: export NpmResponse interface 2021-02-24 15:15:22 +01:00
nuget feat(datasource): Normalize releaseTimestamp field (#8753) 2021-02-18 15:04:14 +01:00
orb refactor: remove unused ReleaseResult fields (#8737) 2021-02-17 21:29:25 +01:00
packagist feat(datasource): Normalize releaseTimestamp field (#8753) 2021-02-18 15:04:14 +01:00
pod refactor: use ls-lint (#7956) 2020-12-11 13:29:43 +01:00
pypi fix(pypi): ensure trailing slash for simple API endpoints (#8879) 2021-02-26 11:11:02 +01:00
repology refactor: getQueryString (#8834) 2021-02-24 09:58:21 +01:00
ruby-version feat(datasource): Normalize releaseTimestamp field (#8753) 2021-02-18 15:04:14 +01:00
rubygems refactor: remove unused ReleaseResult fields (#8737) 2021-02-17 21:29:25 +01:00
sbt-package refactor: remove unused ReleaseResult fields (#8737) 2021-02-17 21:29:25 +01:00
sbt-plugin refactor: remove unused ReleaseResult fields (#8737) 2021-02-17 21:29:25 +01:00
terraform-module feat(datasource): Normalize releaseTimestamp field (#8753) 2021-02-18 15:04:14 +01:00
terraform-provider feat(datasource): Normalize releaseTimestamp field (#8753) 2021-02-18 15:04:14 +01:00
common.ts chore: reorder ReleaseResult fields 2021-02-18 08:12:42 +01:00
index.spec.ts feat: extractVersion (#7307) 2020-09-17 10:06:06 +02:00
index.ts feat: pypi public package caching (#8477) 2021-01-31 10:46:02 +01:00
metadata.spec.ts feat(datasource): Normalize releaseTimestamp field (#8753) 2021-02-18 15:04:14 +01:00
metadata.ts feat(datasource): Normalize releaseTimestamp field (#8753) 2021-02-18 15:04:14 +01: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.