dependabot-maven 0.355.0 → 0.356.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 939776aad30eddb24b7f46aba6efaf40a3d2a2283d9b4e7f85dc834324ad8417
|
|
4
|
+
data.tar.gz: 3c8e2245756dd20c57a9a436f085764e6f3b0640b17dce77d44a1e86b96f12a2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 13d3ce09d720eacd2726597e773beab4c124ade4bc77e166336250dd59332905e149b58285186d8ec64eccfdfd58af9bf3e2cc02c4caac11e49a5b89b501bfcb
|
|
7
|
+
data.tar.gz: 485059691e0adca6ed1effa6df241abc34a2fffded27dcb5f67f9f8982e46107a8f177581580d0719db9d5de1e172657f0b03b70a72445b212e459ed38d0c7f1
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
require "sorbet-runtime"
|
|
5
|
+
require "dependabot/file_fetchers"
|
|
6
|
+
require "dependabot/file_fetchers/base"
|
|
7
|
+
require "dependabot/package/package_latest_version_finder"
|
|
8
|
+
|
|
9
|
+
module Dependabot
|
|
10
|
+
module Maven
|
|
11
|
+
module Shared
|
|
12
|
+
class SharedVersionFinder < Dependabot::Package::PackageLatestVersionFinder
|
|
13
|
+
extend T::Sig
|
|
14
|
+
|
|
15
|
+
# Regex to match common Maven release qualifiers that indicate stable releases.
|
|
16
|
+
# See https://github.com/apache/maven/blob/848fbb4bf2d427b72bdb2471c22fced7ebd9a7a1/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java#L315-L320
|
|
17
|
+
MAVEN_RELEASE_QUALIFIERS = /
|
|
18
|
+
^.+[-._](
|
|
19
|
+
RELEASE|# Official release
|
|
20
|
+
FINAL|# Final build
|
|
21
|
+
GA# General Availability
|
|
22
|
+
)$
|
|
23
|
+
/ix
|
|
24
|
+
|
|
25
|
+
# Common Maven pre-release qualifiers.
|
|
26
|
+
# They often indicate versions that are not yet stable but that are released to the public for testing.
|
|
27
|
+
# Examples: 1.0.0-RC1, 2.0.0-ALPHA2, 3.1.0-BETA, 4.0.0-DEV5, etc.
|
|
28
|
+
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html#version-identifier
|
|
29
|
+
MAVEN_PRE_RELEASE_QUALIFIERS = /
|
|
30
|
+
[-._]?(
|
|
31
|
+
# --- Qualifiers that usually REQUIRE a number ---
|
|
32
|
+
# Examples: "RC1", "BETA2", "M3", "ALPHA-1", "EAP.2"
|
|
33
|
+
# The number differentiates multiple pre-releases; a version like "1.0.0-RC"
|
|
34
|
+
(?i)(?:RC|CR|M|MILESTONE|ALPHA|BETA|EA|EAP)(?:[-._]?\d+)?
|
|
35
|
+
|
|
|
36
|
+
# --- Qualifiers that do NOT usually have numbers ---
|
|
37
|
+
DEV|
|
|
38
|
+
PREVIEW|
|
|
39
|
+
PRERELEASE|
|
|
40
|
+
EXPERIMENTAL|
|
|
41
|
+
UNSTABLE
|
|
42
|
+
)$
|
|
43
|
+
/ix
|
|
44
|
+
|
|
45
|
+
MAVEN_SNAPSHOT_QUALIFIER = /-SNAPSHOT$/i
|
|
46
|
+
|
|
47
|
+
sig { params(comparison_version: Dependabot::Version).returns(T::Boolean) }
|
|
48
|
+
def matches_dependency_version_type?(comparison_version)
|
|
49
|
+
return true unless dependency.version
|
|
50
|
+
|
|
51
|
+
current_version_string = dependency.version
|
|
52
|
+
candidate_version_string = comparison_version.to_s
|
|
53
|
+
|
|
54
|
+
current_is_pre_release = current_version_string&.match?(MAVEN_PRE_RELEASE_QUALIFIERS)
|
|
55
|
+
candidate_is_pre_release = candidate_version_string.match?(MAVEN_PRE_RELEASE_QUALIFIERS)
|
|
56
|
+
|
|
57
|
+
# Pre-releases are only compatible with other pre-releases
|
|
58
|
+
# When this happens, the suffix does not need to match exactly
|
|
59
|
+
# This allows transitions between 1.0.0-RC1 and 1.0.0-CR2, for example
|
|
60
|
+
return true if current_is_pre_release && candidate_is_pre_release
|
|
61
|
+
|
|
62
|
+
current_is_snapshot = current_version_string&.match?(MAVEN_SNAPSHOT_QUALIFIER)
|
|
63
|
+
# If the current version is a pre-release or a snapshot, allow upgrading to a stable release
|
|
64
|
+
# This can help move from pre-release to the stable version that supersedes it,
|
|
65
|
+
# but this should not happen vice versa as a stable release should not be downgraded to a pre-release
|
|
66
|
+
return true if (current_is_pre_release || current_is_snapshot) && !candidate_is_pre_release
|
|
67
|
+
|
|
68
|
+
current_suffix = extract_version_suffix(current_version_string)
|
|
69
|
+
candidate_suffix = extract_version_suffix(candidate_version_string)
|
|
70
|
+
|
|
71
|
+
# If both versions share the exact suffix or no suffix, they are compatible
|
|
72
|
+
current_suffix == candidate_suffix
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
private
|
|
76
|
+
|
|
77
|
+
# Extracts the qualifier/suffix from a Maven version string.
|
|
78
|
+
#
|
|
79
|
+
# Maven versions consist of numeric parts and optional string qualifiers.
|
|
80
|
+
# This method identifies the suffix by finding the first segment (separated by '.')
|
|
81
|
+
# that contains a non-digit character.
|
|
82
|
+
sig { params(version_string: T.nilable(String)).returns(T.nilable(String)) }
|
|
83
|
+
def extract_version_suffix(version_string)
|
|
84
|
+
return nil unless version_string
|
|
85
|
+
|
|
86
|
+
# Exclude common Maven release qualifiers that indicate stable releases
|
|
87
|
+
return nil if version_string.match?(MAVEN_RELEASE_QUALIFIERS)
|
|
88
|
+
|
|
89
|
+
version_string.split(".").each do |part|
|
|
90
|
+
# Skip fully numeric segments
|
|
91
|
+
next if part.match?(/\A\d+\z/)
|
|
92
|
+
|
|
93
|
+
# strip leading digits and capture the suffix
|
|
94
|
+
suffix = part.sub(/\A\d+/, "")
|
|
95
|
+
# Normalize delimiters to ensure consistent comparison
|
|
96
|
+
# e.g., "beta-1" and "beta_1" are treated the same
|
|
97
|
+
suffix = suffix.tr("-", "_")
|
|
98
|
+
|
|
99
|
+
# Ignore purely numeric suffixes (e.g., "-1", "_2")
|
|
100
|
+
# e.g., "1.0.0-1" or "1.0.0_2" are not considered to have a meaningful suffix
|
|
101
|
+
return nil if suffix.match?(/^_?\d+$/)
|
|
102
|
+
|
|
103
|
+
# Must contain a hyphen to be considered a valid suffix
|
|
104
|
+
return suffix if suffix.include?("-") || suffix.include?("_")
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
nil
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
sig { override.returns(T.nilable(Dependabot::Package::PackageDetails)) }
|
|
111
|
+
def package_details
|
|
112
|
+
raise NotImplementedError, "Subclasses must implement `package_details`"
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
end
|
|
@@ -6,16 +6,15 @@ require "dependabot/package/release_cooldown_options"
|
|
|
6
6
|
require "dependabot/update_checkers/version_filters"
|
|
7
7
|
require "dependabot/maven/package/package_details_fetcher"
|
|
8
8
|
require "dependabot/maven/update_checker"
|
|
9
|
+
require "dependabot/maven/shared/shared_version_finder"
|
|
9
10
|
require "sorbet-runtime"
|
|
10
11
|
|
|
11
12
|
module Dependabot
|
|
12
13
|
module Maven
|
|
13
14
|
class UpdateChecker
|
|
14
|
-
class VersionFinder < Dependabot::
|
|
15
|
+
class VersionFinder < Dependabot::Maven::Shared::SharedVersionFinder
|
|
15
16
|
extend T::Sig
|
|
16
17
|
|
|
17
|
-
TYPE_SUFFICES = %w(jre android java native_mt agp).freeze
|
|
18
|
-
|
|
19
18
|
sig do
|
|
20
19
|
params(
|
|
21
20
|
dependency: Dependabot::Dependency,
|
|
@@ -192,27 +191,6 @@ module Dependabot
|
|
|
192
191
|
T.must(dependency.numeric_version) >= version_class.new(100)
|
|
193
192
|
end
|
|
194
193
|
|
|
195
|
-
sig { params(comparison_version: Dependabot::Version).returns(T::Boolean) }
|
|
196
|
-
def matches_dependency_version_type?(comparison_version)
|
|
197
|
-
return true unless dependency.version
|
|
198
|
-
|
|
199
|
-
current_type = dependency.version
|
|
200
|
-
&.gsub("native-mt", "native_mt")
|
|
201
|
-
&.split(/[.\-]/)
|
|
202
|
-
&.find do |type|
|
|
203
|
-
TYPE_SUFFICES.find { |s| type.include?(s) }
|
|
204
|
-
end
|
|
205
|
-
|
|
206
|
-
version_type = comparison_version.to_s
|
|
207
|
-
.gsub("native-mt", "native_mt")
|
|
208
|
-
.split(/[.\-]/)
|
|
209
|
-
.find do |type|
|
|
210
|
-
TYPE_SUFFICES.find { |s| type.include?(s) }
|
|
211
|
-
end
|
|
212
|
-
|
|
213
|
-
current_type == version_type
|
|
214
|
-
end
|
|
215
|
-
|
|
216
194
|
sig { returns(T.class_of(Dependabot::Version)) }
|
|
217
195
|
def version_class
|
|
218
196
|
dependency.version_class
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dependabot-maven
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.356.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dependabot
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - '='
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.
|
|
18
|
+
version: 0.356.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - '='
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 0.
|
|
25
|
+
version: 0.356.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: rexml
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -272,6 +272,7 @@ files:
|
|
|
272
272
|
- lib/dependabot/maven/package_manager.rb
|
|
273
273
|
- lib/dependabot/maven/pom.xml
|
|
274
274
|
- lib/dependabot/maven/requirement.rb
|
|
275
|
+
- lib/dependabot/maven/shared/shared_version_finder.rb
|
|
275
276
|
- lib/dependabot/maven/token_bucket.rb
|
|
276
277
|
- lib/dependabot/maven/update_checker.rb
|
|
277
278
|
- lib/dependabot/maven/update_checker/property_updater.rb
|
|
@@ -285,7 +286,7 @@ licenses:
|
|
|
285
286
|
- MIT
|
|
286
287
|
metadata:
|
|
287
288
|
bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
|
|
288
|
-
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.
|
|
289
|
+
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.356.0
|
|
289
290
|
rdoc_options: []
|
|
290
291
|
require_paths:
|
|
291
292
|
- lib
|