dependabot-nuget 0.305.0 → 0.308.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: b510a9d8fdeba70a85b5eeab842a16642ec8e7beab71caa0e99f7e39bab6fd97
4
+ data.tar.gz: c7ef1903b20b5eda9eb1e02153cedc3972a00c574e0acb4ad212cbaf16e673e4
5
5
  SHA512:
6
- metadata.gz: 4c1f3bc6e859ebadea39a5f5c142270458abd1b6778f872dc3026bec5489652bd652356ee37c8f8b5f5f57397e00c81914281f2d3380584afea88e8080eab0a2
7
- data.tar.gz: 2b23f7200bf17572009da8f6eed84bbac0fd6e8a0d9c52eb781e6a32fa0933598adb25732d8488cef709eed07a10b88d2146618f8444350e35d0798e8c74030b
6
+ metadata.gz: '077584f16e3e95b98e69e74c67e3105dbf09455c19674bbc21929a91236fd5ba18b465f90103557e046ea867227bd6209e52d2faa958296234b020b0b24d09dc'
7
+ data.tar.gz: b55391c84e09601c30a4046cf4b29263ea40f17360de2f70d7830978d7a8dca8994aec472bc92fcf5c813ceac235c003c0b449b3e08759d2e99f507c275df64e
@@ -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,13 @@
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.308.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-04-06 00:00:00.000000000 Z
10
+ date: 2025-04-12 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: dependabot-common
@@ -16,14 +15,14 @@ dependencies:
16
15
  requirements:
17
16
  - - '='
18
17
  - !ruby/object:Gem::Version
19
- version: 0.305.0
18
+ version: 0.308.0
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - '='
25
24
  - !ruby/object:Gem::Version
26
- version: 0.305.0
25
+ version: 0.308.0
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: rubyzip
29
28
  requirement: !ruby/object:Gem::Requirement
@@ -552,8 +551,7 @@ licenses:
552
551
  - MIT
553
552
  metadata:
554
553
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
555
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.305.0
556
- post_install_message:
554
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.308.0
557
555
  rdoc_options: []
558
556
  require_paths:
559
557
  - lib
@@ -568,8 +566,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
568
566
  - !ruby/object:Gem::Version
569
567
  version: 3.1.0
570
568
  requirements: []
571
- rubygems_version: 3.5.22
572
- signing_key:
569
+ rubygems_version: 3.6.3
573
570
  specification_version: 4
574
571
  summary: Provides Dependabot support for .NET (NuGet)
575
572
  test_files: []