renovate/lib/modules/datasource
Sebastian Poxhofer 7b677cd50a
feat(datasource): add Deno datasource (#18878)
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2022-12-01 07:56:31 +00:00
..
__snapshots__ test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
adoptium-java docs(adoptium-java datasource): rewrite (#17411) 2022-08-29 13:00:34 +00:00
artifactory test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
aws-machine-image test: reduce aws-machine-image snapshots (#18671) 2022-10-31 12:27:18 +01:00
aws-rds chore(deps): update jest monorepo (#17737) 2022-09-12 16:58:52 +02:00
azure-pipelines-tasks feat(datasource/azure-pipelines-tasks): add azure-pipelines-tasks datasource (#16904) 2022-08-08 21:34:29 -07:00
bitbucket-tags test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
cdnjs refactor(jest): enable clearMocks (#18779) 2022-11-14 22:46:37 -08:00
clojure test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
conan feat(conan): add revisions support (#16871) 2022-08-11 21:07:54 +02:00
conda feat(datasource/conda): support custom registries (#17809) 2022-10-05 15:22:33 +02:00
cpan feat(datasource): add cpan datasource (#16545) 2022-07-26 06:39:51 +00:00
crate refactor: enums to unions (#18747) 2022-11-05 09:12:03 +00:00
dart fix(datasource/metadata): delete homepage url case (#17372) 2022-08-25 17:18:51 +00:00
deno feat(datasource): add Deno datasource (#18878) 2022-12-01 07:56:31 +00:00
docker refactor: convert enums to unions (#18900) 2022-11-20 07:34:23 +00:00
dotnet fix(datasource/dotnet): add sourceurl (#18386) 2022-10-18 06:41:06 +00:00
flutter-version test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
galaxy feat(datasource/ansible-galaxy): use pep440 versioning by default (#18718) 2022-11-03 14:35:22 +00:00
galaxy-collection refactor: Create promises utilities (#17651) 2022-09-06 10:36:51 +00:00
git-refs test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
git-tags test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
github-releases chore(lint): add object shortand rule (#18080) 2022-10-02 21:20:24 +02:00
github-tags refactor(github-tags): Use hash field for GraphQL results (#19073) 2022-11-29 21:28:47 +00:00
gitlab-packages test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
gitlab-releases test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
gitlab-tags test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
go fix(gomod): Revert "fix(gomod): non-0.0.0 digest matching" (#19120) 2022-11-27 09:14:04 +01:00
golang-version feat(golang-version): enable custom registryUrls (#17828) 2022-09-22 13:10:13 +02:00
gradle-version refactor(jest): enable clearMocks (#18779) 2022-11-14 22:46:37 -08:00
helm refactor: use optional chaining (#17510) 2022-08-30 17:30:57 +02:00
hermit refactor: reduce debug metadata (#18737) 2022-11-07 11:29:02 +00:00
hex test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
jenkins-plugins test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
kubernetes-api fix(manager/kubernetes): don't extract unknown kubernetes objects (#18230) 2022-11-01 08:55:52 +00:00
maven refactor: reduce debug metadata (#18466) 2022-10-29 12:11:09 +00:00
node test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
npm refactor(jest): enable clearMocks (#18779) 2022-11-14 22:46:37 -08:00
nuget refactor: Create promises utilities (#17651) 2022-09-06 10:36:51 +00:00
orb refactor(jest): enable clearMocks (#18779) 2022-11-14 22:46:37 -08:00
packagist refactor: Create promises utilities (#17651) 2022-09-06 10:36:51 +00:00
pod refactor: enums to unions (#18747) 2022-11-05 09:12:03 +00:00
puppet-forge fix(ci): Restrict template expressions (#16834) 2022-07-30 16:28:31 +02:00
pypi test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
repology docs: use input-neutral verbs (#19165) 2022-11-30 10:37:00 +01:00
ruby-version test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
rubygems refactor: reduce debug metadata (#18737) 2022-11-07 11:29:02 +00:00
sbt-package fix(datasource/sbt-package): Fallbacks to maven when no sbt directory listing available (#18590) 2022-11-08 16:42:58 +00:00
sbt-plugin test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
terraform-module refactor(jest): enable clearMocks (#18779) 2022-11-14 22:46:37 -08:00
terraform-provider perf(terraform-provider): use package index instead of complete index (#19173) 2022-12-01 06:28:47 +00:00
api.ts feat(datasource): add Deno datasource (#18878) 2022-12-01 07:56:31 +00:00
common.ts refactor: lib/modules (#14488) 2022-03-04 09:04:02 +01:00
datasource.spec.ts refactor(modules/datasource): fix null-check issues (#16153) 2022-06-20 16:24:37 +02:00
datasource.ts feat(sbt-package): Fallback to Maven datasource for GitLab packages (#16817) 2022-08-01 11:05:17 +00:00
index.spec.ts chore(lint): add object shortand rule (#18080) 2022-10-02 21:20:24 +02:00
index.ts chore(deps): update dependency type-fest to v3 (#18429) 2022-10-20 17:34:35 +00:00
metadata-manual.ts fix: switch changelog urls from http to https (#16349) 2022-07-01 04:57:07 +00:00
metadata.spec.ts fix(metadata): massage sourceUrls starting with git@ (#18136) 2022-11-01 08:11:13 +00:00
metadata.ts fix(metadata): massage sourceUrls starting with git@ (#18136) 2022-11-01 08:11:13 +00:00
readme.md docs: replace encounter with find (#14694) 2022-03-16 14:54:45 +01:00
types.ts chore(deps): update dependency type-fest to v3 (#18429) 2022-10-20 17:34:35 +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 adoptium-java 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, ensure 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 (e.g. 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, e.g. tags: { latest: '3.0.0' }. This is only used by the followTags function.

getDigest

Datasources that support the concept of digests (e.g. Docker digests and Git commit hashes) also 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 none is found then a return value of null should be returned.