mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 15:06:27 +00:00
fix(nuget): always coalesce sourceUrl and homepage if homepage available (#30227)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
This commit is contained in:
parent
6ef9445fc9
commit
7dd6325673
3 changed files with 9 additions and 8 deletions
|
@ -1497,6 +1497,7 @@ exports[`modules/datasource/nuget/index getReleases processes real data (v3) nus
|
||||||
"version": "3.12.0",
|
"version": "3.12.0",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
"sourceUrl": "https://nunit.org/",
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
@ -1686,6 +1687,7 @@ exports[`modules/datasource/nuget/index getReleases processes real data (v3) nus
|
||||||
"version": "3.12.0",
|
"version": "3.12.0",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
"sourceUrl": "https://nunit.org/",
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|
|
@ -714,7 +714,7 @@ describe('modules/datasource/nuget/index', () => {
|
||||||
});
|
});
|
||||||
expect(res).not.toBeNull();
|
expect(res).not.toBeNull();
|
||||||
expect(res).toMatchSnapshot();
|
expect(res).toMatchSnapshot();
|
||||||
expect(res?.sourceUrl).toBeUndefined();
|
expect(res?.sourceUrl).toBeDefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('processes real data (v3) nuspec fetch 404 error', async () => {
|
it('processes real data (v3) nuspec fetch 404 error', async () => {
|
||||||
|
@ -732,7 +732,7 @@ describe('modules/datasource/nuget/index', () => {
|
||||||
});
|
});
|
||||||
expect(res).not.toBeNull();
|
expect(res).not.toBeNull();
|
||||||
expect(res).toMatchSnapshot();
|
expect(res).toMatchSnapshot();
|
||||||
expect(res?.sourceUrl).toBeUndefined();
|
expect(res?.sourceUrl).toBeDefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('processes real data (v2)', async () => {
|
it('processes real data (v2)', async () => {
|
||||||
|
|
|
@ -240,13 +240,12 @@ export class NugetV3Api {
|
||||||
{ registryUrl, pkgName, pkgVersion: latestStable },
|
{ registryUrl, pkgName, pkgVersion: latestStable },
|
||||||
`package manifest (.nuspec) not found`,
|
`package manifest (.nuspec) not found`,
|
||||||
);
|
);
|
||||||
return dep;
|
} else {
|
||||||
|
logger.debug(
|
||||||
|
{ err, registryUrl, pkgName, pkgVersion: latestStable },
|
||||||
|
`Cannot obtain sourceUrl`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
logger.debug(
|
|
||||||
{ err, registryUrl, pkgName, pkgVersion: latestStable },
|
|
||||||
`Cannot obtain sourceUrl`,
|
|
||||||
);
|
|
||||||
return dep;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// istanbul ignore else: not easy testable
|
// istanbul ignore else: not easy testable
|
||||||
|
|
Loading…
Reference in a new issue