0
0
Fork 0
mirror of https://github.com/renovatebot/renovate.git synced 2025-02-28 10:34:06 +00:00
renovatebot_renovate/lib/modules/datasource
2025-02-26 15:45:17 +00:00
..
__snapshots__ test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
artifactory test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
aws-machine-image test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
aws-rds docs(datasource/aws-rds): improve readme (#29870) 2024-12-06 09:41:34 +00:00
azure-bicep-resource fix(datasource/bicep): suppress resourceFunctions (#28379) 2024-04-16 07:41:58 +00:00
azure-pipelines-tasks refactor(azure-pipelines): Simplify Zod result type inference (#33524) 2025-01-11 13:19:29 +00:00
bazel fix(datasource/bazel): make yanked_versions optional (#34107) 2025-02-12 11:41:28 +00:00
bitbucket-tags test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
bitrise feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
buildpacks-registry feat(datasource): Add datasource for buildpack registry (#32721) 2025-01-28 16:31:07 +00:00
cdnjs test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
clojure test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
conan test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
conda test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
cpan feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
crate test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
custom test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
dart test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
dart-version fix(datasource/dart-version): skip old svn revisions (#34059) 2025-02-06 09:00:07 +00:00
deb test: migrate from jest to vitest (#34499) 2025-02-26 14:18:38 +00:00
deno feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
devbox feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
docker test: migrate more to vitest (#34500) 2025-02-26 15:45:17 +00:00
dotnet-version feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
endoflife-date feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
flutter-version test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
galaxy test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
galaxy-collection test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
git-refs test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
git-tags test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
gitea-releases chore(documentation): s/Forjeo/Forgejo/ (#33976) 2025-01-31 18:26:22 +01:00
gitea-tags chore(documentation): s/Forjeo/Forgejo/ (#33976) 2025-01-31 18:26:22 +01:00
github-release-attachments test: migrate more to vitest (#34500) 2025-02-26 15:45:17 +00:00
github-releases test: migrate more to vitest (#34500) 2025-02-26 15:45:17 +00:00
github-runners feat(datasource/github-runners): support ubuntu arm partner images (#33824) 2025-01-24 13:43:22 +00:00
github-tags test: migrate from jest to vitest (#34499) 2025-02-26 14:18:38 +00:00
gitlab-packages test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
gitlab-releases test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
gitlab-tags test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
glasskube-packages refactor(http): Add getYaml and getYamlSafe methods (#33578) 2025-01-13 09:46:21 +00:00
go test: migrate more to vitest (#34500) 2025-02-26 15:45:17 +00:00
golang-version test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
gradle-version test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
hackage feat(datasource/hackage): Detect deprecation status (#33778) 2025-01-23 15:37:40 +00:00
helm test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
hermit refactor(http): Separate getJson and getJsonUnchecked (#33651) 2025-01-17 14:18:00 +00:00
hex test: migrate more to vitest (#34500) 2025-02-26 15:45:17 +00:00
hexpm-bob chore(deps): update eslint monorepo to v9 (major) (#33573) 2025-02-20 11:31:13 +00:00
java-version test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
jenkins-plugins feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
kubernetes-api refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
maven test: migrate from jest to vitest (#34499) 2025-02-26 14:18:38 +00:00
node-version test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
npm test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
nuget test: migrate more to vitest (#34500) 2025-02-26 15:45:17 +00:00
orb test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
packagist test: migrate more to vitest (#34500) 2025-02-26 15:45:17 +00:00
pod chore(deps): update eslint monorepo to v9 (major) (#33573) 2025-02-20 11:31:13 +00:00
puppet-forge feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
pypi test: migrate from jest to vitest (#34499) 2025-02-26 14:18:38 +00:00
python-version test: migrate from jest to vitest (#34499) 2025-02-26 14:18:38 +00:00
repology test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
ruby-version test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
rubygems test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
sbt-package test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
sbt-plugin test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
terraform-module feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
terraform-provider feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
unity3d feat(datasource/unity3d): Use Unity Releases API (#33240) 2025-02-23 15:20:41 +00:00
api.ts feat(datasource): Add datasource for buildpack registry (#32721) 2025-01-28 16:31:07 +00:00
common.spec.ts fix: Handle extractVersion with release post-processing (#32540) 2024-11-16 10:32:33 +00:00
common.ts fix: Handle extractVersion with release post-processing (#32540) 2024-11-16 10:32:33 +00:00
datasource.spec.ts refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
datasource.ts chore(deps): update eslint monorepo to v9 (major) (#33573) 2025-02-20 11:31:13 +00:00
index.spec.ts test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
index.ts refactor(logger): remove templating from WARN log messages (#33488) 2025-01-14 13:03:05 +00:00
metadata-manual.ts test(lib/data): schemas for changelog and source urls (#32151) 2024-10-30 08:19:48 +00:00
metadata.spec.ts feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
metadata.ts fix: Remove normalizeDate function (#33513) 2025-01-13 19:34:50 +00:00
postprocess-release.spec.ts test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
postprocess-release.ts fix: Handle extractVersion with release post-processing (#32540) 2024-11-16 10:32:33 +00:00
readme.md test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
schema.ts fix(datasource/cdnjs): update logic to accomodate api changes (#27212) 2024-02-11 10:57:56 +00:00
types.ts feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
util.ts refactor: refactor Google Auth util (#33486) 2025-01-09 10:35:47 +00:00
utils.spec.ts test: migrate from jest to vitest (#34499) 2025-02-26 14:18:38 +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 Unused HTTP mocks errors in the Vitest 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.