renovate/lib/datasource
2021-10-28 11:37:28 +02:00
..
__snapshots__ refactor(datasource): More explicit snapshot tests (#11199) 2021-08-10 11:24:32 +00:00
adoptium-java fix(datasource/adoptium-java): wrong cache key (#11658) 2021-09-09 14:46:38 +00:00
artifactory fix: modified regex to use RE2 (#12025) 2021-10-19 14:53:34 +02:00
bitbucket-tags refactor: no implicit override (#11395) 2021-08-23 20:50:37 +00:00
cdnjs refactor: no implicit override (#11395) 2021-08-23 20:50:37 +00:00
clojure fix(datasource/maven): look for maven snapshot pom (#11327) 2021-10-10 07:41:51 +00:00
crate fix: stop using fs.rmdirSync (#12292) 2021-10-28 09:30:37 +00:00
dart refactor: no implicit override (#11395) 2021-08-23 20:50:37 +00:00
docker fix: modified regex to use RE2 (#12025) 2021-10-19 14:53:34 +02:00
galaxy refactor: no implicit override (#11395) 2021-08-23 20:50:37 +00:00
galaxy-collection refactor: no implicit override (#11395) 2021-08-23 20:50:37 +00:00
git-refs refactor: convert git datasources to class-based (#10531) 2021-10-26 04:37:26 +00:00
git-tags refactor: convert git datasources to class-based (#10531) 2021-10-26 04:37:26 +00:00
github-releases test: improve test readability with expect-more-jest (#12329) 2021-10-27 07:24:36 +02:00
github-tags fix(core/changelogs): pass though known project info (#11515) 2021-09-01 13:07:55 +02:00
gitlab-packages feat(datasource): add Gitlab Package support (#11672) 2021-09-16 10:47:30 +00:00
gitlab-releases fix(core/changelogs): pass though known project info (#11515) 2021-09-01 13:07:55 +02:00
gitlab-tags fix: modified regex to use RE2 (#12025) 2021-10-19 14:53:34 +02:00
go fix(go): Escape dot for regexes produced for GONOPROXY (#12357) 2021-10-27 15:51:58 +00:00
gradle-version refactor: no implicit override (#11395) 2021-08-23 20:50:37 +00:00
helm feat(helm): create versioning as proxy of npm (#12132) 2021-10-20 12:51:51 +00:00
hex test: use codeql compatible token / passwords (#11297) 2021-09-09 16:17:05 +02:00
jenkins-plugins fix(datasource): trim trailing slash in registry url (#11392) 2021-08-30 18:28:32 +02:00
maven fix: modified regex to use RE2 (#12025) 2021-10-19 14:53:34 +02:00
node feat(datasource): add node datasource (#11651) 2021-09-09 12:54:12 +02:00
npm test: improve test readability with expect-more-jest (#12329) 2021-10-27 07:24:36 +02:00
nuget fix: modified regex to use RE2 (#12025) 2021-10-19 14:53:34 +02:00
orb refactor: no implicit override (#11395) 2021-08-23 20:50:37 +00:00
packagist fix: modified regex to use RE2 (#12025) 2021-10-19 14:53:34 +02:00
pod fix: modified regex to use RE2 (#12025) 2021-10-19 14:53:34 +02:00
pypi fix(pypi): do not compare returned name 2021-10-28 11:37:28 +02:00
repology docs: fix repology sample (#12192) 2021-10-16 09:57:07 +00:00
ruby-version refactor: no implicit override (#11395) 2021-08-23 20:50:37 +00:00
rubygems fix(datasource): trim trailing slash in registry url (#11392) 2021-08-30 18:28:32 +02:00
sbt-package fix: modified regex to use RE2 (#12025) 2021-10-19 14:53:34 +02:00
sbt-plugin fix: modified regex to use RE2 (#12025) 2021-10-19 14:53:34 +02:00
terraform-module fix: modified regex to use RE2 (#12025) 2021-10-19 14:53:34 +02:00
terraform-provider fix: modified regex to use RE2 (#12025) 2021-10-19 14:53:34 +02:00
api.ts refactor: convert git datasources to class-based (#10531) 2021-10-26 04:37:26 +00:00
common.ts refactor: optimize type usage (#8947) 2021-03-02 21:44:55 +01:00
datasource.spec.ts test: Fix test descriptions and enforce it via new linting rule (#11285) 2021-08-18 05:46:56 +00:00
datasource.ts fix: rethrow ExternalHostError error (#10761) 2021-07-09 07:06:50 +00:00
index.spec.ts test: improve test readability with expect-more-jest (#12329) 2021-10-27 07:24:36 +02:00
index.ts fix(datasource): trim trailing slash in registry url (#11392) 2021-08-30 18:28:32 +02:00
metadata.spec.ts test: Fix test descriptions and enforce it via new linting rule (#11285) 2021-08-18 05:46:56 +00:00
metadata.ts fix: modified regex to use RE2 (#12025) 2021-10-19 14:53:34 +02:00
readme.md docs: new datasources must follow class-based programming style (#11070) 2021-08-03 22:09:19 +02:00
types.ts fix(npm): support release.sourceUrl (#11868) 2021-09-24 10:04:59 +02:00

Datasources

Datasources are used in Renovate primarily to fetch released versions of packages.

Follow the class-based programming style

New datasources must follow the class-based programming style. Use the adoptium-java datasource as a reference.

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.