refactor(conan): Use single cache namespace (#31033)

This commit is contained in:
Sergei Zharinov 2024-08-27 00:31:46 -03:00 committed by GitHub
parent 9dbe905e6d
commit 51ca6957e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 4 deletions

View file

@ -74,10 +74,10 @@ export class ConanDatasource extends Datasource {
} }
@cache({ @cache({
namespace: `datasource-${datasource}-revisions`, namespace: `datasource-${datasource}`,
key: ({ registryUrl, packageName }: DigestConfig, newValue?: string) => key: ({ registryUrl, packageName }: DigestConfig, newValue?: string) =>
// TODO: types (#22198) // TODO: types (#22198)
`${registryUrl!}:${packageName}:${newValue!}`, `getDigest:${registryUrl!}:${packageName}:${newValue!}`,
}) })
override async getDigest( override async getDigest(
{ registryUrl, packageName }: DigestConfig, { registryUrl, packageName }: DigestConfig,
@ -106,7 +106,7 @@ export class ConanDatasource extends Datasource {
namespace: `datasource-${datasource}`, namespace: `datasource-${datasource}`,
key: ({ registryUrl, packageName }: GetReleasesConfig) => key: ({ registryUrl, packageName }: GetReleasesConfig) =>
// TODO: types (#22198) // TODO: types (#22198)
`${registryUrl}:${packageName}`, `getReleases:${registryUrl}:${packageName}`,
}) })
async getReleases({ async getReleases({
registryUrl, registryUrl,

View file

@ -36,7 +36,6 @@ export type PackageCacheNamespace =
| 'datasource-bitrise' | 'datasource-bitrise'
| 'datasource-cdnjs-digest' | 'datasource-cdnjs-digest'
| 'datasource-cdnjs' | 'datasource-cdnjs'
| 'datasource-conan-revisions'
| 'datasource-conan' | 'datasource-conan'
| 'datasource-conda' | 'datasource-conda'
| 'datasource-cpan' | 'datasource-cpan'