renovate/lib/modules/datasource
2023-11-14 20:31:41 +00:00
..
__snapshots__ test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
artifactory refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
aws-machine-image refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
aws-rds refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
azure-bicep-resource refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
azure-pipelines-tasks refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
bazel fix(bazel): use bazel-module versioning for bazel datasource (#25649) 2023-11-08 15:42:36 +00:00
bitbucket-tags refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
cdnjs refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
clojure refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
conan build(deps): update dependency prettier to v3 (#23627) 2023-11-07 17:12:01 +00:00
conda refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
cpan build(deps): update dependency prettier to v3 (#23627) 2023-11-07 17:12:01 +00:00
crate refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
custom feat(datasource/custom): allow to fetch from YAML data endpoint (#25695) 2023-11-13 11:01:56 +00:00
dart refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
dart-version refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
deno refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
docker refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
dotnet-version refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
endoflife-date refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
flutter-version refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
galaxy fix(datasource/galaxy): loosen schema (#25712) 2023-11-13 03:38:14 +00:00
galaxy-collection fix(galaxy-collection): return sourceUrl of highest_version in getReleases() (#25769) 2023-11-14 20:31:41 +00:00
git-refs refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
git-tags refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
gitea-releases refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
gitea-tags refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
github-release-attachments refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
github-releases refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
github-runners refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
github-tags refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
gitlab-packages refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
gitlab-releases refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
gitlab-tags refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
go build(deps): update dependency prettier to v3 (#23627) 2023-11-07 17:12:01 +00:00
golang-version refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
gradle-version refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
helm refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
hermit refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
hex refactor(hex): Datasource schema validation (#25009) 2023-11-10 07:55:37 +00:00
hexpm-bob refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
java-version refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
jenkins-plugins refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
kubernetes-api refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
maven refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
node-version refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
npm refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
nuget build(deps): update dependency prettier to v3 (#23627) 2023-11-07 17:12:01 +00:00
orb refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
packagist refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
pod refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
puppet-forge refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
pypi refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
repology refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
ruby-version refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
rubygems refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
sbt-package refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
sbt-plugin refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
terraform-module refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
terraform-provider build(deps): update dependency prettier to v3 (#23627) 2023-11-07 17:12:01 +00:00
api.ts refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
common.spec.ts refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
common.ts refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
datasource.spec.ts refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
datasource.ts refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
index.spec.ts refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
index.ts refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
metadata-manual.ts feat: override docker and helm package metadata (#19901) 2023-09-23 07:21:24 +00:00
metadata.spec.ts refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
metadata.ts refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
readme.md docs: improve datasource readme (#23653) 2023-08-03 18:09:19 +00:00
schema.ts refactor(cdnjs): Use zod schema and Result class (#23588) 2023-07-29 17:54:49 +00:00
types.ts feat: versionCompatibility (#24717) 2023-10-02 09:55:01 +00:00
util.ts refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
utils.spec.ts refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +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, make sure 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 (for example 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, for example tags: { latest: '3.0.0' }. This is only used by the followTags function

getDigest

Datasources that support digests (like Docker digests and Git commit hashes) 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 no digest is found, the getDigest function should return null.