dependabot-rust_toolchain 0.330.0 → 0.332.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: 8d418c7667f676f90e91dac96b192cd5f56b41d80dc1ff2b4cab07934532f14d
|
4
|
+
data.tar.gz: 14c98e7fbcaf63aaef5e0714c7c5536418ea865ed8d40d3981f40ed796326b93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bbeb2c0d30174f1a50f31ce653d12cdc97567d410830ccc3237ef79cf3f6632114dca567e6acbc3e8fdad85ebcc02e9215d2200f6dc13051983ba76da7f7036
|
7
|
+
data.tar.gz: 486fbf3aecb8bfa033e186808368318662b95beeaf4d77e14b577ef93614b49a38f60df552e0a466840d64b31559f36cf2b60fb9c98a6ce05eb34bf629de5219
|
@@ -59,32 +59,12 @@ module Dependabot
|
|
59
59
|
current_channel = current_version.channel
|
60
60
|
return [] unless current_channel
|
61
61
|
|
62
|
-
|
63
|
-
|
64
|
-
# There are no updates for channels
|
65
|
-
# i.e. "stable", "beta", "nightly"
|
66
|
-
return [] if current_type == ChannelType::Stability
|
62
|
+
return [] if stability_channel_without_updates?(current_channel)
|
67
63
|
|
68
64
|
is_current_major_minor = major_minor_format?(current_version.to_s)
|
69
65
|
|
70
|
-
channel_matched_releases = releases.
|
71
|
-
|
72
|
-
release_channel = release_rust_version.channel
|
73
|
-
next unless release_channel
|
74
|
-
|
75
|
-
# Check that the release version is in the same channel type
|
76
|
-
next unless release_channel.channel_type == current_type
|
77
|
-
|
78
|
-
next release unless release_channel.channel_type == ChannelType::Version
|
79
|
-
|
80
|
-
# For version channels, we need to ensure that the version format matches
|
81
|
-
is_release_major_minor = major_minor_format?(release_rust_version.to_s)
|
82
|
-
case [is_current_major_minor, is_release_major_minor]
|
83
|
-
in [true, true] | [false, false]
|
84
|
-
release
|
85
|
-
else
|
86
|
-
nil
|
87
|
-
end
|
66
|
+
channel_matched_releases = releases.select do |release|
|
67
|
+
compatible_release?(release, current_channel, is_current_major_minor)
|
88
68
|
end
|
89
69
|
|
90
70
|
channel_matched_releases.uniq do |release|
|
@@ -92,6 +72,60 @@ module Dependabot
|
|
92
72
|
end
|
93
73
|
end
|
94
74
|
|
75
|
+
sig { params(channel: T.untyped).returns(T::Boolean) }
|
76
|
+
def stability_channel_without_updates?(channel)
|
77
|
+
channel.channel_type == ChannelType::Stability
|
78
|
+
end
|
79
|
+
|
80
|
+
sig do
|
81
|
+
params(
|
82
|
+
release: Dependabot::Package::PackageRelease,
|
83
|
+
current_channel: T.untyped,
|
84
|
+
is_current_major_minor: T::Boolean
|
85
|
+
)
|
86
|
+
.returns(T::Boolean)
|
87
|
+
end
|
88
|
+
def compatible_release?(release, current_channel, is_current_major_minor)
|
89
|
+
release_rust_version = T.cast(release.version, Dependabot::RustToolchain::Version)
|
90
|
+
release_channel = release_rust_version.channel
|
91
|
+
return false unless release_channel
|
92
|
+
|
93
|
+
return false unless matching_channel_type?(release_channel, current_channel)
|
94
|
+
return false unless matching_dated_stability?(release_channel, current_channel)
|
95
|
+
return true unless version_channel?(release_channel)
|
96
|
+
|
97
|
+
matching_version_format?(release_rust_version, is_current_major_minor)
|
98
|
+
end
|
99
|
+
|
100
|
+
sig { params(release_channel: T.untyped, current_channel: T.untyped).returns(T::Boolean) }
|
101
|
+
def matching_channel_type?(release_channel, current_channel)
|
102
|
+
release_channel.channel_type == current_channel.channel_type
|
103
|
+
end
|
104
|
+
|
105
|
+
sig { params(release_channel: T.untyped, current_channel: T.untyped).returns(T::Boolean) }
|
106
|
+
def matching_dated_stability?(release_channel, current_channel)
|
107
|
+
return true unless current_channel.channel_type == ChannelType::DatedStability
|
108
|
+
|
109
|
+
release_channel.stability == current_channel.stability
|
110
|
+
end
|
111
|
+
|
112
|
+
sig { params(channel: T.untyped).returns(T::Boolean) }
|
113
|
+
def version_channel?(channel)
|
114
|
+
channel.channel_type == ChannelType::Version
|
115
|
+
end
|
116
|
+
|
117
|
+
sig do
|
118
|
+
params(
|
119
|
+
release_version: Dependabot::RustToolchain::Version,
|
120
|
+
is_current_major_minor: T::Boolean
|
121
|
+
)
|
122
|
+
.returns(T::Boolean)
|
123
|
+
end
|
124
|
+
def matching_version_format?(release_version, is_current_major_minor)
|
125
|
+
is_release_major_minor = major_minor_format?(release_version.to_s)
|
126
|
+
is_current_major_minor == is_release_major_minor
|
127
|
+
end
|
128
|
+
|
95
129
|
# Check if a version string is in major.minor format (e.g., "1.72" vs "1.72.0")
|
96
130
|
sig { params(version_string: String).returns(T::Boolean) }
|
97
131
|
def major_minor_format?(version_string)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dependabot-rust_toolchain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.332.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.332.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.332.0
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: debug
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
@@ -259,7 +259,7 @@ licenses:
|
|
259
259
|
- MIT
|
260
260
|
metadata:
|
261
261
|
bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
|
262
|
-
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.
|
262
|
+
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.332.0
|
263
263
|
rdoc_options: []
|
264
264
|
require_paths:
|
265
265
|
- lib
|