mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-11 22:46:27 +00:00
refactor: remove appendRegistryUrls
This commit is contained in:
parent
6cf8735204
commit
d0531f52fb
2 changed files with 3 additions and 4 deletions
|
@ -75,7 +75,6 @@ export interface DatasourceApi {
|
|||
getDigest?(config: DigestConfig, newValue?: string): Promise<string | null>;
|
||||
getReleases(config: GetReleasesConfig): Promise<ReleaseResult | null>;
|
||||
defaultRegistryUrls?: string[];
|
||||
appendRegistryUrls?: string[];
|
||||
defaultConfig?: Record<string, unknown>;
|
||||
registryStrategy?: 'first' | 'hunt' | 'merge';
|
||||
}
|
||||
|
|
|
@ -151,13 +151,13 @@ function resolveRegistryUrls(
|
|||
datasource: Datasource,
|
||||
extractedUrls: string[]
|
||||
): string[] {
|
||||
const { defaultRegistryUrls = [], appendRegistryUrls = [] } = datasource;
|
||||
const { defaultRegistryUrls = [] } = datasource;
|
||||
const customUrls = extractedUrls?.filter(Boolean);
|
||||
let registryUrls: string[];
|
||||
if (is.nonEmptyArray(customUrls)) {
|
||||
registryUrls = [...extractedUrls, ...appendRegistryUrls];
|
||||
registryUrls = [...customUrls];
|
||||
} else {
|
||||
registryUrls = [...defaultRegistryUrls, ...appendRegistryUrls];
|
||||
registryUrls = [...defaultRegistryUrls];
|
||||
}
|
||||
return registryUrls.filter(Boolean);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue