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 +4 -4
- data/helpers/lib/NuGetUpdater/Directory.Packages.props +1 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Discover/DiscoveryWorker.cs +17 -2
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/NuGetUpdater.Core.csproj +1 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/DiscoveryWorkerTests.cs +55 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 667f063c767b1d94069532d5e1dfaea5c866dd2efccd6236d305e790b3fbba70
|
4
|
+
data.tar.gz: 42630169607d9599f31ee2621f7c51a4381f9869257562856c3611903e1e9777
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 =
|
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
|
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.
|
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-
|
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.
|
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.
|
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.
|
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:
|