This commit is contained in:
Sergei Zharinov 2025-01-08 10:45:20 -03:00
parent d18ebbf5a6
commit 5e638438c7
2 changed files with 12 additions and 3 deletions

View file

@ -129,6 +129,12 @@ exports[`modules/manager/nuget/extract extractPackageFile() extracts all depende
"depName": "Microsoft.AspNetCore.Hosting",
"depType": "nuget",
},
{
"datasource": "nuget",
"depName": "Autofac.Extensions.DependencyInjection",
"depType": "nuget",
"skipReason": "invalid-version",
},
{
"currentValue": "4.5.0",
"datasource": "nuget",

View file

@ -82,9 +82,8 @@ function extractDepsFromXml(xmlNode: XmlDocument): NugetPackageDependency[] {
let groupName: string | undefined;
currentValue = checkVersion
.exec(currentValue)
?.groups?.currentValue?.trim()
currentValue = currentValue
?.trim()
?.replace(/^\$\((\w+)\)$/, (match, key) => {
const val = vars.get(key);
if (val) {
@ -94,6 +93,10 @@ function extractDepsFromXml(xmlNode: XmlDocument): NugetPackageDependency[] {
return match;
});
currentValue = checkVersion
.exec(currentValue)
?.groups?.currentValue?.trim();
if (currentValue) {
dep.currentValue = currentValue;
} else {