Skip to content

Commit

Permalink
chore: fix nuget typo (#27976)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcmognol committed Mar 17, 2024
1 parent ab27756 commit 5b8fb1f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions lib/modules/manager/nuget/artifacts.ts
Expand Up @@ -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.
Expand All @@ -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);

Expand Down
8 changes: 4 additions & 4 deletions lib/modules/manager/nuget/package-tree.ts
Expand Up @@ -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);
}

Expand All @@ -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);
}
}
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 5b8fb1f

Please sign in to comment.