dependabot-maven 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: 49f86ee20329548a1b6c5db7ce51674bb5679cbf364c793251703cd26af75beb
4
- data.tar.gz: 64adcf33d3ef2cd9bc79902cbe03a8a6944598b2a9201f544277a9ee006ff942
3
+ metadata.gz: 4a44d4272c31da7ad1e781ed686c35dd031cb24b1643c3d6c71fd6ba7e18ac93
4
+ data.tar.gz: fd49944b79de242686a9fcdd941fb44cb32adc9eb67ce7c4933780f916dae344
5
5
  SHA512:
6
- metadata.gz: '098eb0589c26a03b7a237b25273314fc502a3fd8196c6d1b4a8dfbb0300f3fc1da47e27bd942720244d2d6b744bc05590f795a3b911a78330214b3e5cca89bae'
7
- data.tar.gz: e6f21a7a1835d927900f2c64f5e615c1c7576d75979d1e5b18eb45948b0eec4141508066ce107e89150633de2afb9f2dac5d16bfcad87f060ae641e41ce98823
6
+ metadata.gz: 681caa5965266aad2fd805953ab1d3e9042ca2f451c88affca3db5d817a28da54855b5d20bb44736677e70eb44097081e3861bcda327397da2d9533a86da1de0
7
+ data.tar.gz: 148c789d2a6bf72c93c4c0179828e37c07a99003b71962e92240fb5e36395d06936bec7325051b0d3388c1bbe08a8dd89c5d24fd5ea4271aa11978edd8d68bfe
@@ -1,4 +1,4 @@
1
- # typed: true
1
+ # typed: strict
2
2
  # frozen_string_literal: true
3
3
 
4
4
  #######################################################
@@ -6,6 +6,7 @@
6
6
  # https://maven.apache.org/pom.html#Dependencies #
7
7
  #######################################################
8
8
 
9
+ require "dependabot/requirements_updater/base"
9
10
  require "dependabot/maven/update_checker"
10
11
  require "dependabot/maven/version"
11
12
  require "dependabot/maven/requirement"
@@ -14,6 +15,22 @@ module Dependabot
14
15
  module Maven
15
16
  class UpdateChecker
16
17
  class RequirementsUpdater
18
+ extend T::Sig
19
+ extend T::Generic
20
+
21
+ Version = type_member { { fixed: Dependabot::Maven::Version } }
22
+ Requirement = type_member { { fixed: Dependabot::Maven::Requirement } }
23
+
24
+ include Dependabot::RequirementsUpdater::Base
25
+
26
+ sig do
27
+ params(
28
+ requirements: T::Array[T::Hash[Symbol, T.untyped]],
29
+ latest_version: T.nilable(T.any(Version, String)),
30
+ source_url: String,
31
+ properties_to_update: T::Array[String]
32
+ ).void
33
+ end
17
34
  def initialize(requirements:, latest_version:, source_url:,
18
35
  properties_to_update:)
19
36
  @requirements = requirements
@@ -21,9 +38,10 @@ module Dependabot
21
38
  @properties_to_update = properties_to_update
22
39
  return unless latest_version
23
40
 
24
- @latest_version = version_class.new(latest_version)
41
+ @latest_version = T.let(version_class.new(latest_version), Version)
25
42
  end
26
43
 
44
+ sig { override.returns(T::Array[T::Hash[Symbol, T.untyped]]) }
27
45
  def updated_requirements
28
46
  return requirements unless latest_version
29
47
 
@@ -44,30 +62,42 @@ module Dependabot
44
62
 
45
63
  private
46
64
 
65
+ sig { returns(T::Array[T::Hash[Symbol, T.untyped]]) }
47
66
  attr_reader :requirements
67
+
68
+ sig { returns(T.nilable(Version)) }
48
69
  attr_reader :latest_version
70
+
71
+ sig { returns(String) }
49
72
  attr_reader :source_url
73
+
74
+ sig { returns(T::Array[String]) }
50
75
  attr_reader :properties_to_update
51
76
 
77
+ sig { params(req_string: String).returns(String) }
52
78
  def update_requirement(req_string)
53
79
  # Since range requirements are excluded this must be exact
54
80
  update_exact_requirement(req_string)
55
81
  end
56
82
 
83
+ sig { params(req_string: String).returns(String) }
57
84
  def update_exact_requirement(req_string)
58
85
  old_version = requirement_class.new(req_string)
59
86
  .requirements.first.last
60
87
  req_string.gsub(old_version.to_s, latest_version.to_s)
61
88
  end
62
89
 
90
+ sig { override.returns(T::Class[Version]) }
63
91
  def version_class
64
92
  Maven::Version
65
93
  end
66
94
 
95
+ sig { override.returns(T::Class[Requirement]) }
67
96
  def requirement_class
68
97
  Maven::Requirement
69
98
  end
70
99
 
100
+ sig { returns(T::Hash[Symbol, String]) }
71
101
  def updated_source
72
102
  { type: "maven_repo", url: source_url }
73
103
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-maven
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
@@ -266,7 +266,7 @@ licenses:
266
266
  - MIT
267
267
  metadata:
268
268
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
269
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.279.0
269
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.281.0
270
270
  post_install_message:
271
271
  rdoc_options: []
272
272
  require_paths: