renovate/lib/modules/datasource
RahulGautamSingh 14899d836d
docs: typos and american spellings (#28215)
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
2024-04-04 07:16:15 +00:00
..
__snapshots__ fix(datasource): remove unnecessary PyPI changelog URL overrides (#27725) 2024-03-15 19:46:07 +00:00
artifactory build(deps): update dependency node-html-parser to v6.1.12 (#26465) 2024-01-04 07:43:36 +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 fix(datasource/azure-bicep-resource): accomodate changes to response schema (#27589) 2024-02-27 16:07:37 +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 fix(bitbucket): Use schema for repo result validation (#27855) 2024-03-18 21:50:22 +00:00
cdnjs fix(datasource/cdnjs): update logic to accomodate api changes (#27212) 2024-02-11 10:57:56 +00:00
clojure feat: allow packageScope in template compilation and add packageScope in maven datasource (#27925) 2024-03-15 08:51:23 +00:00
conan chore: fix types for linting (#26695) 2024-01-17 11:30:45 +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.2.2 (#26755) 2024-01-21 08:20:41 +00:00
crate feat(datasource/crate): Extract rust_version constraints (#27731) 2024-03-05 17:10:25 +00:00
custom docs(custom datasource): improve styling (#27747) 2024-03-06 14:15:24 +00:00
dart feat(dart): allow custom registryUrls (#25987) 2023-11-27 15:09:26 +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 chore(deps): update linters to v7.3.0 (#28005) 2024-03-18 20:39:19 +00:00
dotnet-version fix(datasource/dotnet-version): use sdks property to find all sdk version (#26031) 2023-11-29 13:19:33 +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 feat(datasource/galaxy-collection): support ansible automation hub (#25675) 2023-11-27 14:02:54 +00:00
git-refs refactor(cache): Restrict type for package cache namespaces (#27121) 2024-02-08 07:35:41 +00:00
git-tags refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
gitea-releases refactor(cache): Restrict type for package cache namespaces (#27121) 2024-02-08 07:35:41 +00:00
gitea-tags refactor(cache): Restrict type for package cache namespaces (#27121) 2024-02-08 07:35:41 +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 feat(datasource/github-runners): add macos 14 beta (#27292) 2024-02-14 13:49:46 +00:00
github-tags refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
gitlab-packages docs: use relative links (#26044) 2023-11-29 18:10:17 +00:00
gitlab-releases docs: use relative links (#26044) 2023-11-29 18:10:17 +00:00
gitlab-tags docs: use relative links (#26044) 2023-11-29 18:10:17 +00:00
go docs: typos and american spellings (#28215) 2024-04-04 07:16:15 +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 chore: fix types for linting (#26695) 2024-01-17 11:30:45 +00:00
hermit refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
hex fix(datasource/hex): allow null message for retirements (#26706) 2024-01-17 15:09:03 +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 feat(datasource/jenkins-plugins): support constraints filtering (#26155) 2023-12-06 09:52:55 +00:00
kubernetes-api refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
maven refactor(http): Remove unused HTTP etag caching implementation (#28000) 2024-03-18 13:58:31 +00:00
node-version refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
npm fix(datasource/npm): respect abortOnError hostRule for registries (#26196) 2024-03-23 12:47:04 +00:00
nuget refactor(datasource/nuget): move v2/v3 API logic to classes (#28117) 2024-03-27 09:49:05 +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 feat(manager/pip-compile): Add lockedVersion to package file deps (#27242) 2024-02-15 12:07:20 +00:00
repology docs: use relative links (#26044) 2023-11-29 18:10:17 +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(cache): Restrict type for package cache namespaces (#27121) 2024-02-08 07:35:41 +00:00
terraform-provider build(deps): update dependency prettier to v3 (#23627) 2023-11-07 17:12:01 +00:00
unity3d refactor: Adresses review notes for Unity3D datasource (#28190) 2024-03-31 09:46:00 +00:00
api.ts feat(datasource): Add Unity3D (#27971) 2024-03-25 20:45:13 +00:00
common.spec.ts fix(datasource): Check release constraints validity (#27191) 2024-02-12 19:24:58 +00:00
common.ts fix(datasource): Check release constraints validity (#27191) 2024-02-12 19:24:58 +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 fix(datasource/docker): better reuse of lookupName for getDigest (#27724) 2024-03-05 15:02:51 +01:00
metadata-manual.ts fix(datasource): remove unnecessary PyPI changelog URL overrides (#27725) 2024-03-15 19:46:07 +00:00
metadata.spec.ts fix(datasource): remove unnecessary PyPI changelog URL overrides (#27725) 2024-03-15 19:46:07 +00:00
metadata.ts fix(go): handle pseudo version with digest updates (#26746) 2024-01-20 11:06:42 +00:00
readme.md docs: improve datasource readme (#23653) 2023-08-03 18:09:19 +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: allow packageScope in template compilation and add packageScope in maven datasource (#27925) 2024-03-15 08:51:23 +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.