dependabot-dotnet_sdk 0.291.0 → 0.292.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dcf51bf6f752c0acd0c7ddeacd0c74a2cb6ae19b9251112270caa513acc5eb0a
4
- data.tar.gz: '069cd8b7b1f6f09de8131cdc151254b7de49d5695f53c139b8ccf847e8e60965'
3
+ metadata.gz: bf320e29068897b1f4d53915254e6b5416748183b1f5510c5a37f7bba1866dab
4
+ data.tar.gz: e588d73f5b0515c20b86cac51b63cbdb053ff5f2c12c75e56f8e3664ead3fd23
5
5
  SHA512:
6
- metadata.gz: 3197ab1c2a71d2803e2bab113d39027490647664a432fc440095b827baed127fbb381bba5287d71c84f364c3bc5e3424c7173938cc4388562a7e05fe3bdc57e4
7
- data.tar.gz: 2c24167e10eabd0c6bfd783c4a09c65d3680e794bff19b7a1462c4c73402f484945c38db01c296c2071d01e78c6de3fe07e4fd77a2c67ff3ea274f19ceefb18b
6
+ metadata.gz: c00bf37e855b6fae742c66bd649f593411ff37ab13084451d299b433dc82e91b6177f3afabcc3eb8938ee451e96f6df44b5af5fc57b9f86c710f3e87ebda7699
7
+ data.tar.gz: b6bab92c54d3a6e1c2aeed74652af591e41b25c3716c279ba92127a63dbdf2f4c5bef09e215369921678856d42c979feaf7638954d1613748cab9d3c5150f69e
@@ -5,6 +5,8 @@ require "dependabot/dependency"
5
5
  require "dependabot/file_parsers"
6
6
  require "dependabot/file_parsers/base"
7
7
  require "sorbet-runtime"
8
+ require "dependabot/dotnet_sdk/package_manager"
9
+ require "dependabot/dotnet_sdk/language"
8
10
 
9
11
  module Dependabot
10
12
  module DotnetSdk
@@ -25,6 +27,18 @@ module Dependabot
25
27
  dependency_set.dependencies
26
28
  end
27
29
 
30
+ sig { returns(Ecosystem) }
31
+ def ecosystem
32
+ @ecosystem ||= T.let(
33
+ Ecosystem.new(
34
+ name: ECOSYSTEM,
35
+ package_manager: package_manager,
36
+ language: dotnetsdk
37
+ ),
38
+ T.nilable(Ecosystem)
39
+ )
40
+ end
41
+
28
42
  private
29
43
 
30
44
  sig { params(dependency_file: Dependabot::DependencyFile).returns(T.nilable(Dependabot::Dependency)) }
@@ -56,6 +70,11 @@ module Dependabot
56
70
  )
57
71
  end
58
72
 
73
+ sig { returns(T.nilable(Ecosystem::VersionManager)) }
74
+ def dotnetsdk
75
+ DotnetSDK.new(T.must(sdk_version))
76
+ end
77
+
59
78
  sig { returns(T::Array[Dependabot::DependencyFile]) }
60
79
  def config_dependency_files
61
80
  @config_dependency_files ||= T.let(
@@ -72,6 +91,22 @@ module Dependabot
72
91
 
73
92
  raise "No dependency files!"
74
93
  end
94
+
95
+ sig { returns(Ecosystem::VersionManager) }
96
+ def package_manager
97
+ DotNetSdkPackageManager.new
98
+ end
99
+
100
+ sig { returns(T.nilable(String)) }
101
+ def sdk_version
102
+ @sdk_version = T.let(nil, T.nilable(String))
103
+ config_dependency_files.each do |dependency_file|
104
+ @sdk_version ||= JSON.parse(T.must(dependency_file.content))["sdk"]["version"]
105
+
106
+ raise Dependabot::DependencyFileNotParseable, dependency_file.path if @sdk_version.nil?
107
+ end
108
+ @sdk_version
109
+ end
75
110
  end
76
111
  end
77
112
  end
@@ -0,0 +1,25 @@
1
+ # typed: strong
2
+ # frozen_string_literal: true
3
+
4
+ require "sorbet-runtime"
5
+ require "dependabot/dotnet_sdk/version"
6
+ require "dependabot/ecosystem"
7
+
8
+ module Dependabot
9
+ module DotnetSdk
10
+ class DotnetSDK < Dependabot::Ecosystem::VersionManager
11
+ extend T::Sig
12
+
13
+ LANGUAGE = "DotnetSDK"
14
+
15
+ SUPPORTED_VERSIONS = T.let([].freeze, T::Array[Dependabot::Version])
16
+
17
+ DEPRECATED_VERSIONS = T.let([].freeze, T::Array[Dependabot::Version])
18
+
19
+ sig { params(raw_version: String).void }
20
+ def initialize(raw_version)
21
+ super(name: LANGUAGE, version: Version.new(raw_version))
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,53 @@
1
+ # typed: strong
2
+ # frozen_string_literal: true
3
+
4
+ require "sorbet-runtime"
5
+ require "dependabot/dotnet_sdk/version"
6
+ require "dependabot/ecosystem"
7
+ require "dependabot/dotnet_sdk/requirement"
8
+
9
+ module Dependabot
10
+ module DotnetSdk
11
+ ECOSYSTEM = "dotnet-sdk"
12
+
13
+ SUPPORTED_VERSIONS = T.let([].freeze, T::Array[Dependabot::Version])
14
+
15
+ DEPRECATED_VERSIONS = T.let([].freeze, T::Array[Dependabot::Version])
16
+
17
+ class DotNetSdkPackageManager < Dependabot::Ecosystem::VersionManager
18
+ extend T::Sig
19
+
20
+ NAME = "dotnet_sdk"
21
+
22
+ # we are not using any native helper or 3rd party utility for package manager,
23
+ # So we supply a placeholder version with for our package manager
24
+ VERSION = "1.0.0"
25
+
26
+ SUPPORTED_VERSIONS = T.let([].freeze, T::Array[Dependabot::Version])
27
+
28
+ DEPRECATED_VERSIONS = T.let([].freeze, T::Array[Dependabot::Version])
29
+
30
+ sig do
31
+ void
32
+ end
33
+ def initialize
34
+ super(
35
+ name: NAME,
36
+ version: Version.new(VERSION),
37
+ deprecated_versions: DEPRECATED_VERSIONS,
38
+ supported_versions: SUPPORTED_VERSIONS
39
+ )
40
+ end
41
+
42
+ sig { override.returns(T::Boolean) }
43
+ def deprecated?
44
+ false
45
+ end
46
+
47
+ sig { override.returns(T::Boolean) }
48
+ def unsupported?
49
+ false
50
+ end
51
+ end
52
+ end
53
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-dotnet_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.291.0
4
+ version: 0.292.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-12-19 00:00:00.000000000 Z
11
+ date: 2025-01-09 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.291.0
19
+ version: 0.292.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.291.0
26
+ version: 0.292.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: debug
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -245,7 +245,9 @@ files:
245
245
  - lib/dependabot/dotnet_sdk/file_fetcher.rb
246
246
  - lib/dependabot/dotnet_sdk/file_parser.rb
247
247
  - lib/dependabot/dotnet_sdk/file_updater.rb
248
+ - lib/dependabot/dotnet_sdk/language.rb
248
249
  - lib/dependabot/dotnet_sdk/metadata_finder.rb
250
+ - lib/dependabot/dotnet_sdk/package_manager.rb
249
251
  - lib/dependabot/dotnet_sdk/requirement.rb
250
252
  - lib/dependabot/dotnet_sdk/update_checker.rb
251
253
  - lib/dependabot/dotnet_sdk/update_checker/latest_version_finder.rb
@@ -255,7 +257,7 @@ licenses:
255
257
  - MIT
256
258
  metadata:
257
259
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
258
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.291.0
260
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.292.0
259
261
  post_install_message:
260
262
  rdoc_options: []
261
263
  require_paths:
@@ -271,7 +273,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
271
273
  - !ruby/object:Gem::Version
272
274
  version: 3.1.0
273
275
  requirements: []
274
- rubygems_version: 3.5.9
276
+ rubygems_version: 3.5.22
275
277
  signing_key:
276
278
  specification_version: 4
277
279
  summary: Provides Dependabot support for .NET SDK