Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Ignore the ASP.NET Core meta packages #436

Merged
merged 1 commit into from
Sep 24, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions NuKeeper.Inspection/UpdateFinder.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
Expand All @@ -15,6 +16,13 @@ public class UpdateFinder: IUpdateFinder
private readonly IPackageUpdatesLookup _packageUpdatesLookup;
private readonly INuKeeperLogger _logger;

// ASP.NET Core has well know packages that should either be implicitly versioned, or carefully selected based on installed runtime
private static readonly List<string> KnownIgnoredPackages = new List<string>
{
"Microsoft.AspNetCore.App",
"Microsoft.AspNetCore.All"
};

public UpdateFinder(
IRepositoryScanner repositoryScanner,
IPackageUpdatesLookup packageUpdatesLookup,
Expand All @@ -32,6 +40,7 @@ public async Task<IReadOnlyCollection<PackageUpdateSet>> FindPackageUpdateSets(
{
// scan for nuget packages
var packages = _repositoryScanner.FindAllNuGetPackages(workingFolder)
.Where(x => !KnownIgnoredPackages.Contains(x.Id, StringComparer.OrdinalIgnoreCase))
.ToList();

_logger.Log(PackagesFoundLogger.Log(packages));
Expand Down