renovate/lib/modules/datasource
2023-08-07 20:02:57 +00:00
..
__snapshots__ test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
artifactory chore(deps): update linters to v6 (major) (#23325) 2023-08-02 15:07:49 +00:00
aws-machine-image chore: migrate to structuredClone (#20885) 2023-04-27 05:06:22 +00:00
aws-rds chore: migrate to structuredClone (#20885) 2023-04-27 05:06:22 +00:00
azure-bicep-resource refactor(azure-bicep-resource): Refactor schema usage (#21402) 2023-04-11 14:41:41 +00:00
azure-pipelines-tasks feat(datasource/azure-pipeline-tasks): read tasks from cdn (#22864) 2023-06-21 05:42:10 +00:00
bazel feat: add bazel datasource (#21733) 2023-04-25 20:08:26 +00:00
bitbucket-tags refactor(bitbucket): use paginated api for tags (#22336) 2023-05-22 05:54:25 +00:00
cdnjs chore(deps): update linters to v6 (major) (#23325) 2023-08-02 15:07:49 +00:00
clojure refactor(datasource): use packageName and not depName for datasource lookups (#20474) 2023-03-10 09:34:40 +01:00
conan chore(deps): update linters to v6 (major) (#23325) 2023-08-02 15:07:49 +00:00
conda chore(deps): update linters to v6 (major) (#23325) 2023-08-02 15:07:49 +00:00
cpan fix(datasource/cpan): add module.authorized condition for querying releases (#22445) 2023-05-27 03:43:46 +00:00
crate chore(deps): update linters to v6 (major) (#23325) 2023-08-02 15:07:49 +00:00
custom feat: add plain format type for customDatasources (#23563) 2023-08-03 14:20:36 +00:00
dart refactor(datasource): use packageName and not depName for datasource lookups (#20474) 2023-03-10 09:34:40 +01:00
dart-version refactor(datasource): use packageName and not depName for datasource lookups (#20474) 2023-03-10 09:34:40 +01:00
deno chore(deps): update linters to v6 (major) (#23325) 2023-08-02 15:07:49 +00:00
docker feat(datasource/docker): allow override max pages (experimental /self-hosted) (#23700) 2023-08-04 07:46:22 +00:00
dotnet-version refactor(schema): Enhanced "loose" collections (#21541) 2023-04-21 08:25:48 +00:00
endoflife-date test(endoflife): Mock time (#22575) 2023-06-04 15:06:43 +00:00
flutter-version feat(datasource)!: default to the central default versioning (#23020) 2023-07-04 19:21:52 +02:00
galaxy chore(deps): update linters to v6 (major) (#23325) 2023-08-02 15:07:49 +00:00
galaxy-collection chore(deps): update linters to v6 (major) (#23325) 2023-08-02 15:07:49 +00:00
git-refs test(git-refs/git-tags): add types to mocked objects (#23096) 2023-07-03 19:20:06 +00:00
git-tags test(git-refs/git-tags): add types to mocked objects (#23096) 2023-07-03 19:20:06 +00:00
github-release-attachments refactor(util/hash): replace sha256 hasha use cases (#23547) 2023-07-24 20:01:39 +00:00
github-releases feat(datasource/github-releases)!: digest computation use git tag, not file digest (#20178) 2023-03-10 09:34:40 +01:00
github-tags feat(github-tags): enable datasource for registry hunting (#23041) 2023-06-29 15:29:57 +00:00
gitlab-packages chore(deps): update linters to v6 (major) (#23325) 2023-08-02 15:07:49 +00:00
gitlab-releases chore(deps): update linters to v6 (major) (#23325) 2023-08-02 15:07:49 +00:00
gitlab-tags feat(versioning)!: default to semver-coerced instead of semver (#20573) 2023-03-10 09:34:41 +01:00
go chore(deps): update linters to v6 (major) (#23325) 2023-08-02 15:07:49 +00:00
golang-version refactor: exactOptionalPropertyTypes (#20761) 2023-03-19 16:09:46 +00:00
gradle-version chore(deps): update linters to v6 (major) (#23325) 2023-08-02 15:07:49 +00:00
helm fix(datasource/helm): Skip helm charts with no listed versions (#23223) 2023-07-17 18:06:20 +00:00
hermit fix(regex): don’t escape forward slash in fileMatch (#19314) 2023-03-10 09:34:39 +01:00
hex refactor(datasource): use packageName and not depName for datasource lookups (#20474) 2023-03-10 09:34:40 +01:00
hexpm-bob feat(datasource)!: default to the central default versioning (#23020) 2023-07-04 19:21:52 +02:00
java-version refactor(datasource): use packageName and not depName for datasource lookups (#20474) 2023-03-10 09:34:40 +01:00
jenkins-plugins refactor(jenkins-plugins): Remove huge fixtures (#23621) 2023-07-30 17:46:22 +00:00
kubernetes-api feat(datasource/kubernetes-api): add flux types (#23442) 2023-07-19 08:12:15 +00:00
maven chore(deps): update linters to v6 (major) (#23325) 2023-08-02 15:07:49 +00:00
node-version chore(deps): update linters to v6 (major) (#23325) 2023-08-02 15:07:49 +00:00
npm chore(deps): update linters to v6 (major) (#23325) 2023-08-02 15:07:49 +00:00
nuget chore(deps): update linters to v6 (major) (#23325) 2023-08-02 15:07:49 +00:00
orb refactor(datasource): use packageName and not depName for datasource lookups (#20474) 2023-03-10 09:34:40 +01:00
packagist fix(datasource/packagist): Use serializable type for availablePackages (#23117) 2023-07-03 17:54:20 +00:00
pod chore(deps): update linters to v6 (major) (#23325) 2023-08-02 15:07:49 +00:00
puppet-forge chore(deps): update linters to v6 (major) (#23325) 2023-08-02 15:07:49 +00:00
pypi feat(manager/pep621): implement manager (#22082) 2023-05-15 07:51:05 +00:00
repology feat(versioning)!: default to semver-coerced instead of semver (#20573) 2023-03-10 09:34:41 +01:00
ruby-version chore(deps): update linters to v6 (major) (#23325) 2023-08-02 15:07:49 +00:00
rubygems fix(util/result): Types for wrapNullable (#23713) 2023-08-04 15:00:11 +00:00
sbt-package refactor(datasource): use packageName and not depName for datasource lookups (#20474) 2023-03-10 09:34:40 +01:00
sbt-plugin refactor(datasource): use packageName and not depName for datasource lookups (#20474) 2023-03-10 09:34:40 +01:00
terraform-module refactor: Clear distinction between generic and HttpError handlers (#22576) 2023-06-05 03:39:27 +00:00
terraform-provider chore(deps): update linters to v6 (major) (#23325) 2023-08-02 15:07:49 +00:00
api.ts feat(datasource): implement custom datasource (#23147) 2023-07-10 18:22:35 +00:00
common.spec.ts refactor: Reuse datasource filtering (#23716) 2023-08-07 20:02:57 +00:00
common.ts refactor: Reuse datasource filtering (#23716) 2023-08-07 20:02:57 +00:00
datasource.spec.ts test: add new wrapper for partial (#20618) 2023-02-25 06:46:32 +00:00
datasource.ts chore(deps): update linters to v6 (major) (#23325) 2023-08-02 15:07:49 +00:00
index.spec.ts refactor: Extract datasource result filters to separate file (#23587) 2023-07-28 08:09:41 +00:00
index.ts refactor: Reuse datasource filtering (#23716) 2023-08-07 20:02:57 +00:00
metadata-manual.ts fix: Add changelogUrl for gradle-semver-plugin (#20441) 2023-05-16 05:01:16 +00:00
metadata.spec.ts refactor: replace test.each with it.each (#21859) 2023-04-28 04:33:15 +00:00
metadata.ts feat(helm): improve subdirectory support (#19181) 2022-12-09 12:48:20 +01: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(datasource): implement custom datasource (#23147) 2023-07-10 18:22:35 +00:00
util.ts refactor: Extract datasource result filters to separate file (#23587) 2023-07-28 08:09:41 +00:00
utils.spec.ts refactor: Extract datasource result filters to separate file (#23587) 2023-07-28 08:09:41 +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.