dependabot-maven 0.215.0 → 0.216.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/lib/dependabot/maven/file_fetcher.rb +33 -13
- data/lib/dependabot/maven/file_parser/property_value_finder.rb +2 -2
- data/lib/dependabot/maven/file_parser.rb +5 -3
- data/lib/dependabot/maven/file_updater/declaration_finder.rb +2 -1
- data/lib/dependabot/maven/file_updater.rb +2 -2
- data/lib/dependabot/maven/metadata_finder.rb +1 -1
- data/lib/dependabot/maven/update_checker/version_finder.rb +1 -1
- data/lib/dependabot/maven/update_checker.rb +1 -2
- data/lib/dependabot/maven/version.rb +2 -2
- metadata +35 -32
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 898d484d74c6be04f0a0f1287361309f9a3d7ef5f894b584025af9e22bd6f3e0
|
|
4
|
+
data.tar.gz: cf629e5c3da134a26e9db1cb12f89fa227d59f4876ac1210c01ecbd82adcfc34
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f0b15ce696fd8b01de8ef4d328d0d64872f3db4d7e0b785bd73276c23a83a1b68623e9450b9b85407173db0959050e93adff0b63b16c3d15e09ec7ba9a203ce9
|
|
7
|
+
data.tar.gz: 7064c5b7c0b887d9b4098b659e7671ca634aa3002403f4605a292bd64e53f7397004a016943c45f118c7afa5516ac2a9b8879ed88c94a3c2ecbff54691f21195
|
|
@@ -11,7 +11,7 @@ module Dependabot
|
|
|
11
11
|
"profile > modules > module"
|
|
12
12
|
|
|
13
13
|
def self.required_files_in?(filenames)
|
|
14
|
-
(
|
|
14
|
+
filenames.include?("pom.xml")
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
def self.required_files_message
|
|
@@ -58,7 +58,7 @@ module Dependabot
|
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
def recursively_fetch_child_poms(pom, fetched_filenames:)
|
|
61
|
-
base_path = pom.name
|
|
61
|
+
base_path = File.dirname(pom.name)
|
|
62
62
|
doc = Nokogiri::XML(pom.content)
|
|
63
63
|
|
|
64
64
|
doc.css(MODULE_SELECTOR).flat_map do |module_node|
|
|
@@ -66,7 +66,7 @@ module Dependabot
|
|
|
66
66
|
name_parts = [
|
|
67
67
|
base_path,
|
|
68
68
|
relative_path,
|
|
69
|
-
relative_path.end_with?("
|
|
69
|
+
relative_path.end_with?(".xml") ? nil : "pom.xml"
|
|
70
70
|
].compact.reject(&:empty?)
|
|
71
71
|
path = Pathname.new(File.join(*name_parts)).cleanpath.to_path
|
|
72
72
|
|
|
@@ -92,22 +92,18 @@ module Dependabot
|
|
|
92
92
|
def recursively_fetch_relative_path_parents(pom, fetched_filenames:)
|
|
93
93
|
path = parent_path_for_pom(pom)
|
|
94
94
|
|
|
95
|
-
if fetched_filenames.include?(path)
|
|
96
|
-
fetched_filenames.include?(path.gsub("pom.xml", "pom_parent.xml"))
|
|
97
|
-
return []
|
|
98
|
-
end
|
|
95
|
+
return [] if path.nil? || fetched_filenames.include?(path)
|
|
99
96
|
|
|
100
97
|
full_path_parts =
|
|
101
98
|
[directory.gsub(%r{^/}, ""), path].reject(&:empty?).compact
|
|
102
99
|
|
|
103
|
-
full_path = Pathname.new(File.join(*full_path_parts)).
|
|
104
|
-
cleanpath.to_path
|
|
100
|
+
full_path = Pathname.new(File.join(*full_path_parts)).cleanpath.to_path
|
|
105
101
|
|
|
106
102
|
return [] if full_path.start_with?("..")
|
|
107
103
|
|
|
108
104
|
parent_pom = fetch_file_from_host(path)
|
|
109
|
-
|
|
110
|
-
|
|
105
|
+
|
|
106
|
+
return [] unless fetched_pom_is_parent(pom, parent_pom)
|
|
111
107
|
|
|
112
108
|
[
|
|
113
109
|
parent_pom,
|
|
@@ -124,17 +120,41 @@ module Dependabot
|
|
|
124
120
|
doc = Nokogiri::XML(pom.content)
|
|
125
121
|
doc.remove_namespaces!
|
|
126
122
|
|
|
123
|
+
return unless doc.at_xpath("/project/parent")
|
|
124
|
+
|
|
127
125
|
relative_parent_path =
|
|
128
126
|
doc.at_xpath("/project/parent/relativePath")&.content&.strip || ".."
|
|
129
127
|
|
|
130
128
|
name_parts = [
|
|
131
|
-
|
|
129
|
+
File.dirname(pom.name),
|
|
132
130
|
relative_parent_path,
|
|
133
|
-
relative_parent_path.end_with?("
|
|
131
|
+
relative_parent_path.end_with?(".xml") ? nil : "pom.xml"
|
|
134
132
|
].compact.reject(&:empty?)
|
|
135
133
|
|
|
136
134
|
Pathname.new(File.join(*name_parts)).cleanpath.to_path
|
|
137
135
|
end
|
|
136
|
+
|
|
137
|
+
def fetched_pom_is_parent(pom, parent_pom)
|
|
138
|
+
pom_doc = Nokogiri::XML(pom.content).remove_namespaces!
|
|
139
|
+
pom_artifact_id, pom_group_id, pom_version = fetch_pom_unique_ids(pom_doc, true)
|
|
140
|
+
|
|
141
|
+
parent_doc = Nokogiri::XML(parent_pom.content).remove_namespaces!
|
|
142
|
+
parent_artifact_id, parent_group_id, parent_version = fetch_pom_unique_ids(parent_doc, false)
|
|
143
|
+
|
|
144
|
+
if parent_group_id.nil?
|
|
145
|
+
[parent_artifact_id, parent_version] == [pom_artifact_id, pom_version]
|
|
146
|
+
else
|
|
147
|
+
[parent_group_id, parent_artifact_id, parent_version] == [pom_group_id, pom_artifact_id, pom_version]
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
def fetch_pom_unique_ids(doc, check_parent_node)
|
|
152
|
+
parent = check_parent_node ? "/parent" : ""
|
|
153
|
+
group_id = doc.at_xpath("/project#{parent}/groupId")&.content&.strip
|
|
154
|
+
artifact_id = doc.at_xpath("/project#{parent}/artifactId")&.content&.strip
|
|
155
|
+
version = doc.at_xpath("/project#{parent}/version")&.content&.strip
|
|
156
|
+
[artifact_id, group_id, version]
|
|
157
|
+
end
|
|
138
158
|
end
|
|
139
159
|
end
|
|
140
160
|
end
|
|
@@ -36,8 +36,8 @@ module Dependabot
|
|
|
36
36
|
loop do
|
|
37
37
|
candidate_node =
|
|
38
38
|
doc.at_xpath("/project/#{nm}") ||
|
|
39
|
-
doc.at_xpath("/project/properties/#{
|
|
40
|
-
doc.at_xpath("/project/profiles/profile/properties/#{
|
|
39
|
+
doc.at_xpath("/project/properties/#{property_name}") ||
|
|
40
|
+
doc.at_xpath("/project/profiles/profile/properties/#{property_name}")
|
|
41
41
|
break candidate_node if candidate_node
|
|
42
42
|
break unless nm.match?(DOT_SEPARATOR_REGEX)
|
|
43
43
|
|
|
@@ -23,7 +23,8 @@ module Dependabot
|
|
|
23
23
|
# - Any extensions
|
|
24
24
|
DEPENDENCY_SELECTOR = "project > parent, " \
|
|
25
25
|
"dependencies > dependency, " \
|
|
26
|
-
"extensions > extension"
|
|
26
|
+
"extensions > extension, " \
|
|
27
|
+
"annotationProcessorPaths > path"
|
|
27
28
|
PLUGIN_SELECTOR = "plugins > plugin"
|
|
28
29
|
EXTENSION_SELECTOR = "extensions > extension"
|
|
29
30
|
|
|
@@ -271,9 +272,10 @@ module Dependabot
|
|
|
271
272
|
end
|
|
272
273
|
|
|
273
274
|
def pomfiles
|
|
274
|
-
# NOTE: this (correctly) excludes any parent POMs that were downloaded
|
|
275
275
|
@pomfiles ||=
|
|
276
|
-
dependency_files.select
|
|
276
|
+
dependency_files.select do |f|
|
|
277
|
+
f.name.end_with?(".xml") && !f.name.end_with?("extensions.xml")
|
|
278
|
+
end
|
|
277
279
|
end
|
|
278
280
|
|
|
279
281
|
def extensionfiles
|
|
@@ -11,7 +11,8 @@ module Dependabot
|
|
|
11
11
|
class DeclarationFinder
|
|
12
12
|
DECLARATION_REGEX =
|
|
13
13
|
%r{<parent>.*?</parent>|<dependency>.*?</dependency>|
|
|
14
|
-
<plugin>.*?(?:<plugin>.*?</plugin>.*)?</plugin>|<extension>.*?</extension
|
|
14
|
+
<plugin>.*?(?:<plugin>.*?</plugin>.*)?</plugin>|<extension>.*?</extension>|
|
|
15
|
+
<path>.*?</path>}mx
|
|
15
16
|
|
|
16
17
|
attr_reader :dependency, :declaring_requirement, :dependency_files
|
|
17
18
|
|
|
@@ -13,6 +13,7 @@ module Dependabot
|
|
|
13
13
|
def self.updated_files_regex
|
|
14
14
|
[
|
|
15
15
|
/^pom\.xml$/, %r{/pom\.xml$},
|
|
16
|
+
/.*\.xml$/, %r{/.*\.xml$},
|
|
16
17
|
/^extensions.\.xml$/, %r{/extensions\.xml$}
|
|
17
18
|
]
|
|
18
19
|
end
|
|
@@ -31,11 +32,10 @@ module Dependabot
|
|
|
31
32
|
)
|
|
32
33
|
end
|
|
33
34
|
|
|
34
|
-
updated_files.select! { |f| f.name.end_with?("
|
|
35
|
+
updated_files.select! { |f| f.name.end_with?(".xml") }
|
|
35
36
|
updated_files.reject! { |f| dependency_files.include?(f) }
|
|
36
37
|
|
|
37
38
|
raise "No files changed!" if updated_files.none?
|
|
38
|
-
raise "Updated a supporting POM!" if updated_files.any? { |f| f.name.end_with?("pom_parent.xml") }
|
|
39
39
|
|
|
40
40
|
updated_files
|
|
41
41
|
end
|
|
@@ -42,7 +42,7 @@ module Dependabot
|
|
|
42
42
|
any? { |f| dependency_artifact_id.end_with?(f.name) }
|
|
43
43
|
rescue Dependabot::BranchNotFound
|
|
44
44
|
# If we are attempting to find a branch, we should fail over to the default branch and retry once only
|
|
45
|
-
|
|
45
|
+
unless tmp_source.branch.to_s.empty?
|
|
46
46
|
tmp_source.branch = nil
|
|
47
47
|
retry
|
|
48
48
|
end
|
|
@@ -58,7 +58,7 @@ module Dependabot
|
|
|
58
58
|
repositories.map do |repository_details|
|
|
59
59
|
url = repository_details.fetch("url")
|
|
60
60
|
xml = dependency_metadata(repository_details)
|
|
61
|
-
next [] if xml.
|
|
61
|
+
next [] if xml.nil?
|
|
62
62
|
|
|
63
63
|
break xml.css("versions > version").
|
|
64
64
|
select { |node| version_class.correct?(node.content) }.
|
|
@@ -68,8 +68,7 @@ module Dependabot
|
|
|
68
68
|
property_details(property_name: prop_name, callsite_pom: pom)&.
|
|
69
69
|
fetch(:file)
|
|
70
70
|
|
|
71
|
-
declaration_pom_name == "remote_pom.xml"
|
|
72
|
-
declaration_pom_name&.end_with?("pom_parent.xml")
|
|
71
|
+
declaration_pom_name == "remote_pom.xml"
|
|
73
72
|
end
|
|
74
73
|
end
|
|
75
74
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require "dependabot/version"
|
|
3
4
|
require "dependabot/utils"
|
|
4
|
-
require "rubygems_version_patch"
|
|
5
5
|
|
|
6
6
|
# Java versions use dots and dashes when tokenising their versions.
|
|
7
7
|
# Gem::Version converts a "-" to ".pre.", so we override the `to_s` method.
|
|
@@ -10,7 +10,7 @@ require "rubygems_version_patch"
|
|
|
10
10
|
|
|
11
11
|
module Dependabot
|
|
12
12
|
module Maven
|
|
13
|
-
class Version <
|
|
13
|
+
class Version < Dependabot::Version
|
|
14
14
|
NULL_VALUES = %w(0 final ga).freeze
|
|
15
15
|
PREFIXED_TOKEN_HIERARCHY = {
|
|
16
16
|
"." => { qualifier: 1, number: 4 },
|
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.
|
|
4
|
+
version: 0.216.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dependabot
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-04-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: dependabot-common
|
|
@@ -16,28 +16,28 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - '='
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 0.
|
|
19
|
+
version: 0.216.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.216.0
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: debug
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- - "
|
|
31
|
+
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 1.
|
|
33
|
+
version: 1.7.1
|
|
34
34
|
type: :development
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
|
-
- - "
|
|
38
|
+
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 1.
|
|
40
|
+
version: 1.7.1
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: gpgme
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -58,14 +58,14 @@ dependencies:
|
|
|
58
58
|
requirements:
|
|
59
59
|
- - "~>"
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: 4.
|
|
61
|
+
version: 4.2.0
|
|
62
62
|
type: :development
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
66
|
- - "~>"
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: 4.
|
|
68
|
+
version: 4.2.0
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
70
|
name: rake
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -86,70 +86,70 @@ dependencies:
|
|
|
86
86
|
requirements:
|
|
87
87
|
- - "~>"
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: '3.
|
|
89
|
+
version: '3.12'
|
|
90
90
|
type: :development
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
94
|
- - "~>"
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: '3.
|
|
96
|
+
version: '3.12'
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
98
|
name: rspec-its
|
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
|
100
100
|
requirements:
|
|
101
101
|
- - "~>"
|
|
102
102
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: '1.
|
|
103
|
+
version: '1.3'
|
|
104
104
|
type: :development
|
|
105
105
|
prerelease: false
|
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
107
|
requirements:
|
|
108
108
|
- - "~>"
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: '1.
|
|
110
|
+
version: '1.3'
|
|
111
111
|
- !ruby/object:Gem::Dependency
|
|
112
112
|
name: rubocop
|
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
|
114
114
|
requirements:
|
|
115
115
|
- - "~>"
|
|
116
116
|
- !ruby/object:Gem::Version
|
|
117
|
-
version: 1.
|
|
117
|
+
version: 1.48.0
|
|
118
118
|
type: :development
|
|
119
119
|
prerelease: false
|
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
121
|
requirements:
|
|
122
122
|
- - "~>"
|
|
123
123
|
- !ruby/object:Gem::Version
|
|
124
|
-
version: 1.
|
|
124
|
+
version: 1.48.0
|
|
125
125
|
- !ruby/object:Gem::Dependency
|
|
126
126
|
name: rubocop-performance
|
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
|
128
128
|
requirements:
|
|
129
129
|
- - "~>"
|
|
130
130
|
- !ruby/object:Gem::Version
|
|
131
|
-
version: 1.
|
|
131
|
+
version: 1.17.1
|
|
132
132
|
type: :development
|
|
133
133
|
prerelease: false
|
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
|
135
135
|
requirements:
|
|
136
136
|
- - "~>"
|
|
137
137
|
- !ruby/object:Gem::Version
|
|
138
|
-
version: 1.
|
|
138
|
+
version: 1.17.1
|
|
139
139
|
- !ruby/object:Gem::Dependency
|
|
140
140
|
name: simplecov
|
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
|
142
142
|
requirements:
|
|
143
143
|
- - "~>"
|
|
144
144
|
- !ruby/object:Gem::Version
|
|
145
|
-
version: 0.
|
|
145
|
+
version: 0.22.0
|
|
146
146
|
type: :development
|
|
147
147
|
prerelease: false
|
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
|
149
149
|
requirements:
|
|
150
150
|
- - "~>"
|
|
151
151
|
- !ruby/object:Gem::Version
|
|
152
|
-
version: 0.
|
|
152
|
+
version: 0.22.0
|
|
153
153
|
- !ruby/object:Gem::Dependency
|
|
154
154
|
name: simplecov-console
|
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -182,33 +182,34 @@ dependencies:
|
|
|
182
182
|
name: vcr
|
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
|
184
184
|
requirements:
|
|
185
|
-
- -
|
|
185
|
+
- - "~>"
|
|
186
186
|
- !ruby/object:Gem::Version
|
|
187
|
-
version: 6.1
|
|
187
|
+
version: '6.1'
|
|
188
188
|
type: :development
|
|
189
189
|
prerelease: false
|
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
|
191
191
|
requirements:
|
|
192
|
-
- -
|
|
192
|
+
- - "~>"
|
|
193
193
|
- !ruby/object:Gem::Version
|
|
194
|
-
version: 6.1
|
|
194
|
+
version: '6.1'
|
|
195
195
|
- !ruby/object:Gem::Dependency
|
|
196
196
|
name: webmock
|
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
|
198
198
|
requirements:
|
|
199
199
|
- - "~>"
|
|
200
200
|
- !ruby/object:Gem::Version
|
|
201
|
-
version: '3.
|
|
201
|
+
version: '3.18'
|
|
202
202
|
type: :development
|
|
203
203
|
prerelease: false
|
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
|
205
205
|
requirements:
|
|
206
206
|
- - "~>"
|
|
207
207
|
- !ruby/object:Gem::Version
|
|
208
|
-
version: '3.
|
|
209
|
-
description:
|
|
210
|
-
|
|
211
|
-
|
|
208
|
+
version: '3.18'
|
|
209
|
+
description: Dependabot-Maven provides support for bumping Maven packages via Dependabot.
|
|
210
|
+
If you want support for multiple package managers, you probably want the meta-gem
|
|
211
|
+
dependabot-omnibus.
|
|
212
|
+
email: opensource@github.com
|
|
212
213
|
executables: []
|
|
213
214
|
extensions: []
|
|
214
215
|
extra_rdoc_files: []
|
|
@@ -233,7 +234,9 @@ files:
|
|
|
233
234
|
homepage: https://github.com/dependabot/dependabot-core
|
|
234
235
|
licenses:
|
|
235
236
|
- Nonstandard
|
|
236
|
-
metadata:
|
|
237
|
+
metadata:
|
|
238
|
+
issue_tracker_uri: https://github.com/dependabot/dependabot-core/issues
|
|
239
|
+
changelog_uri: https://github.com/dependabot/dependabot-core/blob/main/CHANGELOG.md
|
|
237
240
|
post_install_message:
|
|
238
241
|
rdoc_options: []
|
|
239
242
|
require_paths:
|
|
@@ -249,8 +252,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
249
252
|
- !ruby/object:Gem::Version
|
|
250
253
|
version: 3.1.0
|
|
251
254
|
requirements: []
|
|
252
|
-
rubygems_version: 3.3.
|
|
255
|
+
rubygems_version: 3.3.26
|
|
253
256
|
signing_key:
|
|
254
257
|
specification_version: 4
|
|
255
|
-
summary:
|
|
258
|
+
summary: Provides Dependabot support for Maven
|
|
256
259
|
test_files: []
|