dependabot-nuget 0.305.0 → 0.306.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 137dd6d83f2c7ddfa976b7c2f4998569608d53591fcb78c71493a2a2f6ba38ba
4
- data.tar.gz: 95c0a8c95e46fd79bbea338e110c675ee9e56983b587cea9392aa2161d939efa
3
+ metadata.gz: 667f063c767b1d94069532d5e1dfaea5c866dd2efccd6236d305e790b3fbba70
4
+ data.tar.gz: 42630169607d9599f31ee2621f7c51a4381f9869257562856c3611903e1e9777
5
5
  SHA512:
6
- metadata.gz: 4c1f3bc6e859ebadea39a5f5c142270458abd1b6778f872dc3026bec5489652bd652356ee37c8f8b5f5f57397e00c81914281f2d3380584afea88e8080eab0a2
7
- data.tar.gz: 2b23f7200bf17572009da8f6eed84bbac0fd6e8a0d9c52eb781e6a32fa0933598adb25732d8488cef709eed07a10b88d2146618f8444350e35d0798e8c74030b
6
+ metadata.gz: '07191e90628fd2c15c16ea6ef4256e33396352ed726b39665ddbd2cc4f2c762d1198616f344a668d48d522c2b59317199f38cd0c15ca885c48601dcefa90c7a7'
7
+ data.tar.gz: 2e404159e84db4cafbf8ee3c487749ab058522a055bed91a66af6e394f58610dcb0c9625c231a23e7a93b03a2640164a9ba773159b741f2336f900f16c5e4588
@@ -20,6 +20,7 @@
20
20
  <PackageVersion Include="Microsoft.Extensions.Logging" Version="9.0.3" />
21
21
  <PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
22
22
  <PackageVersion Include="Microsoft.VisualStudio.Setup.Configuration.Interop" Version="3.12.2149" />
23
+ <PackageVersion Include="Microsoft.VisualStudio.SolutionPersistence" Version="1.0.52" />
23
24
  <PackageVersion Include="Microsoft.Web.Xdt" Version="3.1.0" />
24
25
  <PackageVersion Include="MSBuild.StructuredLogger" Version="2.2.386" />
25
26
  <PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
@@ -7,6 +7,9 @@ using Microsoft.Build.Definition;
7
7
  using Microsoft.Build.Evaluation;
8
8
  using Microsoft.Build.Exceptions;
9
9
 
10
+ using Microsoft.VisualStudio.SolutionPersistence.Model;
11
+ using Microsoft.VisualStudio.SolutionPersistence.Serializer;
12
+
10
13
  using NuGet.Frameworks;
11
14
 
12
15
  using NuGetUpdater.Core.Run.ApiModel;
@@ -167,7 +170,7 @@ public partial class DiscoveryWorker : IDiscoveryWorker
167
170
  ImmutableArray<string> projects;
168
171
  try
169
172
  {
170
- projects = ExpandEntryPointsIntoProjects(entryPoints);
173
+ projects = await ExpandEntryPointsIntoProjectsAsync(entryPoints);
171
174
  }
172
175
  catch (InvalidProjectFileException e)
173
176
  {
@@ -202,6 +205,7 @@ public partial class DiscoveryWorker : IDiscoveryWorker
202
205
  switch (extension)
203
206
  {
204
207
  case ".sln":
208
+ case ".slnx":
205
209
  case ".proj":
206
210
  case ".csproj":
207
211
  case ".fsproj":
@@ -214,7 +218,7 @@ public partial class DiscoveryWorker : IDiscoveryWorker
214
218
  .ToImmutableArray();
215
219
  }
216
220
 
217
- private static ImmutableArray<string> ExpandEntryPointsIntoProjects(IEnumerable<string> entryPoints)
221
+ private async static Task<ImmutableArray<string>> ExpandEntryPointsIntoProjectsAsync(IEnumerable<string> entryPoints)
218
222
  {
219
223
  HashSet<string> expandedProjects = new();
220
224
  HashSet<string> seenProjects = new();
@@ -233,6 +237,17 @@ public partial class DiscoveryWorker : IDiscoveryWorker
233
237
  filesToExpand.Push(project.AbsolutePath);
234
238
  }
235
239
  }
240
+ else if (extension == ".slnx")
241
+ {
242
+ SolutionModel solution = await SolutionSerializers.SlnXml.OpenAsync(candidateEntryPoint, CancellationToken.None);
243
+ string solutionPath = Path.GetDirectoryName(candidateEntryPoint) ?? string.Empty;
244
+
245
+ foreach (SolutionProjectModel project in solution.SolutionProjects)
246
+ {
247
+ string projectPath = Path.Combine(solutionPath, project.FilePath);
248
+ filesToExpand.Push(projectPath);
249
+ }
250
+ }
236
251
  else if (extension == ".proj")
237
252
  {
238
253
  IEnumerable<string> foundProjects = ExpandItemGroupFilesFromProject(candidateEntryPoint, "ProjectFile", "ProjectReference");
@@ -26,6 +26,7 @@
26
26
  <PackageReference Include="Microsoft.Extensions.Logging" />
27
27
  <PackageReference Include="MSBuild.StructuredLogger" />
28
28
  <PackageReference Include="NuGet.Core" Aliases="CoreV2" />
29
+ <PackageReference Include="Microsoft.VisualStudio.SolutionPersistence" />
29
30
  <PackageReference Include="OpenTelemetry" />
30
31
  <PackageReference Include="OpenTelemetry.Exporter.Console" />
31
32
  <PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" />
@@ -708,6 +708,61 @@ public partial class DiscoveryWorkerTests : DiscoveryWorkerTestBase
708
708
  );
709
709
  }
710
710
 
711
+ [Fact]
712
+ public async Task TestRepo_DirectDiscovery_Slnx()
713
+ {
714
+ var solutionPath = "solution.slnx";
715
+ await TestDiscoveryAsync(
716
+ experimentsManager: new ExperimentsManager() { UseDirectDiscovery = true },
717
+ packages:
718
+ [
719
+ MockNuGetPackage.CreateSimplePackage("Some.Package", "9.0.1", "net7.0"),
720
+ ],
721
+ workspacePath: "",
722
+ files: new[]
723
+ {
724
+ ("src/project.csproj", """
725
+ <Project Sdk="Microsoft.NET.Sdk">
726
+ <PropertyGroup>
727
+ <TargetFrameworks>net7.0</TargetFrameworks>
728
+ </PropertyGroup>
729
+
730
+ <ItemGroup>
731
+ <PackageReference Include="Some.Package" Version="9.0.1" />
732
+ </ItemGroup>
733
+ </Project>
734
+ """),
735
+ (solutionPath, """
736
+ <Solution>
737
+ <Folder Name="/src/">
738
+ <Project Path="src\project.csproj" />
739
+ </Folder>
740
+ </Solution>
741
+ """)
742
+ },
743
+ expectedResult: new()
744
+ {
745
+ Path = "",
746
+ Projects = [
747
+ new()
748
+ {
749
+ FilePath = "src/project.csproj",
750
+ TargetFrameworks = ["net7.0"],
751
+ Dependencies = [
752
+ new("Some.Package", "9.0.1", DependencyType.PackageReference, TargetFrameworks: ["net7.0"], IsDirect: true)
753
+ ],
754
+ Properties = [
755
+ new("TargetFrameworks", "net7.0", "src/project.csproj")
756
+ ],
757
+ ReferencedProjectPaths = [],
758
+ ImportedFiles = [],
759
+ AdditionalFiles = [],
760
+ }
761
+ ]
762
+ }
763
+ );
764
+ }
765
+
711
766
  [Fact]
712
767
  public async Task TestRepo_SolutionFileCasingMismatchIsResolved()
713
768
  {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-nuget
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.305.0
4
+ version: 0.306.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-04-06 00:00:00.000000000 Z
11
+ date: 2025-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dependabot-common
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.305.0
19
+ version: 0.306.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.305.0
26
+ version: 0.306.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rubyzip
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -552,7 +552,7 @@ licenses:
552
552
  - MIT
553
553
  metadata:
554
554
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
555
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.305.0
555
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.306.0
556
556
  post_install_message:
557
557
  rdoc_options: []
558
558
  require_paths: