0
0
Fork 0
mirror of https://github.com/renovatebot/renovate.git synced 2025-01-27 13:20:13 +00:00
renovatebot_renovate/lib/modules/datasource
Dean Lindqvist Todevski 65c0561a07
feat(bazel): set sourceUrl for Bazel modules (#33840)
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
2025-01-27 11:45:56 +00:00
..
__snapshots__ fix(datasource): remove unnecessary PyPI changelog URL overrides (#27725) 2024-03-15 19:46:07 +00:00
artifactory fix(artifactory): Fix timestamp handling (#33645) 2025-01-16 14:00:52 +00:00
aws-machine-image feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +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 feat(bazel): set sourceUrl for Bazel modules (#33840) 2025-01-27 11:45:56 +00:00
bitbucket-tags feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
bitrise feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
cdnjs refactor(cdnjs): Use single cache namespace (#31032) 2024-08-27 18:02:39 +00:00
clojure feat(maven): Use release post-fetch processing (#31261) 2024-09-26 13:20:54 +00:00
conan refactor(http): Separate getJson and getJsonUnchecked (#33651) 2025-01-17 14:18:00 +00:00
conda refactor(http): Separate getJson and getJsonUnchecked (#33651) 2025-01-17 14:18:00 +00:00
cpan feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
crate feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
custom feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
dart feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
dart-version refactor(http): Separate getJson and getJsonUnchecked (#33651) 2025-01-17 14:18:00 +00:00
deb refactor(logger): remove templating from WARN log messages (#33488) 2025-01-14 13:03:05 +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 feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +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 feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
galaxy feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
galaxy-collection feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
git-refs chore: eslint to enforce for typed imports (#30844) 2024-08-19 13:15:27 +00:00
git-tags chore: eslint to enforce for typed imports (#30844) 2024-08-19 13:15:27 +00:00
gitea-releases feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
gitea-tags feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
github-release-attachments feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
github-releases feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
github-runners feat(datasource/github-runners): support ubuntu arm partner images (#33824) 2025-01-24 13:43:22 +00:00
github-tags feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
gitlab-packages feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
gitlab-releases feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
gitlab-tags feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
glasskube-packages refactor(http): Add getYaml and getYamlSafe methods (#33578) 2025-01-13 09:46:21 +00:00
go feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
golang-version feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
gradle-version feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
hackage feat(datasource/hackage): Detect deprecation status (#33778) 2025-01-23 15:37:40 +00:00
helm feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
hermit refactor(http): Separate getJson and getJsonUnchecked (#33651) 2025-01-17 14:18:00 +00:00
hex feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
hexpm-bob feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
java-version refactor(http): Separate getJson and getJsonUnchecked (#33651) 2025-01-17 14:18:00 +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 feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
node-version feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
npm feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
nuget feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
orb feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
packagist feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
pod refactor(http): Separate getJson and getJsonUnchecked (#33651) 2025-01-17 14:18:00 +00:00
puppet-forge feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
pypi feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
python-version feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
repology refactor(http): Separate getJson and getJsonUnchecked (#33651) 2025-01-17 14:18:00 +00:00
ruby-version feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
rubygems feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
sbt-package feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
sbt-plugin refactor(maven): Unified result type for http fetch (#32813) 2024-12-09 18:58:07 +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: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
api.ts feat(datasource): add devbox datasource module (#33418) 2025-01-10 11:52:45 +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 refactor: Restrict postprocessRelease method types (#31626) 2024-09-26 04:56:14 +00:00
index.spec.ts chore(deps): update typescript-eslint monorepo to v8 (major) (#30750) 2024-08-14 10:33:02 +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 feat: Switch to Timestamp type (#33648) 2025-01-22 20:15:25 +00:00
postprocess-release.ts fix: Handle extractVersion with release post-processing (#32540) 2024-11-16 10:32:33 +00:00
readme.md test: Improve errors for missing/unused HTTP mocks (#31678) 2024-09-30 05:26:53 +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 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 Unused HTTP 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.