dependabot-nuget 0.176.0 → 0.178.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dependabot/nuget/requirement.rb +2 -0
- data/lib/dependabot/nuget/update_checker/repository_finder.rb +3 -3
- data/lib/dependabot/nuget/update_checker/requirements_updater.rb +2 -0
- data/lib/dependabot/nuget/update_checker/version_finder.rb +2 -1
- data/lib/dependabot/nuget/version.rb +23 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8389cfea58bf0a72e3170737916609e4110af64a45c6f0508f07e7c8be1239e2
|
4
|
+
data.tar.gz: c57795d1262f1ca15213def48416566f09431c80d1139c9f73b6e4292bf8733d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3d8a3647c5c0d871192a58054ea410fea2852fd7b39a0c1af0fe5883adeb37e94e64773481aedcf291b0fa2136ccb9a7d30692fb699ee55663d76c0638947b0
|
7
|
+
data.tar.gz: 5827fdaebbaf85e3272ce29226baed7453d66ee870158229b772a334924966c80958030150516b6b4ccb7f5cc46214653e1e81772e9b46f77dc4756367525124
|
@@ -59,7 +59,7 @@ module Dependabot
|
|
59
59
|
end
|
60
60
|
if search_url
|
61
61
|
details[:search_url] =
|
62
|
-
search_url + "?q=#{dependency.name.downcase}&prerelease=true"
|
62
|
+
search_url + "?q=#{dependency.name.downcase}&prerelease=true&semVerLevel=2.0.0"
|
63
63
|
end
|
64
64
|
details
|
65
65
|
rescue JSON::ParserError
|
@@ -196,8 +196,8 @@ module Dependabot
|
|
196
196
|
repository_url: DEFAULT_REPOSITORY_URL,
|
197
197
|
versions_url: "https://api.nuget.org/v3-flatcontainer/"\
|
198
198
|
"#{dependency.name.downcase}/index.json",
|
199
|
-
search_url: "https://
|
200
|
-
"?q=#{dependency.name.downcase}&prerelease=true",
|
199
|
+
search_url: "https://azuresearch-usnc.nuget.org/query"\
|
200
|
+
"?q=#{dependency.name.downcase}&prerelease=true&semVerLevel=2.0.0",
|
201
201
|
auth_header: {},
|
202
202
|
repository_type: "v3"
|
203
203
|
}
|
@@ -172,6 +172,7 @@ module Dependabot
|
|
172
172
|
|
173
173
|
dependency.requirements.any? do |req|
|
174
174
|
reqs = parse_requirement_string(req.fetch(:requirement) || "")
|
175
|
+
return true if reqs.any? { |r| r == "*-*" }
|
175
176
|
next unless reqs.any? { |r| r.include?("-") }
|
176
177
|
|
177
178
|
requirement_class.
|
@@ -329,7 +330,7 @@ module Dependabot
|
|
329
330
|
# For large JSON files we sometimes need a little longer than for
|
330
331
|
# other languages. For example, see:
|
331
332
|
# https://dotnet.myget.org/F/aspnetcore-dev/api/v3/query?
|
332
|
-
# q=microsoft.aspnetcore.mvc&prerelease=true
|
333
|
+
# q=microsoft.aspnetcore.mvc&prerelease=true&semVerLevel=2.0.0
|
333
334
|
{
|
334
335
|
connect_timeout: 30,
|
335
336
|
write_timeout: 30,
|
@@ -55,6 +55,8 @@ module Dependabot
|
|
55
55
|
end
|
56
56
|
|
57
57
|
# rubocop:disable Metrics/PerceivedComplexity
|
58
|
+
# rubocop:disable Metrics/CyclomaticComplexity
|
59
|
+
# rubocop:disable Metrics/AbcSize
|
58
60
|
def compare_prerelease_part(other)
|
59
61
|
release_str = @version_string.split("-").first&.split("+")&.first || ""
|
60
62
|
prerelease_string = @version_string.
|
@@ -74,11 +76,31 @@ module Dependabot
|
|
74
76
|
|
75
77
|
return -1 if prerelease_string && !other_prerelease_string
|
76
78
|
return 1 if !prerelease_string && other_prerelease_string
|
79
|
+
return 0 if !prerelease_string && !other_prerelease_string
|
77
80
|
|
78
|
-
prerelease_string
|
81
|
+
split_prerelease_string = prerelease_string.split(".")
|
82
|
+
other_split_prerelease_string = other_prerelease_string.split(".")
|
83
|
+
|
84
|
+
split_prerelease_string.zip(other_split_prerelease_string).each do |lhs, rhs|
|
85
|
+
result = compare_dot_separated_part(lhs, rhs)
|
86
|
+
return result unless result.zero?
|
87
|
+
end
|
88
|
+
|
89
|
+
0
|
79
90
|
end
|
80
91
|
|
81
92
|
# rubocop:enable Metrics/PerceivedComplexity
|
93
|
+
# rubocop:enable Metrics/CyclomaticComplexity
|
94
|
+
# rubocop:enable Metrics/AbcSize
|
95
|
+
|
96
|
+
def compare_dot_separated_part(lhs, rhs)
|
97
|
+
return -1 if lhs.nil?
|
98
|
+
return 1 if rhs.nil?
|
99
|
+
|
100
|
+
return lhs.to_i <=> rhs.to_i if lhs.match?(/^\d+$/) && rhs.match?(/^\d+$/)
|
101
|
+
|
102
|
+
lhs <=> rhs
|
103
|
+
end
|
82
104
|
|
83
105
|
def compare_build_info(other)
|
84
106
|
return build_info.nil? ? 0 : 1 unless other.is_a?(Nuget::Version)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dependabot-nuget
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.178.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-03-14 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.
|
19
|
+
version: 0.178.1
|
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.178.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|