renovate/lib/datasource
2022-01-17 08:38:14 +00:00
..
__snapshots__ fix(datasource): better massage github sourceUrl (#12737) 2021-11-18 14:50:53 +00:00
adoptium-java refactor(util/range): Extract range generator util (#13532) 2022-01-13 08:20:37 +01:00
artifactory refactor(datasource/artifactory): Enable strict null checks (#13446) 2022-01-10 15:56:50 +00:00
aws-machine-image fix(aws-machine-image): lazily load ec2client (#13437) 2022-01-09 18:57:26 +01:00
bitbucket-tags test: fix lint (#12551) 2021-11-08 13:16:58 +01:00
cdnjs chore: eslint consistent-return 2021-11-09 07:37:22 +01:00
clojure test(maven): Cover the case of void "last-modified" jar header (#12641) 2021-11-14 08:09:54 +00:00
crate refactor: update imports for esm (#13230) 2021-12-22 08:37:47 +00:00
dart refactor: no implicit override (#11395) 2021-08-23 20:50:37 +00:00
docker build(deps): update dependency parse-link-header to v2 [security] (#13412) 2022-01-13 06:45:50 +01:00
galaxy refactor: no implicit override (#11395) 2021-08-23 20:50:37 +00:00
galaxy-collection fix: enable eslint eqeqeq (#12574) 2021-11-09 07:02:59 +00:00
git-refs fix: don't semver filter git-refs and git-tags (#13043) 2021-12-10 09:12:21 +00:00
git-tags fix: don't semver filter git-refs and git-tags (#13043) 2021-12-10 09:12:21 +00:00
github-releases refactor: refactor static regex out of for loops (#13065) 2021-12-29 07:26:13 +01:00
github-tags refactor(github): Extract getSourceUrl function (#12510) 2021-11-05 10:35:06 +00: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 feat(gitlab): support getDigest for gitlab repositories (#13361) 2022-01-04 19:14:22 +00:00
go refactor(datasource/go): Restrict parameters for "getDigest" (#13584) 2022-01-17 08:38:14 +00:00
gradle-version refactor: no implicit override (#11395) 2021-08-23 20:50:37 +00:00
helm refactor: More strict null checks (#13387) 2022-01-06 08:53:01 +00:00
hex test: use codeql compatible token / passwords (#11297) 2021-09-09 16:17:05 +02:00
jenkins-plugins refactor(jenkins-plugins): convert to class-based datasource (#12702) 2021-11-18 19:55:21 +00:00
maven refactor: strong type http headers (#13520) 2022-01-12 22:08:09 +01:00
node feat(datasource): add node datasource (#11651) 2021-09-09 12:54:12 +02:00
npm refactor: update imports for esm (#13230) 2021-12-22 08:37:47 +00:00
nuget refactor: more esm imports (#13233) 2021-12-22 11:28:20 +00:00
orb test: fix lint (#12551) 2021-11-08 13:16:58 +01:00
packagist feat(composer): support providers without a hash (#13000) 2021-12-08 09:21:41 +01:00
pod refactor: refactor static regex out of for loops (#13065) 2021-12-29 07:26:13 +01:00
pypi refactor: refactor static regex out of for loops (#13065) 2021-12-29 07:26:13 +01:00
repology fix: Update repology multi package project filtering (#13368) 2022-01-05 08:49:11 +01:00
ruby-version chore: report and fix unused ESLint disable directives (#12548) 2021-11-08 20:20:03 +01:00
rubygems refactor(rubygems): convert to class-based (#11229) 2021-11-10 07:35:05 +01:00
sbt-package refactor: refactor static regex out of for loops (#13065) 2021-12-29 07:26:13 +01:00
sbt-plugin refactor: refactor static regex out of for loops (#13065) 2021-12-29 07:26:13 +01:00
terraform-module fix(terraform): externalhosterror for 503 (#12760) 2021-12-08 15:12:55 +01:00
terraform-provider fix: modified regex to use RE2 (#12025) 2021-10-19 14:53:34 +02:00
api.ts feat: aws-machine-image datasource (#11869) 2021-11-19 09:59:06 +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 chore: report and fix unused ESLint disable directives (#12548) 2021-11-08 20:20:03 +01:00
index.spec.ts feat: replace deprecated dependencies with their replacements (#5558) 2021-11-12 08:10:52 +00:00
index.ts logs: trace cached datasource response 2021-11-19 14:22:35 +01:00
metadata.spec.ts refactor: Strict null checks (#13342) 2022-01-03 18:43:07 +01:00
metadata.ts feat(datasource/pypi): override mkdocs-material source url (#13376) 2022-01-06 13:52:49 +01:00
readme.md docs: new datasources must follow class-based programming style (#11070) 2021-08-03 22:09:19 +02:00
types.ts docs: release as asset (#11429) 2021-12-09 21:12:49 +01: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.