dependabot-elm 0.244.0 → 0.246.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1079a9573d7c407f03fd6e0432841e03d18bb75c5a9bdc324991e64c950a6f37
4
- data.tar.gz: ee28b8582c761fd8c7fa1f3af4a24a1a4527bb1488a325c7de66ded29d8d71a9
3
+ metadata.gz: 15272580caa7d1e7d34ee7d783bbb3138ce046a8ba6467738c3280ab0fd6a6f4
4
+ data.tar.gz: f162ead30c731f700fc952d4efa8eecac84fffa8c805a793e11a4a71e71c707c
5
5
  SHA512:
6
- metadata.gz: 6c5c1d358939d5b6c263b625f148e10ba3b5d7da039a6eff1cd0b00e203ef08995b2ad9b5ca2170c623c0dea438d465c0f62ec7ef8f06181f4e8ac9eac11642c
7
- data.tar.gz: 28e7fe795c368b86cd6b36b2613b4d83214298ae44d595a37d1a619852ed6069c474a8c8267f28fa0a40ef11febd99fae0b618990f6dcd3f4522c90024cf9a1a
6
+ metadata.gz: a97b2a176c70252cbbf9bd13852b9660399f9e54997fe0197a9b4225d7c91a2ca3b0200bb0e2fbb1713ea2c46089e35ee5caae8e3814fd561df12a2b70b9874b
7
+ data.tar.gz: d2544a5ea0840929773c827f06d714be99bab1273db547a3f534e38261435cc4e04885d44a74dafa1d1440273f93d55508ddbfdf01bff345eab0156bb79cf437
@@ -1,4 +1,4 @@
1
- # typed: false
1
+ # typed: strict
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require "sorbet-runtime"
@@ -13,8 +13,10 @@ module Dependabot
13
13
  extend T::Sig
14
14
 
15
15
  ELM_PATTERN_RAW =
16
- "(#{Elm::Version::VERSION_PATTERN}) (<=?) v (<=?) " \
17
- "(#{Elm::Version::VERSION_PATTERN})".freeze
16
+ T.let(
17
+ "(#{Elm::Version::VERSION_PATTERN}) (<=?) v (<=?) (#{Elm::Version::VERSION_PATTERN})".freeze,
18
+ String
19
+ )
18
20
  ELM_PATTERN = /\A#{ELM_PATTERN_RAW}\z/
19
21
  ELM_EXACT_PATTERN = /\A#{Elm::Version::VERSION_PATTERN}\z/
20
22
 
@@ -25,6 +27,7 @@ module Dependabot
25
27
  [new(requirement_string)]
26
28
  end
27
29
 
30
+ sig { params(requirements: T.any(T.nilable(String), T::Array[T.nilable(String)])).void }
28
31
  def initialize(*requirements)
29
32
  requirements = requirements.flatten.flat_map do |req_string|
30
33
  raise BadRequirementError, "Nil requirement not supported in Elm" if req_string.nil?
@@ -37,6 +40,7 @@ module Dependabot
37
40
  super(requirements)
38
41
  end
39
42
 
43
+ sig { override.params(version: T.any(String, Gem::Version)).returns(T::Boolean) }
40
44
  def satisfied_by?(version)
41
45
  version = Elm::Version.new(version.to_s)
42
46
  super
@@ -46,6 +50,7 @@ module Dependabot
46
50
 
47
51
  # Override the parser to create Elm::Versions and return an
48
52
  # array of parsed requirements
53
+ sig { params(obj: String).returns(T.any(String, T::Array[String])) }
49
54
  def convert_elm_constraint_to_ruby_constraint(obj)
50
55
  # If a version is given this is an equals requirement
51
56
  return obj if ELM_EXACT_PATTERN.match?(obj.to_s)
@@ -54,10 +59,10 @@ module Dependabot
54
59
 
55
60
  # If the two versions specified are identical this is an equals
56
61
  # requirement
57
- return matches[4] if matches[1] == matches[4] && matches[3] == "<="
62
+ return T.must(matches[4]) if matches[1] == matches[4] && matches[3] == "<="
58
63
 
59
64
  [
60
- [matches[2].tr("<", ">"), matches[1]].join(" "),
65
+ [T.must(matches[2]).tr("<", ">"), matches[1]].join(" "),
61
66
  [matches[3], matches[4]].join(" ")
62
67
  ]
63
68
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-elm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.244.0
4
+ version: 0.246.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-15 00:00:00.000000000 Z
11
+ date: 2024-03-01 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.244.0
19
+ version: 0.246.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.244.0
26
+ version: 0.246.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: debug
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -245,7 +245,7 @@ licenses:
245
245
  - Nonstandard
246
246
  metadata:
247
247
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
248
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.244.0
248
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.246.0
249
249
  post_install_message:
250
250
  rdoc_options: []
251
251
  require_paths: