Skip to content

Commit

Permalink
chore: use central package versions (#2825)
Browse files Browse the repository at this point in the history
The only actual package version changes are in test projects:
- FluentAssertions: Unify to 6.12.0
- xunit: Unify to 2.4.2
- xunit.runner.console: Unify to 2.4.2
- xunit.runner.visualstudio: Unify to 2.4.5

NOTE: The xunit versions are slightly downgraded for Test.UnitTests.Sarif.Driver since upgrading xunit across the solution leads to issues:
- New xunit analyzer errors
- Dropped support for netcoreapp3.1
  • Loading branch information
nguerrera authored Nov 1, 2024
1 parent 7b64c63 commit a4a0d6d
Show file tree
Hide file tree
Showing 18 changed files with 164 additions and 167 deletions.
45 changes: 45 additions & 0 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Azure.Core" Version="1.41.0" />
<PackageVersion Include="Azure.Identity" Version="1.12.1" />
<PackageVersion Include="CommandLineParser" Version="2.9.1" />
<PackageVersion Include="coverlet.collector" Version="3.2.0" />
<PackageVersion Include="CsvHelper" Version="15.0.5" />
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
<PackageVersion Include="Microsoft.Data.SqlClient" Version="2.1.7" />
<PackageVersion Include="Microsoft.Diagnostics.Tracing.EventRegister" Version="1.1.28" />
<PackageVersion Include="Microsoft.Diagnostics.Tracing.TraceEvent" Version="3.1.3" />
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="3.1.2" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="3.1.2" />
<PackageVersion Include="Microsoft.Extensions.FileSystemGlobbing" Version="3.1.9" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.2" />
<PackageVersion Include="Microsoft.Extensions.Logging.ApplicationInsights" Version="2.20.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="3.1.2" />
<PackageVersion Include="Microsoft.Json.Pointer" Version="2.1.0" />
<PackageVersion Include="Microsoft.Json.Schema" Version="2.1.0" />
<PackageVersion Include="Microsoft.Json.Schema.Validation" Version="2.1.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<PackageVersion Include="Microsoft.TeamFoundationServer.Client" Version="16.170.0" />
<PackageVersion Include="Moq" Version="4.18.4" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.1" />
<PackageVersion Include="System.Collections.Immutable" Version="5.0.0" />
<PackageVersion Include="System.Composition" Version="5.0.0" />
<PackageVersion Include="System.Data.SqlClient" Version="4.8.6" />
<PackageVersion Include="System.Diagnostics.Debug" Version="4.3.0" />
<PackageVersion Include="System.IO.Compression" Version="4.3.0" />
<PackageVersion Include="System.IO.FileSystem.Primitives" Version="4.3.0" />
<PackageVersion Include="System.Private.Uri" Version="4.3.2" />
<PackageVersion Include="System.Text.Encoding.CodePages" Version="4.3.0" />
<PackageVersion Include="System.Text.Encoding.Extensions" Version="4.3.0" />
<PackageVersion Include="System.Text.Encodings.Web" Version="5.0.1" />
<PackageVersion Include="System.Threading.Channels" Version="5.0.0" />
<PackageVersion Include="xunit" Version="2.4.2" />
<PackageVersion Include="xunit.runner.console" Version="2.4.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.4.5" />
<PackageVersion Include="YamlDotNet" Version="11.2.0" />
</ItemGroup>
</Project>
18 changes: 9 additions & 9 deletions src/Sarif.Converters/Sarif.Converters.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,27 @@
<ItemGroup>
<!-- We have to ship pre-patch versions of NewtonSoft for VisualStudio SDK.
We mitigate risk by limiting nesting depth. -->
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" NoWarn="NU1903" />
<PackageReference Include="Newtonsoft.Json" VersionOverride="9.0.1" NoWarn="NU1903" />

<PackageReference Include="System.IO.FileSystem.Primitives" Version="4.3.0" />
<PackageReference Include="System.Text.Encoding.Extensions" Version="4.3.0" />
<PackageReference Include="System.IO.FileSystem.Primitives" />
<PackageReference Include="System.Text.Encoding.Extensions" />
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<!-- We have to ship pre-patch versions of NewtonSoft for VisualStudio SDK.
We mitigate risk by limiting nesting depth. -->
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" NoWarn="NU1903" />
<PackageReference Include="Newtonsoft.Json" VersionOverride="9.0.1" NoWarn="NU1903" />
</ItemGroup>
</Otherwise>
</Choose>

<ItemGroup>
<PackageReference Include="CsvHelper" Version="15.0.5" />
<PackageReference Include="System.Collections.Immutable" Version="5.0.0" />
<PackageReference Include="System.IO.Compression" Version="4.3.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="YamlDotNet" Version="11.2.0" />
<PackageReference Include="CsvHelper" />
<PackageReference Include="System.Collections.Immutable" />
<PackageReference Include="System.IO.Compression" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
<PackageReference Include="YamlDotNet" />
</ItemGroup>

<ItemGroup>
Expand Down
18 changes: 9 additions & 9 deletions src/Sarif.Driver/Sarif.Driver.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="Microsoft.Diagnostics.Tracing.TraceEvent" Version="3.1.3" />
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="3.1.9" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="System.Composition" Version="5.0.0" />
<PackageReference Include="System.Diagnostics.Debug" Version="4.3.0" />
<PackageReference Include="System.IO.FileSystem.Primitives" Version="4.3.0" />
<PackageReference Include="System.Text.Encoding.Extensions" Version="4.3.0" />
<PackageReference Include="System.Threading.Channels" Version="5.0.0" />
<PackageReference Include="CommandLineParser" />
<PackageReference Include="Microsoft.Diagnostics.Tracing.TraceEvent" />
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
<PackageReference Include="System.Composition" />
<PackageReference Include="System.Diagnostics.Debug" />
<PackageReference Include="System.IO.FileSystem.Primitives" />
<PackageReference Include="System.Text.Encoding.Extensions" />
<PackageReference Include="System.Threading.Channels" />
</ItemGroup>

<ItemGroup>
Expand Down
18 changes: 9 additions & 9 deletions src/Sarif.Multitool.Library/Sarif.Multitool.Library.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.12.1" />
<PackageReference Include="Azure.Core" Version="1.41.0" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="2.1.7" />
<PackageReference Include="Microsoft.Json.Pointer" Version="2.1.0" />
<PackageReference Include="Microsoft.Json.Schema" Version="2.1.0" />
<PackageReference Include="Microsoft.Json.Schema.Validation" Version="2.1.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="System.Threading.Channels" Version="5.0.0" />
<PackageReference Include="Azure.Identity" />
<PackageReference Include="Azure.Core" />
<PackageReference Include="Microsoft.Data.SqlClient" />
<PackageReference Include="Microsoft.Json.Pointer" />
<PackageReference Include="Microsoft.Json.Schema" />
<PackageReference Include="Microsoft.Json.Schema.Validation" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
<PackageReference Include="System.Threading.Channels" />

<!-- We have to ship pre-patch versions of NewtonSoft for VisualStudio SDK.
We mitigate risk by limiting nesting depth. -->
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" NoWarn="NU1903" />
<PackageReference Include="Newtonsoft.Json" VersionOverride="12.0.3" NoWarn="NU1903" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Sarif.Multitool/Sarif.Multitool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="System.Private.Uri" Version="4.3.2" />
<PackageReference Include="CommandLineParser" />
<PackageReference Include="System.Private.Uri" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Sarif.WorkItems/Sarif.WorkItems.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<ItemGroup>
<!-- We have to ship pre-patch versions of NewtonSoft for VisualStudio SDK.
We mitigate risk by limiting nesting depth. -->
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" NoWarn="NU1903" />
<PackageReference Include="Newtonsoft.Json" VersionOverride="12.0.3" NoWarn="NU1903" />
</ItemGroup>

<ItemGroup>
Expand Down
22 changes: 11 additions & 11 deletions src/Sarif/Sarif.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,29 @@
<Choose>
<When Condition="$(TargetFramework) == 'netstandard2.0'">
<ItemGroup>
<!-- We have to ship pre-patch versions of NewtonSoft for VisualStudio SDK.
<!-- We have to ship pre-patch versions of NewtonSoft for VisualStudio SDK.
We mitigate risk by limiting nesting depth. -->
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" NoWarn="NU1903" />
<PackageReference Include="Newtonsoft.Json" VersionOverride="9.0.1" NoWarn="NU1903" />
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="6.0.8" NoWarn="NU1903" />
<PackageReference Include="Newtonsoft.Json" VersionOverride="6.0.8" NoWarn="NU1903" />
<Reference Include="System.Web" />
<Reference Include="System.Net.Http" />
</ItemGroup>
</Otherwise>
</Choose>

<ItemGroup>
<PackageReference Include="Microsoft.Diagnostics.Tracing.EventRegister" Version="1.1.28" Condition="$(OS) == 'Windows_NT'" />
<PackageReference Include="Microsoft.Diagnostics.Tracing.TraceEvent" Version="3.1.3" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="System.Collections.Immutable" Version="5.0.0" />
<PackageReference Include="System.Diagnostics.Debug" Version="4.3.0" />
<PackageReference Include="System.IO.FileSystem.Primitives" Version="4.3.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.3.0" />
<PackageReference Include="System.Text.Encoding.Extensions" Version="4.3.0" />
<PackageReference Include="Microsoft.Diagnostics.Tracing.EventRegister" Condition="$(OS) == 'Windows_NT'" />
<PackageReference Include="Microsoft.Diagnostics.Tracing.TraceEvent" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
<PackageReference Include="System.Collections.Immutable" />
<PackageReference Include="System.Diagnostics.Debug" />
<PackageReference Include="System.IO.FileSystem.Primitives" />
<PackageReference Include="System.Text.Encoding.CodePages" />
<PackageReference Include="System.Text.Encoding.Extensions" />
</ItemGroup>

<ItemGroup Label="Packaging">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="CommandLineParser" />
</ItemGroup>

<ItemGroup>
Expand Down
20 changes: 7 additions & 13 deletions src/Test.FunctionalTests.Sarif/Test.FunctionalTests.Sarif.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="System.Composition" Version="5.0.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.console" Version="2.4.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Moq" />
<PackageReference Include="System.Composition" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.console" PrivateAssets="All" />
<PackageReference Include="xunit.runner.visualstudio" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="System.Composition" Version="5.0.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.console" Version="2.4.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Moq" />
<PackageReference Include="System.Composition" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.console" PrivateAssets="All" />
<PackageReference Include="xunit.runner.visualstudio" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand Down
20 changes: 7 additions & 13 deletions src/Test.UnitTests.Sarif.Driver/Test.UnitTests.Sarif.Driver.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,13 @@
</Target>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="System.Composition" Version="5.0.0" />
<PackageReference Include="xunit" Version="2.5.1" />
<PackageReference Include="xunit.runner.console" Version="2.5.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Moq" />
<PackageReference Include="System.Composition" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.console" PrivateAssets="All" />
<PackageReference Include="xunit.runner.visualstudio" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,14 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.9.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="System.Composition" Version="5.0.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.console" Version="2.4.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Moq" />
<PackageReference Include="System.Composition" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.console" PrivateAssets="All" />
<PackageReference Include="xunit.runner.visualstudio" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio" PrivateAssets="All" />
<PackageReference Include="coverlet.collector" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="System.Composition" Version="5.0.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.console" Version="2.4.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Moq" />
<PackageReference Include="System.Composition" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.console" PrivateAssets="All" />
<PackageReference Include="xunit.runner.visualstudio" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading

0 comments on commit a4a0d6d

Please sign in to comment.