mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 06:56:24 +00:00
parent
603f21d9bc
commit
2533fb0751
2 changed files with 7 additions and 4 deletions
|
@ -173,12 +173,15 @@ async function getAllPackages(regUrl) {
|
||||||
|
|
||||||
async function packagistOrgLookup(name) {
|
async function packagistOrgLookup(name) {
|
||||||
const regUrl = 'https://packagist.org';
|
const regUrl = 'https://packagist.org';
|
||||||
const pkgUrl = URL.resolve(regUrl, `/packages/${name}.json`);
|
const pkgUrl = URL.resolve(regUrl, `/p/${name}.json`);
|
||||||
const res = (await got(pkgUrl, {
|
const res = (await got(pkgUrl, {
|
||||||
json: true,
|
json: true,
|
||||||
retry: 5,
|
retry: 5,
|
||||||
})).body.package;
|
})).body.packages[name];
|
||||||
const dep = extractDepReleases(res.versions);
|
if (!res) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
const dep = extractDepReleases(res);
|
||||||
dep.name = name;
|
dep.name = name;
|
||||||
logger.trace({ dep }, 'dep');
|
logger.trace({ dep }, 'dep');
|
||||||
return dep;
|
return dep;
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue