mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 06:56:24 +00:00
feat: improve compatibility with nexus private npm repo (#1965)
as nexus hosted npm repository does not automatically 'extracts' any value from the published versions we have to manually pick the repository and namepage fields from the latest version if not already defined in the reponse root
This commit is contained in:
parent
57552d5d2b
commit
4b5efca7a7
1 changed files with 7 additions and 2 deletions
|
@ -141,8 +141,14 @@ async function getDependency(name, retries = 5) {
|
|||
await delay(5000 / retries);
|
||||
return getDependency(name, 0);
|
||||
}
|
||||
|
||||
const latestVersion = res.versions[res['dist-tags'].latest];
|
||||
res.repository = res.repository || latestVersion.repository;
|
||||
res.homepage = res.homepage || latestVersion.homepage;
|
||||
|
||||
// Determine repository URL
|
||||
let repositoryUrl;
|
||||
|
||||
if (res.repository) {
|
||||
repositoryUrl = parse(res.repository.url);
|
||||
}
|
||||
|
@ -156,8 +162,7 @@ async function getDependency(name, retries = 5) {
|
|||
repositoryUrl,
|
||||
versions: res.versions,
|
||||
'dist-tags': res['dist-tags'],
|
||||
'renovate-config':
|
||||
res.versions[res['dist-tags'].latest]['renovate-config'],
|
||||
'renovate-config': latestVersion['renovate-config'],
|
||||
};
|
||||
Object.keys(dep.versions).forEach(version => {
|
||||
// We don't use any of the version payload currently
|
||||
|
|
Loading…
Reference in a new issue