mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 23:16:26 +00:00
a9332a8db0
This deprecates the (internal) use of package URLs and instead replaces with `datasource`/`lookupName`. Closes #3005
19 lines
449 B
JavaScript
19 lines
449 B
JavaScript
const { nonEmptyArray } = require('@sindresorhus/is');
|
|
const { getDependency } = require('./get');
|
|
|
|
async function getPkgReleases({ lookupName, registryUrls }) {
|
|
const registries = nonEmptyArray(registryUrls) ? registryUrls : [];
|
|
|
|
for (const registry of registries) {
|
|
const pkg = await getDependency({ dependency: lookupName, registry });
|
|
if (pkg) {
|
|
return pkg;
|
|
}
|
|
}
|
|
|
|
return null;
|
|
}
|
|
|
|
module.exports = {
|
|
getPkgReleases,
|
|
};
|