diff --git a/lib/modules/manager/nuget/artifacts.ts b/lib/modules/manager/nuget/artifacts.ts index 139c34a48fb9151b218620c98a2bb87709d9b923..88f4a96e486983b7696398cb6e1e05b9de8b4ea7 100644 --- a/lib/modules/manager/nuget/artifacts.ts +++ b/lib/modules/manager/nuget/artifacts.ts @@ -88,14 +88,14 @@ export async function updateArtifacts({ // https://github.com/NuGet/Home/wiki/Centrally-managing-NuGet-package-versions // https://github.com/microsoft/MSBuildSdks/tree/main/src/CentralPackageVersions - const isCentralManament = + const isCentralManagement = packageFileName === NUGET_CENTRAL_FILE || packageFileName === MSBUILD_CENTRAL_FILE || packageFileName.endsWith(`/${NUGET_CENTRAL_FILE}`) || packageFileName.endsWith(`/${MSBUILD_CENTRAL_FILE}`); if ( - !isCentralManament && + !isCentralManagement && !regEx(/(?:cs|vb|fs)proj$/i).test(packageFileName) ) { // This could be implemented in the future if necessary. @@ -111,7 +111,7 @@ export async function updateArtifacts({ const deps = await getDependentPackageFiles( packageFileName, - isCentralManament, + isCentralManagement, ); const packageFiles = deps.filter((d) => d.isLeaf).map((d) => d.name); diff --git a/lib/modules/manager/nuget/package-tree.ts b/lib/modules/manager/nuget/package-tree.ts index 7dc29959c54f516002cbd13405346bcc6427c5aa..56b3f874ff647021fbcf72b5c233c2ee0bf9dc2a 100644 --- a/lib/modules/manager/nuget/package-tree.ts +++ b/lib/modules/manager/nuget/package-tree.ts @@ -15,12 +15,12 @@ export const MSBUILD_CENTRAL_FILE = 'Packages.props'; */ export async function getDependentPackageFiles( packageFileName: string, - isCentralManament = false, + isCentralManagement = false, ): Promise<ProjectFile[]> { const packageFiles = await getAllPackageFiles(); const graph: ReturnType<typeof Graph> = Graph(); - if (isCentralManament) { + if (isCentralManagement) { graph.addNode(packageFileName); } @@ -33,7 +33,7 @@ export async function getDependentPackageFiles( for (const f of packageFiles) { graph.addNode(f); - if (isCentralManament && upath.dirname(f).startsWith(parentDir)) { + if (isCentralManagement && upath.dirname(f).startsWith(parentDir)) { graph.addEdge(packageFileName, f); } } @@ -70,7 +70,7 @@ export async function getDependentPackageFiles( const deps = new Map<string, boolean>(); recursivelyGetDependentPackageFiles(packageFileName, graph, deps); - if (isCentralManament) { + if (isCentralManagement) { // remove props file, as we don't need it deps.delete(packageFileName); }