dependabot-nuget 0.287.0 → 0.289.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/.gitignore +1 -0
- data/helpers/lib/NuGetUpdater/Directory.Build.targets +17 -0
- data/helpers/lib/NuGetUpdater/Directory.Packages.props +26 -17
- data/helpers/lib/NuGetUpdater/NuGetProjects/NuGet.Packaging/NuGet.Packaging.csproj +0 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Cli/Commands/DiscoverCommand.cs +7 -3
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Cli/Commands/RunCommand.cs +1 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Cli.Test/EntryPointTests.Analyze.cs +3 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Cli.Test/EntryPointTests.Discover.cs +88 -47
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/AnalyzeWorker.cs +31 -16
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/CompatabilityChecker.cs +1 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/RequirementArrayConverter.cs +39 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/VersionFinder.cs +1 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Clone/ShellGitCommandHandler.cs +1 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/DependencyDiscovery.props +7 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/DependencyDiscovery.targets +10 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Discover/DiscoveryWorker.cs +64 -53
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Discover/DotNetToolsJsonDiscovery.cs +2 -2
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Discover/GlobalJsonDiscovery.cs +2 -2
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Discover/PackagesConfigDiscovery.cs +17 -5
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Discover/PackagesConfigDiscoveryResult.cs +3 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Discover/ProjectDiscoveryResult.cs +3 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Discover/SdkProjectDiscovery.cs +429 -12
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Discover/WorkspaceDiscoveryResult.cs +0 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/ExperimentsManager.cs +12 -2
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Files/JsonBuildFile.cs +1 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/FrameworkChecker/CompatabilityChecker.cs +2 -2
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/NuGetUpdater.Core.csproj +7 -2
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/ApiModel/Job.cs +23 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/RunWorker.cs +43 -58
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/TargetFrameworkReporter.targets +13 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/BindingRedirectManager.cs +13 -43
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/DotNetToolsJsonUpdater.cs +4 -4
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/GlobalJsonUpdater.cs +5 -5
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/LockFileUpdater.cs +3 -10
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/PackageReferenceUpdater.cs +40 -33
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/PackagesConfigUpdater.cs +12 -11
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/UpdaterWorker.cs +16 -12
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/CollectionExtensions.cs +17 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/ConsoleLogger.cs +1 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/DependencyConflictResolver.cs +19 -19
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/ILogger.cs +11 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/MSBuildHelper.cs +74 -20
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/NuGetHelper.cs +1 -17
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/PathComparer.cs +31 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/PathHelper.cs +46 -10
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/ProjectHelper.cs +96 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Analyze/AnalyzeWorkerTests.cs +135 -3
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/DiscoveryWorkerTestBase.cs +71 -38
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/DiscoveryWorkerTests.PackagesConfig.cs +66 -4
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/DiscoveryWorkerTests.Proj.cs +11 -5
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/DiscoveryWorkerTests.Project.cs +808 -222
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/DiscoveryWorkerTests.cs +477 -97
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/ExpectedDiscoveryResults.cs +5 -9
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/SdkProjectDiscoveryTests.cs +494 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/MockNuGetPackage.cs +46 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/NuGetUpdater.Core.Test.csproj +0 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/RunWorkerTests.cs +401 -77
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/SerializationTests.cs +35 -2
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/UpdatedDependencyListTests.cs +60 -2
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/TemporaryDirectory.cs +3 -2
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/TestLogger.cs +1 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/BindingRedirectsTests.cs +1 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateWorkerTestBase.cs +8 -4
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateWorkerTests.PackageReference.cs +40 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateWorkerTests.PackagesConfig.cs +1 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/AssertEx.cs +1 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/LinuxOnlyAttribute.cs +12 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/MSBuildHelperTests.cs +8 -5
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/PathHelperTests.cs +49 -3
- data/lib/dependabot/nuget/analysis/analysis_json_reader.rb +3 -1
- data/lib/dependabot/nuget/file_fetcher.rb +12 -393
- data/lib/dependabot/nuget/file_parser.rb +23 -54
- data/lib/dependabot/nuget/file_updater.rb +21 -16
- data/lib/dependabot/nuget/native_discovery/native_dependency_file_discovery.rb +2 -9
- data/lib/dependabot/nuget/native_discovery/native_discovery_json_reader.rb +183 -80
- data/lib/dependabot/nuget/native_discovery/native_project_discovery.rb +25 -3
- data/lib/dependabot/nuget/native_discovery/native_workspace_discovery.rb +1 -11
- data/lib/dependabot/nuget/native_helpers.rb +13 -4
- data/lib/dependabot/nuget/native_update_checker/native_update_checker.rb +17 -4
- metadata +15 -12
- data/helpers/lib/NuGetUpdater/NuGetProjects/Directory.Packages.props +0 -29
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/RequirementConverter.cs +0 -17
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Discover/DirectoryPackagesPropsDiscovery.cs +0 -69
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Discover/DirectoryPackagesPropsDiscoveryResult.cs +0 -11
- data/lib/dependabot/nuget/file_fetcher/import_paths_finder.rb +0 -73
- data/lib/dependabot/nuget/file_fetcher/sln_project_paths_finder.rb +0 -60
- data/lib/dependabot/nuget/native_discovery/native_directory_packages_props_discovery.rb +0 -44
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.289.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-05 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.289.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.289.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rubyzip
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -266,11 +266,11 @@ files:
|
|
266
266
|
- helpers/lib/NuGetUpdater/.editorconfig
|
267
267
|
- helpers/lib/NuGetUpdater/.gitignore
|
268
268
|
- helpers/lib/NuGetUpdater/Directory.Build.props
|
269
|
+
- helpers/lib/NuGetUpdater/Directory.Build.targets
|
269
270
|
- helpers/lib/NuGetUpdater/Directory.Common.props
|
270
271
|
- helpers/lib/NuGetUpdater/Directory.Packages.props
|
271
272
|
- helpers/lib/NuGetUpdater/NuGetProjects/Directory.Build.props
|
272
273
|
- helpers/lib/NuGetUpdater/NuGetProjects/Directory.Build.targets
|
273
|
-
- helpers/lib/NuGetUpdater/NuGetProjects/Directory.Packages.props
|
274
274
|
- helpers/lib/NuGetUpdater/NuGetProjects/NuGet.Build.Tasks/NuGet.Build.Tasks.csproj
|
275
275
|
- helpers/lib/NuGetUpdater/NuGetProjects/NuGet.CommandLine/AssemblyMetadataExtractor.cs
|
276
276
|
- helpers/lib/NuGetUpdater/NuGetProjects/NuGet.CommandLine/NuGet.CommandLine.csproj
|
@@ -321,6 +321,7 @@ files:
|
|
321
321
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/DiscoveryWorkerTests.Project.cs
|
322
322
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/DiscoveryWorkerTests.cs
|
323
323
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/ExpectedDiscoveryResults.cs
|
324
|
+
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/SdkProjectDiscoveryTests.cs
|
324
325
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Files/DotNetToolsJsonBuildFileTests.cs
|
325
326
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Files/GlobalJsonBuildFileTests.cs
|
326
327
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Files/PackagesConfigBuildFileTests.cs
|
@@ -356,6 +357,7 @@ files:
|
|
356
357
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/AssertEx.cs
|
357
358
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/DiffUtil.cs
|
358
359
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/JsonHelperTests.cs
|
360
|
+
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/LinuxOnlyAttribute.cs
|
359
361
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/MSBuildHelperTests.cs
|
360
362
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/PathHelperTests.cs
|
361
363
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/SdkPackageUpdaterHelperTests.cs
|
@@ -367,7 +369,7 @@ files:
|
|
367
369
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/Extensions.cs
|
368
370
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/NuGetContext.cs
|
369
371
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/Requirement.cs
|
370
|
-
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/
|
372
|
+
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/RequirementArrayConverter.cs
|
371
373
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/SecurityVulnerability.cs
|
372
374
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/SecurityVulnerabilityExtensions.cs
|
373
375
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/VersionFinder.cs
|
@@ -376,9 +378,9 @@ files:
|
|
376
378
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Clone/IGitCommandHandler.cs
|
377
379
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Clone/ShellGitCommandHandler.cs
|
378
380
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Dependency.cs
|
381
|
+
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/DependencyDiscovery.props
|
382
|
+
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/DependencyDiscovery.targets
|
379
383
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/DependencyType.cs
|
380
|
-
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Discover/DirectoryPackagesPropsDiscovery.cs
|
381
|
-
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Discover/DirectoryPackagesPropsDiscoveryResult.cs
|
382
384
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Discover/DiscoveryWorker.cs
|
383
385
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Discover/DotNetToolsJsonDiscovery.cs
|
384
386
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Discover/DotNetToolsJsonDiscoveryResult.cs
|
@@ -433,6 +435,7 @@ files:
|
|
433
435
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/IApiHandler.cs
|
434
436
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/RunResult.cs
|
435
437
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/RunWorker.cs
|
438
|
+
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/TargetFrameworkReporter.targets
|
436
439
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/UpdateNotPossibleException.cs
|
437
440
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/BindingRedirectManager.cs
|
438
441
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/BindingRedirectResolver.cs
|
@@ -447,6 +450,7 @@ files:
|
|
447
450
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/UpdaterWorker.cs
|
448
451
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/WebApplicationTargetsConditionPatcher.cs
|
449
452
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/XmlFilePreAndPostProcessor.cs
|
453
|
+
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/CollectionExtensions.cs
|
450
454
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/ConsoleLogger.cs
|
451
455
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/DependencyConflictResolver.cs
|
452
456
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/HashSetExtensions.cs
|
@@ -455,8 +459,10 @@ files:
|
|
455
459
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/JsonHelper.cs
|
456
460
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/MSBuildHelper.cs
|
457
461
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/NuGetHelper.cs
|
462
|
+
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/PathComparer.cs
|
458
463
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/PathHelper.cs
|
459
464
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/ProcessExtensions.cs
|
465
|
+
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/ProjectHelper.cs
|
460
466
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/XmlExtensions.cs
|
461
467
|
- helpers/lib/NuGetUpdater/NuGetUpdater.sln
|
462
468
|
- helpers/lib/NuGetUpdater/global.json
|
@@ -474,15 +480,12 @@ files:
|
|
474
480
|
- lib/dependabot/nuget/discovery/property_details.rb
|
475
481
|
- lib/dependabot/nuget/discovery/workspace_discovery.rb
|
476
482
|
- lib/dependabot/nuget/file_fetcher.rb
|
477
|
-
- lib/dependabot/nuget/file_fetcher/import_paths_finder.rb
|
478
|
-
- lib/dependabot/nuget/file_fetcher/sln_project_paths_finder.rb
|
479
483
|
- lib/dependabot/nuget/file_parser.rb
|
480
484
|
- lib/dependabot/nuget/file_updater.rb
|
481
485
|
- lib/dependabot/nuget/http_response_helpers.rb
|
482
486
|
- lib/dependabot/nuget/metadata_finder.rb
|
483
487
|
- lib/dependabot/nuget/native_discovery/native_dependency_details.rb
|
484
488
|
- lib/dependabot/nuget/native_discovery/native_dependency_file_discovery.rb
|
485
|
-
- lib/dependabot/nuget/native_discovery/native_directory_packages_props_discovery.rb
|
486
489
|
- lib/dependabot/nuget/native_discovery/native_discovery_json_reader.rb
|
487
490
|
- lib/dependabot/nuget/native_discovery/native_evaluation_details.rb
|
488
491
|
- lib/dependabot/nuget/native_discovery/native_project_discovery.rb
|
@@ -511,7 +514,7 @@ licenses:
|
|
511
514
|
- MIT
|
512
515
|
metadata:
|
513
516
|
bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
|
514
|
-
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.
|
517
|
+
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.289.0
|
515
518
|
post_install_message:
|
516
519
|
rdoc_options: []
|
517
520
|
require_paths:
|
@@ -1,29 +0,0 @@
|
|
1
|
-
<Project>
|
2
|
-
|
3
|
-
<PropertyGroup>
|
4
|
-
<MicrosoftBuildVersion>17.5.0</MicrosoftBuildVersion>
|
5
|
-
<MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>6.0.0</MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>
|
6
|
-
<MicrosoftExtensionsFileSystemGlobbingPackageVersion>6.0.0</MicrosoftExtensionsFileSystemGlobbingPackageVersion>
|
7
|
-
<MicrosoftWebXdtPackageVersion>3.0.0</MicrosoftWebXdtPackageVersion>
|
8
|
-
<SystemPackagesVersion>4.3.0</SystemPackagesVersion>
|
9
|
-
<CryptographyPackagesVersion>5.0.0</CryptographyPackagesVersion>
|
10
|
-
</PropertyGroup>
|
11
|
-
|
12
|
-
<ItemGroup>
|
13
|
-
<PackageVersion Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildVersion)" />
|
14
|
-
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildVersion)" />
|
15
|
-
<PackageVersion Include="Microsoft.CSharp" Version="$(SystemPackagesVersion)" />
|
16
|
-
<PackageVersion Include="Microsoft.Extensions.FileProviders.Abstractions" Version="$(MicrosoftExtensionsFileProvidersAbstractionsPackageVersion)" />
|
17
|
-
<PackageVersion Include="Microsoft.Extensions.FileSystemGlobbing" Version="$(MicrosoftExtensionsFileSystemGlobbingPackageVersion)" />
|
18
|
-
<PackageVersion Include="Microsoft.VisualStudio.Setup.Configuration.Interop" Version="3.4.2244" />
|
19
|
-
<PackageVersion Include="Microsoft.Web.Xdt" Version="$(MicrosoftWebXdtPackageVersion)" />
|
20
|
-
<PackageVersion Include="Newtonsoft.Json" Version="13.0.1" />
|
21
|
-
<PackageVersion Include="NuGet.Core" Version="2.14.0-rtm-832" />
|
22
|
-
<PackageVersion Include="System.ComponentModel.Composition" Version="7.0.0" />
|
23
|
-
<PackageVersion Include="System.Security.Cryptography.Cng" Version="$(CryptographyPackagesVersion)" />
|
24
|
-
<PackageVersion Include="System.Security.Cryptography.Pkcs" Version="$(CryptographyPackagesVersion)" />
|
25
|
-
<PackageVersion Include="System.Security.Cryptography.ProtectedData" Version="4.4.0" />
|
26
|
-
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="6.0.0" />
|
27
|
-
</ItemGroup>
|
28
|
-
|
29
|
-
</Project>
|
@@ -1,17 +0,0 @@
|
|
1
|
-
using System.Text.Json;
|
2
|
-
using System.Text.Json.Serialization;
|
3
|
-
|
4
|
-
namespace NuGetUpdater.Core.Analyze;
|
5
|
-
|
6
|
-
public class RequirementConverter : JsonConverter<Requirement>
|
7
|
-
{
|
8
|
-
public override Requirement? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
9
|
-
{
|
10
|
-
return Requirement.Parse(reader.GetString()!);
|
11
|
-
}
|
12
|
-
|
13
|
-
public override void Write(Utf8JsonWriter writer, Requirement value, JsonSerializerOptions options)
|
14
|
-
{
|
15
|
-
writer.WriteStringValue(value.ToString());
|
16
|
-
}
|
17
|
-
}
|
@@ -1,69 +0,0 @@
|
|
1
|
-
using System.Collections.Immutable;
|
2
|
-
|
3
|
-
namespace NuGetUpdater.Core.Discover;
|
4
|
-
|
5
|
-
internal static class DirectoryPackagesPropsDiscovery
|
6
|
-
{
|
7
|
-
public static DirectoryPackagesPropsDiscoveryResult? Discover(string repoRootPath, string workspacePath, ImmutableArray<ProjectDiscoveryResult> projectResults, ILogger logger)
|
8
|
-
{
|
9
|
-
var projectResult = projectResults.FirstOrDefault(
|
10
|
-
p => p.Properties.FirstOrDefault(prop => prop.Name.Equals("ManagePackageVersionsCentrally", StringComparison.OrdinalIgnoreCase)) is Property property
|
11
|
-
&& string.Equals(property.Value, "true", StringComparison.OrdinalIgnoreCase));
|
12
|
-
if (projectResult is null)
|
13
|
-
{
|
14
|
-
logger.Log(" Central Package Management is not enabled.");
|
15
|
-
return null;
|
16
|
-
}
|
17
|
-
|
18
|
-
var projectFilePath = Path.GetFullPath(projectResult.FilePath, workspacePath);
|
19
|
-
if (!MSBuildHelper.TryGetDirectoryPackagesPropsPath(repoRootPath, projectFilePath, out var directoryPackagesPropsPath))
|
20
|
-
{
|
21
|
-
logger.Log(" No Directory.Packages.props file found.");
|
22
|
-
return null;
|
23
|
-
}
|
24
|
-
|
25
|
-
var relativeDirectoryPackagesPropsPath = Path.GetRelativePath(workspacePath, directoryPackagesPropsPath);
|
26
|
-
var directoryPackagesPropsFile = projectResults.FirstOrDefault(p => p.FilePath.Equals(relativeDirectoryPackagesPropsPath, StringComparison.OrdinalIgnoreCase));
|
27
|
-
if (directoryPackagesPropsFile is null)
|
28
|
-
{
|
29
|
-
logger.Log($" No project file found for [{relativeDirectoryPackagesPropsPath}].");
|
30
|
-
return null;
|
31
|
-
}
|
32
|
-
|
33
|
-
logger.Log($" Discovered [{directoryPackagesPropsFile.FilePath}] file.");
|
34
|
-
|
35
|
-
var isTransitivePinningEnabled = projectResult.Properties.FirstOrDefault(prop => prop.Name.Equals("EnableTransitivePinning", StringComparison.OrdinalIgnoreCase)) is Property property
|
36
|
-
&& string.Equals(property.Value, "true", StringComparison.OrdinalIgnoreCase);
|
37
|
-
var properties = projectResult.Properties.ToImmutableDictionary(p => p.Name, StringComparer.OrdinalIgnoreCase);
|
38
|
-
var dependencies = GetDependencies(workspacePath, directoryPackagesPropsPath, properties)
|
39
|
-
.OrderBy(d => d.Name)
|
40
|
-
.ToImmutableArray();
|
41
|
-
|
42
|
-
return new()
|
43
|
-
{
|
44
|
-
FilePath = directoryPackagesPropsFile.FilePath,
|
45
|
-
IsTransitivePinningEnabled = isTransitivePinningEnabled,
|
46
|
-
Dependencies = dependencies,
|
47
|
-
};
|
48
|
-
}
|
49
|
-
|
50
|
-
private static IEnumerable<Dependency> GetDependencies(string workspacePath, string directoryPackagesPropsPath, ImmutableDictionary<string, Property> properties)
|
51
|
-
{
|
52
|
-
var dependencies = ProjectBuildFile.Open(workspacePath, directoryPackagesPropsPath).GetDependencies();
|
53
|
-
return dependencies.Select(d =>
|
54
|
-
{
|
55
|
-
if (d.Version == null)
|
56
|
-
{
|
57
|
-
return d;
|
58
|
-
}
|
59
|
-
|
60
|
-
var evaluation = MSBuildHelper.GetEvaluatedValue(d.Version, properties);
|
61
|
-
return d with
|
62
|
-
{
|
63
|
-
Version = evaluation.EvaluatedValue,
|
64
|
-
EvaluationResult = evaluation,
|
65
|
-
IsDirect = true,
|
66
|
-
};
|
67
|
-
});
|
68
|
-
}
|
69
|
-
}
|
data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Discover/DirectoryPackagesPropsDiscoveryResult.cs
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
using System.Collections.Immutable;
|
2
|
-
|
3
|
-
namespace NuGetUpdater.Core.Discover;
|
4
|
-
|
5
|
-
public sealed record DirectoryPackagesPropsDiscoveryResult : IDiscoveryResultWithDependencies
|
6
|
-
{
|
7
|
-
public required string FilePath { get; init; }
|
8
|
-
public bool IsSuccess { get; init; } = true;
|
9
|
-
public bool IsTransitivePinningEnabled { get; init; }
|
10
|
-
public ImmutableArray<Dependency> Dependencies { get; init; }
|
11
|
-
}
|
@@ -1,73 +0,0 @@
|
|
1
|
-
# typed: strict
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require "nokogiri"
|
5
|
-
require "pathname"
|
6
|
-
require "sorbet-runtime"
|
7
|
-
|
8
|
-
require "dependabot/nuget/file_fetcher"
|
9
|
-
|
10
|
-
module Dependabot
|
11
|
-
module Nuget
|
12
|
-
class FileFetcher
|
13
|
-
class ImportPathsFinder
|
14
|
-
extend T::Sig
|
15
|
-
sig { params(project_file: T.untyped).void }
|
16
|
-
def initialize(project_file:)
|
17
|
-
@project_file = T.let(project_file, Dependabot::DependencyFile)
|
18
|
-
end
|
19
|
-
|
20
|
-
sig { returns(T::Array[String]) }
|
21
|
-
def import_paths
|
22
|
-
doc = T.let(Nokogiri::XML(project_file.content), Nokogiri::XML::Document)
|
23
|
-
doc.remove_namespaces!
|
24
|
-
doc.xpath("/Project/Import").filter_map do |import_node|
|
25
|
-
path = import_node.attribute("Project").value.strip.tr("\\", "/")
|
26
|
-
path = File.join(current_dir, path) unless current_dir.nil?
|
27
|
-
Pathname.new(path).cleanpath.to_path
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
sig { returns(T::Array[String]) }
|
32
|
-
def project_reference_paths
|
33
|
-
doc = T.let(Nokogiri::XML(project_file.content), Nokogiri::XML::Document)
|
34
|
-
doc.remove_namespaces!
|
35
|
-
doc.xpath("/Project/ItemGroup/ProjectReference").filter_map do |node|
|
36
|
-
attribute = node.attribute("Include")
|
37
|
-
next unless attribute
|
38
|
-
|
39
|
-
path = attribute.value.strip.tr("\\", "/")
|
40
|
-
path = File.join(current_dir, path) unless current_dir.nil?
|
41
|
-
Pathname.new(path).cleanpath.to_path
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
sig { returns(T::Array[String]) }
|
46
|
-
def project_file_paths
|
47
|
-
doc = T.let(Nokogiri::XML(project_file.content), Nokogiri::XML::Document)
|
48
|
-
doc.remove_namespaces!
|
49
|
-
doc.xpath("/Project/ItemGroup/ProjectFile").filter_map do |node|
|
50
|
-
attribute = node.attribute("Include")
|
51
|
-
next unless attribute
|
52
|
-
|
53
|
-
path = attribute.value.strip.tr("\\", "/")
|
54
|
-
path = File.join(current_dir, path) unless current_dir.nil?
|
55
|
-
Pathname.new(path).cleanpath.to_path
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
private
|
60
|
-
|
61
|
-
sig { returns(Dependabot::DependencyFile) }
|
62
|
-
attr_reader :project_file
|
63
|
-
|
64
|
-
sig { returns(T.nilable(String)) }
|
65
|
-
def current_dir
|
66
|
-
current_dir = project_file.name.rpartition("/").first
|
67
|
-
current_dir = nil if current_dir == ""
|
68
|
-
current_dir
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
@@ -1,60 +0,0 @@
|
|
1
|
-
# typed: strong
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require "pathname"
|
5
|
-
require "sorbet-runtime"
|
6
|
-
|
7
|
-
require "dependabot/nuget/file_fetcher"
|
8
|
-
|
9
|
-
module Dependabot
|
10
|
-
module Nuget
|
11
|
-
class FileFetcher
|
12
|
-
class SlnProjectPathsFinder
|
13
|
-
extend T::Sig
|
14
|
-
|
15
|
-
sig { params(sln_file: Dependabot::DependencyFile).void }
|
16
|
-
def initialize(sln_file:)
|
17
|
-
@sln_file = sln_file
|
18
|
-
end
|
19
|
-
|
20
|
-
sig { returns(T::Array[String]) }
|
21
|
-
def project_paths
|
22
|
-
paths = T.let([], T::Array[String])
|
23
|
-
return paths unless sln_file.content
|
24
|
-
|
25
|
-
sln_file_lines = T.must(sln_file.content).lines
|
26
|
-
|
27
|
-
sln_file_lines.each do |line|
|
28
|
-
next unless line.match?(/^\s*Project\(/)
|
29
|
-
next unless line.split('"')[5]
|
30
|
-
|
31
|
-
path = line.split('"')[5]
|
32
|
-
next unless path
|
33
|
-
|
34
|
-
path = path.tr("\\", "/")
|
35
|
-
|
36
|
-
# If the path doesn't have an extension it's probably a directory
|
37
|
-
next unless path.match?(/\.[a-z]{2}proj$/)
|
38
|
-
|
39
|
-
path = File.join(current_dir, path) unless current_dir.nil?
|
40
|
-
paths << Pathname.new(path).cleanpath.to_path
|
41
|
-
end
|
42
|
-
|
43
|
-
paths
|
44
|
-
end
|
45
|
-
|
46
|
-
private
|
47
|
-
|
48
|
-
sig { returns(Dependabot::DependencyFile) }
|
49
|
-
attr_reader :sln_file
|
50
|
-
|
51
|
-
sig { returns(T.nilable(String)) }
|
52
|
-
def current_dir
|
53
|
-
current_dir = sln_file.name.rpartition("/").first
|
54
|
-
current_dir = nil if current_dir == ""
|
55
|
-
current_dir
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
@@ -1,44 +0,0 @@
|
|
1
|
-
# typed: strong
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require "dependabot/nuget/native_discovery/native_dependency_details"
|
5
|
-
require "sorbet-runtime"
|
6
|
-
|
7
|
-
module Dependabot
|
8
|
-
module Nuget
|
9
|
-
class NativeDirectoryPackagesPropsDiscovery < NativeDependencyFileDiscovery
|
10
|
-
extend T::Sig
|
11
|
-
|
12
|
-
sig do
|
13
|
-
override.params(json: T.nilable(T::Hash[String, T.untyped]),
|
14
|
-
directory: String).returns(T.nilable(NativeDirectoryPackagesPropsDiscovery))
|
15
|
-
end
|
16
|
-
def self.from_json(json, directory)
|
17
|
-
return nil if json.nil?
|
18
|
-
|
19
|
-
file_path = File.join(directory, T.let(json.fetch("FilePath"), String))
|
20
|
-
is_transitive_pinning_enabled = T.let(json.fetch("IsTransitivePinningEnabled"), T::Boolean)
|
21
|
-
dependencies = T.let(json.fetch("Dependencies"), T::Array[T::Hash[String, T.untyped]]).map do |dep|
|
22
|
-
NativeDependencyDetails.from_json(dep)
|
23
|
-
end
|
24
|
-
|
25
|
-
NativeDirectoryPackagesPropsDiscovery.new(file_path: file_path,
|
26
|
-
is_transitive_pinning_enabled: is_transitive_pinning_enabled,
|
27
|
-
dependencies: dependencies)
|
28
|
-
end
|
29
|
-
|
30
|
-
sig do
|
31
|
-
params(file_path: String,
|
32
|
-
is_transitive_pinning_enabled: T::Boolean,
|
33
|
-
dependencies: T::Array[NativeDependencyDetails]).void
|
34
|
-
end
|
35
|
-
def initialize(file_path:, is_transitive_pinning_enabled:, dependencies:)
|
36
|
-
super(file_path: file_path, dependencies: dependencies)
|
37
|
-
@is_transitive_pinning_enabled = is_transitive_pinning_enabled
|
38
|
-
end
|
39
|
-
|
40
|
-
sig { returns(T::Boolean) }
|
41
|
-
attr_reader :is_transitive_pinning_enabled
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|