Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ReleasePre][2022.11.22] FI of dev into main #9317

Merged
merged 7 commits into from
Nov 28, 2022
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions src/Bootstrap/dist/css/bootstrap.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/Bootstrap/less/list-group.less
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,8 @@ button.list-group-item {
margin-bottom: 0;
line-height: 1.3;
}

ul.list-packages {
list-style-type: none;
padding-left: 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NuGet.Build.Tasks.Pack">
<Version>6.0.0</Version>
<Version>6.4.0</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
14 changes: 5 additions & 9 deletions src/NuGet.Services.Entities/NuGet.Services.Entities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="EntityFramework">
<Version>6.4.0-preview3-19553-01</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>13.0.1</Version>
</PackageReference>
<PackageReference Include="NuGet.Frameworks">
<Version>6.0.0</Version>
</PackageReference>
<PackageReference Include="EntityFramework" Version="6.4.0-preview3-19553-01" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="NuGet.Frameworks" Version="6.4.0" />
<!-- This was lifted to a top-level dependency to resolve a Component Governance alert. -->
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
</ItemGroup>

<ItemGroup>
Expand Down
11 changes: 10 additions & 1 deletion src/NuGetGallery.Core/Frameworks/SupportedFrameworks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ public static class SupportedFrameworks
public static readonly NuGetFramework Net60Tizen = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "tizen", EmptyVersion);
public static readonly NuGetFramework Net60TvOs = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "tvos", EmptyVersion);
public static readonly NuGetFramework Net60Windows = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "windows", EmptyVersion);
public static readonly NuGetFramework Net70Android = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version7, "android", EmptyVersion);
public static readonly NuGetFramework Net70Ios = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version7, "ios", EmptyVersion);
public static readonly NuGetFramework Net70MacOs = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version7, "macos", EmptyVersion);
public static readonly NuGetFramework Net70MacCatalyst = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version7, "maccatalyst", EmptyVersion);
public static readonly NuGetFramework Net70Tizen = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version7, "tizen", EmptyVersion);
public static readonly NuGetFramework Net70TvOs = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version7, "tvos", EmptyVersion);
public static readonly NuGetFramework Net70Windows = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version7, "windows", EmptyVersion);
public static readonly NuGetFramework NetCore = new NuGetFramework(FrameworkIdentifiers.NetCore, EmptyVersion);
public static readonly NuGetFramework NetMf = new NuGetFramework(FrameworkIdentifiers.NetMicro, EmptyVersion);
public static readonly NuGetFramework UAP = new NuGetFramework(FrameworkIdentifiers.UAP, EmptyVersion);
Expand All @@ -51,7 +58,9 @@ static SupportedFrameworks()
MonoAndroid, MonoMac, MonoTouch,
Native,
Net11, Net2, Net35, Net4, Net403, Net45, Net451, Net452, Net46, Net461, Net462, Net463, Net47, Net471, Net472, Net48,
Net50, Net50Windows, Net60, Net60Android, Net60Ios, Net60MacCatalyst, Net60MacOs, Net60TvOs, Net60Windows,
Net50, Net50Windows,
Net60, Net60Android, Net60Ios, Net60MacCatalyst, Net60MacOs, Net60TvOs, Net60Windows,
Net70, Net70Android, Net70Ios, Net70MacCatalyst, Net70MacOs, Net70TvOs, Net70Windows,
NetCore, NetCore45, NetCore451,
NetCoreApp10, NetCoreApp11, NetCoreApp20, NetCoreApp21, NetCoreApp22, NetCoreApp30, NetCoreApp31,
NetMf,
Expand Down
2 changes: 1 addition & 1 deletion src/NuGetGallery.Core/NuGetGallery.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<Version>5.2.6</Version>
</PackageReference>
<PackageReference Include="NuGet.Packaging">
<Version>6.0.0</Version>
<Version>6.4.0</Version>
</PackageReference>
<PackageReference Include="NuGet.Services.FeatureFlags">
<Version>2.106.0</Version>
Expand Down
27 changes: 19 additions & 8 deletions src/NuGetGallery.Core/Services/AssetFrameworkHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ public static IEnumerable<NuGetFramework> GetAssetFrameworks(string packageId, I
var conventions = new ManagedCodeConventions(runtimeGraph);

// Let's test for tools packages first--they're a special case
var groups = Enumerable.Empty<ContentItemGroup>();
var groups = new List<ContentItemGroup>();
if (packageTypes.Count == 1 && (packageTypes[0] == PackageType.DotnetTool ||
packageTypes[0] == PackageType.DotnetCliTool))
{
// Only a package that is a tool package (and nothing else) will be matched against tools pattern set
groups = items.FindItemGroups(conventions.Patterns.ToolsAssemblies);
items.PopulateItemGroups(conventions.Patterns.ToolsAssemblies, groups);
}
else
{
Expand All @@ -67,14 +67,25 @@ public static IEnumerable<NuGetFramework> GetAssetFrameworks(string packageId, I
};

// We'll create a set of "groups" --these are content items which satisfy file pattern sets
var standardGroups = patterns
.SelectMany(p => items.FindItemGroups(p));
foreach (var pattern in patterns)
{
items.PopulateItemGroups(pattern, groups);
}

// Filter out MSBuild assets that don't match the package ID and append to groups we already have
var msbuildGroups = msbuildPatterns
.SelectMany(p => items.FindItemGroups(p))
.Where(g => HasBuildItemsForPackageId(g.Items, packageId));
groups = standardGroups.Concat(msbuildGroups);
var msbuildGroups = new List<ContentItemGroup>();
foreach (var pattern in msbuildPatterns)
{
items.PopulateItemGroups(pattern, msbuildGroups);
}

foreach (var group in msbuildGroups)
{
if (HasBuildItemsForPackageId(group.Items, packageId))
{
groups.Add(group);
}
}
}

// Now that we have a collection of groups which have made it through the pattern set filter, let's transform them into TFMs
Expand Down
2 changes: 1 addition & 1 deletion src/NuGetGallery.Services/NuGetGallery.Services.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<Version>4.2.2</Version>
</PackageReference>
<PackageReference Include="NuGet.Protocol">
<Version>6.0.0</Version>
<Version>6.4.0</Version>
</PackageReference>
<PackageReference Include="NuGet.Services.Configuration">
<Version>2.106.0</Version>
Expand Down
5 changes: 3 additions & 2 deletions src/NuGetGallery/App_Code/ViewHelpers.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -588,10 +588,10 @@ var hlp = new AccordionHelper(name, formModelStatePrefix, expanded, page);

@helper Breadcrumb(bool showDivider, params Func<MvcHtmlString, HelperResult>[] segments)
{
<h1 role="list" class="ms-font-xl breadcrumb-title">
<h1 class="ms-font-xl breadcrumb-title">
@for (int i = 0; i < segments.Length; i++)
{
<span role="listitem" class="ms-noWrap">@segments[i](MvcHtmlString.Empty)</span>
<span class="ms-noWrap">@segments[i](MvcHtmlString.Empty)</span>

if (i < segments.Length - 1)
{
Expand Down Expand Up @@ -661,6 +661,7 @@ var hlp = new AccordionHelper(name, formModelStatePrefix, expanded, page);

window.onload = function () {
$('div.g-recaptcha iframe').attr({ tabindex: "1" });
$('div.g-recaptcha iframe').attr({ role: "document" });
}
</script>
}
Expand Down
10 changes: 5 additions & 5 deletions src/NuGetGallery/Views/Packages/DisplayPackage.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@
{
Id = "dotnet-cli",
CommandPrefix = "> ",
InstallPackageCommands = new [] { string.Format("dotnet new --install {0}::{1}", Model.Id, Model.Version) },
InstallPackageCommands = new [] { string.Format("dotnet new install {0}::{1}", Model.Id, Model.Version) },
AlertLevel = AlertLevel.Info,
AlertMessage = "This package contains a <a href='https://aka.ms/dotnet-new'>.NET Core Template Package</a> you can call from the shell/command line.",
AlertMessage = "This package contains a <a href='https://aka.ms/dotnet-new'>.NET Template Package</a> you can call from the shell/command line.",
}
};
}
Expand Down Expand Up @@ -268,13 +268,13 @@
</h1>
@if (Model.IsVerified.HasValue && Model.IsVerified.Value)
{
<span class="prefix-reserve-title" aria-hidden="true">
<img class="reserved-indicator" aria-hidden="true"
<span class="prefix-reserve-title">
<img class="reserved-indicator"
src="~/Content/gallery/img/reserved-indicator.svg"
@ViewHelpers.ImageFallback(Url.Absolute("~/Content/gallery/img/reserved-indicator-25x25.png"))
data-content="@Strings.ReservedNamespace_ReservedIndicatorTooltip" tabindex="0"
alt="@Strings.ReservedNamespace_ReservedIndicatorTooltip"/>
<a href="https://docs.microsoft.com/en-us/nuget/nuget-org/id-prefix-reservation" class="prefix-reserve-label" ari-hidden="true">
<a href="https://docs.microsoft.com/en-us/nuget/nuget-org/id-prefix-reservation" class="prefix-reserve-label">
Prefix Reserved
</a>
</span>
Expand Down
6 changes: 3 additions & 3 deletions src/NuGetGallery/Views/Shared/ListPackages.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<section role="main" class="container main-container page-list-packages">
<div class="row clearfix no-margin">
<div class="col-md-10 no-padding">
<h1 role="alert">
<h1 tabindex="0">
@if (String.IsNullOrEmpty(Model.SearchTerm))
{
if (Model.TotalCount == 1)
Expand Down Expand Up @@ -151,7 +151,7 @@
</div>
}

<div class="list-packages" role="list">
<ul class="list-packages">
@{
var itemIndex = Model.PageIndex * Model.PageSize;
var eventName = Model.IsPreviewSearch ? "preview-search-selection" : "search-selection";
Expand All @@ -161,7 +161,7 @@
@Html.Partial("_ListPackage", package, new ViewDataDictionary { { "itemIndex", itemIndex }, { "eventName", eventName } })
itemIndex++;
}
</div>
</ul>

<div class="row">
<div class="col-xs-12 clearfix">
Expand Down
4 changes: 2 additions & 2 deletions src/NuGetGallery/Views/Shared/_ListPackage.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}
}

<article class="package" role="listitem">
<li class="package">

<div class="row">
<div class="col-sm-1 hidden-xs hidden-sm col-package-icon">
Expand Down Expand Up @@ -131,4 +131,4 @@
</div>
</div>
</div>
</article>
</li>
4 changes: 2 additions & 2 deletions src/NuGetGallery/Views/Users/Profiles.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@

<hr class="profile-title-divider" />

<div class="list-packages" role="list">
<ul class="list-packages">
@foreach (var package in Model.PagedPackages)
{
@Html.Partial("_ListPackage", package)
}
</div>
</ul>

@ViewHelpers.PreviousNextPager(Model.Pager)
</article>
Expand Down
10 changes: 9 additions & 1 deletion src/NuGetGallery/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,14 @@
</system.diagnostics>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="NuGet.Versioning" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.4.0.123" newVersion="6.4.0.123"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="NuGet.Packaging" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.4.0.123" newVersion="6.4.0.123"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.IdentityModel.Tokens" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.7.1.0" newVersion="6.7.1.0"/>
Expand Down Expand Up @@ -674,4 +682,4 @@
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
</configuration>