renovate/lib/modules/datasource
2023-02-22 17:01:03 +00:00
..
__snapshots__ test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
artifactory chore(deps): update jest monorepo to v29.4.1 (#20130) 2023-02-14 16:00:49 +00:00
aws-machine-image build(deps): update aws-sdk-js-v3 monorepo to v3.226.0 (#19444) 2022-12-17 07:05:16 +01:00
aws-rds chore(deps): update jest monorepo (#17737) 2022-09-12 16:58:52 +02:00
azure-pipelines-tasks docs: Update the docs to reflect new Azure DevOps Marketplace functionality (#19738) 2023-01-10 04:35:58 +00:00
bitbucket-tags feat(platform/bitbucket): consolidate types (#20570) 2023-02-22 17:01:03 +00:00
cdnjs refactor(jest): enable clearMocks (#18779) 2022-11-14 22:46:37 -08:00
clojure chore(deps): update jest monorepo to v29.4.1 (#20130) 2023-02-14 16:00:49 +00:00
conan feat(conan): add revisions support (#16871) 2022-08-11 21:07:54 +02:00
conda feat(datasource/conda): support custom registries (#17809) 2022-10-05 15:22:33 +02:00
cpan feat(datasource): add cpan datasource (#16545) 2022-07-26 06:39:51 +00:00
crate refactor: enums to unions (#18747) 2022-11-05 09:12:03 +00:00
dart fix(datasource/metadata): delete homepage url case (#17372) 2022-08-25 17:18:51 +00:00
dart-version feat: add dart version datasource (#19277) 2022-12-20 20:29:37 +01:00
deno feat(datasource): add Deno datasource (#18878) 2022-12-01 07:56:31 +00:00
docker chore(deps): update jest monorepo to v29.4.1 (#20130) 2023-02-14 16:00:49 +00:00
dotnet-version feat(datasource): rename dotnet to dotnet-version (#20244) 2023-02-10 22:47:07 +02:00
flutter-version test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
galaxy feat(datasource/ansible-galaxy): use pep440 versioning by default (#18718) 2022-11-03 14:35:22 +00:00
galaxy-collection feat(datasource/galaxy-collection): use pep440 versioning by default (#19489) 2022-12-21 09:21:01 +00:00
git-refs docs: add readme and regex example for git-refs datasource (#19368) 2022-12-15 07:48:43 +01:00
git-tags test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
github-releases feat(github-releases): Cache functions used for getDigest (#20458) 2023-02-17 06:32:39 +00:00
github-tags chore: debug github-tags digest problems (#20506) 2023-02-19 13:13:26 +00:00
gitlab-packages docs: improve documentation for GitLab datasources (#19393) 2022-12-15 07:39:08 +01:00
gitlab-releases docs: improve documentation for GitLab datasources (#19393) 2022-12-15 07:39:08 +01:00
gitlab-tags docs: improve documentation for GitLab datasources (#19393) 2022-12-15 07:39:08 +01:00
go chore(deps): update jest monorepo to v29.4.1 (#20130) 2023-02-14 16:00:49 +00:00
golang-version feat(golang-version): enable custom registryUrls (#17828) 2022-09-22 13:10:13 +02:00
gradle-version refactor(jest): enable clearMocks (#18779) 2022-11-14 22:46:37 -08:00
helm feat(helm): improve subdirectory support (#19181) 2022-12-09 12:48:20 +01:00
hermit refactor: reduce debug metadata (#18737) 2022-11-07 11:29:02 +00:00
hex test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
hexpm-bob feat(datasource/hexpm-bob): Support hex.pm "Bob the builder" datasource (#18925) 2022-12-01 16:49:27 +00:00
java-version fix(datasource): rename adoptium-java to java-version (#20245) 2023-02-13 07:54:20 +00:00
jenkins-plugins test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
kubernetes-api fix(manager/kubernetes): don't extract unknown kubernetes objects (#18230) 2022-11-01 08:55:52 +00:00
maven build(deps): update aws-sdk-js-v3 monorepo to v3.226.0 (#19444) 2022-12-17 07:05:16 +01:00
node test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
npm chore: debug log cache revalidation 2023-01-14 20:12:00 +01:00
nuget refactor: Create promises utilities (#17651) 2022-09-06 10:36:51 +00:00
orb fix(orb): detect isPrivate (#20193) 2023-02-03 21:34:22 +01:00
packagist feat(schema): Add looseValue and looseObject helpers (#20576) 2023-02-22 14:45:26 +00:00
pod refactor: enums to unions (#18747) 2022-11-05 09:12:03 +00:00
puppet-forge fix(ci): Restrict template expressions (#16834) 2022-07-30 16:28:31 +02:00
pypi test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
repology feat(versioning/deb): New module to compare deb package versions like dpkg (#20291) 2023-02-15 06:46:49 +00:00
ruby-version test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
rubygems fix(rubygems): support Nexus (#19957) 2023-01-21 10:02:52 +01:00
sbt-package fix(datasource/sbt-package): Fallbacks to maven when no sbt directory listing available (#18590) 2022-11-08 16:42:58 +00:00
sbt-plugin fix(sbt-plugin): switch defaultRegistryUrl to repo.scala-sbt.org/scalasbt/sbt-plugin-releases (#19400) 2022-12-14 19:00:40 +00:00
terraform-module refactor(jest): enable clearMocks (#18779) 2022-11-14 22:46:37 -08:00
terraform-provider perf(terraform-provider): use package index instead of complete index (#19173) 2022-12-01 06:28:47 +00:00
api.ts fix(datasource): rename adoptium-java to java-version (#20245) 2023-02-13 07:54:20 +00:00
common.ts refactor: lib/modules (#14488) 2022-03-04 09:04:02 +01:00
datasource.spec.ts refactor(modules/datasource): fix null-check issues (#16153) 2022-06-20 16:24:37 +02:00
datasource.ts feat(sbt-package): Fallback to Maven datasource for GitLab packages (#16817) 2022-08-01 11:05:17 +00:00
index.spec.ts chore(deps): update jest monorepo to v29.4.1 (#20130) 2023-02-14 16:00:49 +00:00
index.ts feat(repo/lookup): log registry urls used at the lookup phase (#19332) 2022-12-12 10:23:03 +02:00
metadata-manual.ts fix: switch changelog urls from http to https (#16349) 2022-07-01 04:57:07 +00:00
metadata.spec.ts feat(helm): improve subdirectory support (#19181) 2022-12-09 12:48:20 +01:00
metadata.ts feat(helm): improve subdirectory support (#19181) 2022-12-09 12:48:20 +01:00
readme.md fix(datasource): rename adoptium-java to java-version (#20245) 2023-02-13 07:54:20 +00:00
types.ts chore(deps): update dependency type-fest to v3 (#18429) 2022-10-20 17:34:35 +00: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 java-version datasource as a reference.

Add the datasource to the API in api.ts so that the new datasource is usable. If you find Pending mocks! errors in the Jest tests and your mocked URLs are correct, ensure the datasource is correctly registered.

getReleases

The minimum exported interface for a datasource is a function called getReleases that takes a lookup config as input.

The config has:

  • packageName: 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 having:

  • 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, has the 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.