dependabot-hex 0.288.0 → 0.290.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dependabot/hex/file_parser.rb +52 -0
- data/lib/dependabot/hex/language.rb +21 -0
- data/lib/dependabot/hex/package_manager.rb +41 -0
- metadata +10 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cd59b11d59aea71eed67b694d5dfa8b898c94401bb3a89b32a39e754cc4020f
|
4
|
+
data.tar.gz: ff9124cf8fa64d54c9f12a3f4b7a1246365978a4c570f90a037acc69243d3a40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbb8aaf473f7fe4c5d919dae5dc31bb0a1c99975a182027e8f3d9fb55ceab87ffc5a284514dbb35a37648842ec13b32b7e8ec0ec618a5a5af3fad2f7d962ab07
|
7
|
+
data.tar.gz: 7ce62f94e8ca0dd30471a8172095eb951bf0a775675c9f959d60b923fb6fdb94b41551a4bb5044faccc830fc61ec0d6876acb96be77d93f364897f92bc4457dd
|
@@ -7,12 +7,16 @@ require "dependabot/file_parsers"
|
|
7
7
|
require "dependabot/file_parsers/base"
|
8
8
|
require "dependabot/hex/file_updater/mixfile_sanitizer"
|
9
9
|
require "dependabot/hex/native_helpers"
|
10
|
+
require "dependabot/hex/language"
|
11
|
+
require "dependabot/hex/package_manager"
|
12
|
+
require "dependabot/hex/requirement"
|
10
13
|
require "dependabot/shared_helpers"
|
11
14
|
require "dependabot/errors"
|
12
15
|
|
13
16
|
# For docs, see https://hexdocs.pm/mix/Mix.Tasks.Deps.html
|
14
17
|
module Dependabot
|
15
18
|
module Hex
|
19
|
+
extend T::Sig
|
16
20
|
class FileParser < Dependabot::FileParsers::Base
|
17
21
|
extend T::Sig
|
18
22
|
require "dependabot/file_parsers/base/dependency_set"
|
@@ -44,6 +48,17 @@ module Dependabot
|
|
44
48
|
dependency_set.dependencies.sort_by(&:name)
|
45
49
|
end
|
46
50
|
|
51
|
+
sig { returns(Ecosystem) }
|
52
|
+
def ecosystem
|
53
|
+
@ecosystem ||= T.let(begin
|
54
|
+
Ecosystem.new(
|
55
|
+
name: ECOSYSTEM,
|
56
|
+
package_manager: package_manager,
|
57
|
+
language: language
|
58
|
+
)
|
59
|
+
end, T.nilable(Dependabot::Ecosystem))
|
60
|
+
end
|
61
|
+
|
47
62
|
private
|
48
63
|
|
49
64
|
sig { returns(T::Array[T.any(T::Hash[String, String], T::Hash[String, T.untyped])]) }
|
@@ -137,6 +152,43 @@ module Dependabot
|
|
137
152
|
def lockfile
|
138
153
|
@lockfile ||= T.let(get_original_file("mix.lock"), T.nilable(Dependabot::DependencyFile))
|
139
154
|
end
|
155
|
+
|
156
|
+
sig { returns(Ecosystem::VersionManager) }
|
157
|
+
def package_manager
|
158
|
+
@package_manager ||= T.let(
|
159
|
+
PackageManager.new(hex_version),
|
160
|
+
T.nilable(Dependabot::Hex::PackageManager)
|
161
|
+
)
|
162
|
+
end
|
163
|
+
|
164
|
+
sig { returns(T.nilable(Ecosystem::VersionManager)) }
|
165
|
+
def language
|
166
|
+
@language ||= T.let(
|
167
|
+
Language.new(elixir_version),
|
168
|
+
T.nilable(Dependabot::Hex::Language)
|
169
|
+
)
|
170
|
+
end
|
171
|
+
|
172
|
+
sig { returns(String) }
|
173
|
+
def hex_version
|
174
|
+
T.must(T.must(hex_info).fetch(:hex_version))
|
175
|
+
end
|
176
|
+
|
177
|
+
sig { returns(String) }
|
178
|
+
def elixir_version
|
179
|
+
T.must(T.must(hex_info).fetch(:elixir_version))
|
180
|
+
end
|
181
|
+
|
182
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
|
183
|
+
def hex_info
|
184
|
+
@hex_info ||= T.let(begin
|
185
|
+
version = SharedHelpers.run_shell_command("mix hex.info")
|
186
|
+
{
|
187
|
+
hex_version: version.match(/Hex: \s*(\d+\.\d+(.\d+)*)/)&.captures&.first,
|
188
|
+
elixir_version: version.match(/Elixir: \s*(\d+\.\d+(.\d+)*)/)&.captures&.first
|
189
|
+
}
|
190
|
+
end, T.nilable(T::Hash[Symbol, T.nilable(String)]))
|
191
|
+
end
|
140
192
|
end
|
141
193
|
end
|
142
194
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# typed: strong
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "sorbet-runtime"
|
5
|
+
require "dependabot/ecosystem"
|
6
|
+
require "dependabot/hex/version"
|
7
|
+
|
8
|
+
module Dependabot
|
9
|
+
module Hex
|
10
|
+
LANGUAGE = "elixir"
|
11
|
+
|
12
|
+
class Language < Dependabot::Ecosystem::VersionManager
|
13
|
+
extend T::Sig
|
14
|
+
|
15
|
+
sig { params(raw_version: String).void }
|
16
|
+
def initialize(raw_version)
|
17
|
+
super(LANGUAGE, Version.new(raw_version))
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# typed: strong
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "sorbet-runtime"
|
5
|
+
require "dependabot/ecosystem"
|
6
|
+
require "dependabot/hex/version"
|
7
|
+
|
8
|
+
module Dependabot
|
9
|
+
module Hex
|
10
|
+
ECOSYSTEM = "hex"
|
11
|
+
PACKAGE_MANAGER = "hex"
|
12
|
+
SUPPORTED_HEX_VERSIONS = T.let([].freeze, T::Array[Dependabot::Version])
|
13
|
+
|
14
|
+
# When a version is going to be unsupported, it will be added here
|
15
|
+
DEPRECATED_HEX_VERSIONS = T.let([].freeze, T::Array[Dependabot::Version])
|
16
|
+
|
17
|
+
class PackageManager < Dependabot::Ecosystem::VersionManager
|
18
|
+
extend T::Sig
|
19
|
+
|
20
|
+
sig { params(raw_version: String).void }
|
21
|
+
def initialize(raw_version)
|
22
|
+
super(
|
23
|
+
PACKAGE_MANAGER,
|
24
|
+
Version.new(raw_version),
|
25
|
+
DEPRECATED_HEX_VERSIONS,
|
26
|
+
SUPPORTED_HEX_VERSIONS
|
27
|
+
)
|
28
|
+
end
|
29
|
+
|
30
|
+
sig { returns(T::Boolean) }
|
31
|
+
def deprecated?
|
32
|
+
false
|
33
|
+
end
|
34
|
+
|
35
|
+
sig { returns(T::Boolean) }
|
36
|
+
def unsupported?
|
37
|
+
false
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dependabot-hex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.290.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-12 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.290.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.290.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -259,8 +259,10 @@ files:
|
|
259
259
|
- lib/dependabot/hex/file_updater/mixfile_requirement_updater.rb
|
260
260
|
- lib/dependabot/hex/file_updater/mixfile_sanitizer.rb
|
261
261
|
- lib/dependabot/hex/file_updater/mixfile_updater.rb
|
262
|
+
- lib/dependabot/hex/language.rb
|
262
263
|
- lib/dependabot/hex/metadata_finder.rb
|
263
264
|
- lib/dependabot/hex/native_helpers.rb
|
265
|
+
- lib/dependabot/hex/package_manager.rb
|
264
266
|
- lib/dependabot/hex/requirement.rb
|
265
267
|
- lib/dependabot/hex/update_checker.rb
|
266
268
|
- lib/dependabot/hex/update_checker/file_preparer.rb
|
@@ -272,8 +274,8 @@ licenses:
|
|
272
274
|
- MIT
|
273
275
|
metadata:
|
274
276
|
bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
|
275
|
-
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.
|
276
|
-
post_install_message:
|
277
|
+
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.290.0
|
278
|
+
post_install_message:
|
277
279
|
rdoc_options: []
|
278
280
|
require_paths:
|
279
281
|
- lib
|
@@ -289,7 +291,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
289
291
|
version: 3.1.0
|
290
292
|
requirements: []
|
291
293
|
rubygems_version: 3.5.9
|
292
|
-
signing_key:
|
294
|
+
signing_key:
|
293
295
|
specification_version: 4
|
294
296
|
summary: Provides Dependabot support for Elixir (hex)
|
295
297
|
test_files: []
|