dependabot-silent 0.279.0 → 0.281.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: d7b9fe9e2d5dbf09d5331e89c5b9f52628ac9e83636cfc851bc942aa22e66d28
4
- data.tar.gz: 5a0c6381fb0aa6501717ad47a84cdeea169330ff126da5be71a17f91068dae14
3
+ metadata.gz: a379f35098ef3f0205c0d162cc50ffed63db4aa0a0a66fe0ddde58b22b646c41
4
+ data.tar.gz: 93abbadc9d07397d14a4f6587e5b12fa1c3fb434b50162231252f4e7b8fe8989
5
5
  SHA512:
6
- metadata.gz: 854e5b6ce81f1b4dc09f09e41676a1a6e9e9442e1570f9a58f77fba2057a7b1d0a596d950389bb059f9c716a64a5590acbc446ce4a44843f6d7e4b254f8170b7
7
- data.tar.gz: 75702139264c3e2ad7e9e824f39145bb2d6a0b58fd239a6d31d09532d3b317c2a08becbbfd73239c55115facf6b4595ecd1407c624ac3dfb5eb698207b7d24de
6
+ metadata.gz: '059c4cd4a75ce916cb4f3a5e02b03e26dd46ab6cdad9ad6af420daaff75d7a37fec27f8356e89cb08fc5d7f7c3e3a4068ffb9fc5a2febe8c341f9a1e589ea9ec'
7
+ data.tar.gz: aa6a26bfb5976f84146f3a25b01ef43b8c7faee16c158eda32d1967cdf4f2808d7a687dd9af17523a65117d85fd96775d4ca05b803b282078d523ef657bac085
@@ -4,6 +4,8 @@
4
4
  require "dependabot/dependency"
5
5
  require "dependabot/file_parsers"
6
6
  require "dependabot/file_parsers/base"
7
+ require "dependabot/package_manager"
8
+ require "dependabot/silent/package_manager"
7
9
  require "sorbet-runtime"
8
10
 
9
11
  module SilentPackageManager
@@ -26,6 +28,19 @@ module SilentPackageManager
26
28
  raise Dependabot::DependencyFileNotParseable, T.must(dependency_files.first).path
27
29
  end
28
30
 
31
+ sig { returns(Dependabot::PackageManagerBase) }
32
+ def package_manager
33
+ meta_data = JSON.parse(manifest_content)["silent"]
34
+ silent_version = if meta_data.nil?
35
+ "2"
36
+ else
37
+ meta_data["version"]
38
+ end
39
+ Dependabot::Silent::PackageManager.new(silent_version)
40
+ rescue JSON::ParserError
41
+ raise Dependabot::DependencyFileNotParseable, T.must(dependency_files.first).path
42
+ end
43
+
29
44
  private
30
45
 
31
46
  sig { params(name: String, info: String).returns(Dependabot::Dependency) }
@@ -0,0 +1,45 @@
1
+ # typed: strong
2
+ # frozen_string_literal: true
3
+
4
+ require "sorbet-runtime"
5
+ require "dependabot/silent/version"
6
+ require "dependabot/package_manager"
7
+
8
+ module Dependabot
9
+ module Silent
10
+ PACKAGE_MANAGER = "silent"
11
+
12
+ SUPPORTED_SILENT_VERSIONS = T.let([Version.new("2")].freeze, T::Array[Dependabot::Version])
13
+ DEPRECATED_SILENT_VERSIONS = T.let([Version.new("1")].freeze, T::Array[Dependabot::Version])
14
+
15
+ class PackageManager < PackageManagerBase
16
+ extend T::Sig
17
+
18
+ sig { params(version: T.any(String, Dependabot::Version)).void }
19
+ def initialize(version)
20
+ @version = T.let(Version.new(version), Dependabot::Version)
21
+ @name = T.let(PACKAGE_MANAGER, String)
22
+ @deprecated_versions = T.let(DEPRECATED_SILENT_VERSIONS, T::Array[Dependabot::Version])
23
+ @supported_versions = T.let(SUPPORTED_SILENT_VERSIONS, T::Array[Dependabot::Version])
24
+ end
25
+
26
+ sig { override.returns(String) }
27
+ attr_reader :name
28
+
29
+ sig { override.returns(Dependabot::Version) }
30
+ attr_reader :version
31
+
32
+ sig { override.returns(T::Array[Dependabot::Version]) }
33
+ attr_reader :deprecated_versions
34
+
35
+ sig { override.returns(T::Array[Dependabot::Version]) }
36
+ attr_reader :supported_versions
37
+
38
+ sig { override.returns(T::Boolean) }
39
+ def unsupported?
40
+ # Check if the version is not supported
41
+ supported_versions.all? { |supported| supported > version }
42
+ end
43
+ end
44
+ end
45
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-silent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.279.0
4
+ version: 0.281.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-10-03 00:00:00.000000000 Z
11
+ date: 2024-10-17 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.279.0
19
+ version: 0.281.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.279.0
26
+ version: 0.281.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: debug
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -156,14 +156,14 @@ dependencies:
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 0.8.1
159
+ version: 0.8.5
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: 0.8.1
166
+ version: 0.8.5
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: simplecov
169
169
  requirement: !ruby/object:Gem::Requirement
@@ -245,6 +245,7 @@ files:
245
245
  - lib/dependabot/silent/file_parser.rb
246
246
  - lib/dependabot/silent/file_updater.rb
247
247
  - lib/dependabot/silent/metadata_finder.rb
248
+ - lib/dependabot/silent/package_manager.rb
248
249
  - lib/dependabot/silent/requirement.rb
249
250
  - lib/dependabot/silent/update_checker.rb
250
251
  - lib/dependabot/silent/version.rb
@@ -253,7 +254,7 @@ licenses:
253
254
  - MIT
254
255
  metadata:
255
256
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
256
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.279.0
257
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.281.0
257
258
  post_install_message:
258
259
  rdoc_options: []
259
260
  require_paths: