dependabot-common 0.293.0 → 0.294.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: 0b4d27736af7c39344d1d7b96954789a59840fc8babfb779a4b88e267170f1db
4
- data.tar.gz: d61444a31fafe63b7704284f8c0d67b3ac1a8cac53284221c21fa32bdd1dc799
3
+ metadata.gz: 8cde53c48bd3fb273b5c5c3ff162144a31143428558d7f4585325917970a61a7
4
+ data.tar.gz: 0e3079822bb75940295f85f7b1a61842ec1f4dcf6267fe82b08c5f4ee4c6e2c8
5
5
  SHA512:
6
- metadata.gz: 49f0a7dd758a5329ead57e18df49bf954fa2220582695cc9fed271d60eb9642fe72bc9154663454533c7703436733a6622635c43f54b0578736c17e4a20e5631
7
- data.tar.gz: 6e43c31f3902f35f53e2edaec282519c8c97fba6a0db1e36a2e39513d16d5882d9fb33d4a66f7515280c957309593b69af6d12624a23c399e71ca90c1a67ffbd
6
+ metadata.gz: 05a79b1df212125222e50bdd499633fc88923e7de893cbcb9343121082ec1eba8e7ab36fbe500cd5f882d6b6f2f748b290acc8a0d923c8c3a13769c12c682b4f
7
+ data.tar.gz: 2089362ff38c1ef33945b12d3a065af55e36fa786dafc9bda8748665d98f6ca1db036a74c05fd380284f120189da8b723b2096a37ded6f5ff8a15be6e6fed743
@@ -33,6 +33,15 @@ module Dependabot
33
33
  "supported-versions": error.supported_versions
34
34
  }
35
35
  }
36
+ when Dependabot::ToolFeatureNotSupported
37
+ {
38
+ "error-type": "tool_feature_not_supported",
39
+ "error-detail": {
40
+ "tool-name": error.tool_name,
41
+ "tool-type": error.tool_type,
42
+ feature: error.feature
43
+ }
44
+ }
36
45
  when Dependabot::BranchNotFound
37
46
  {
38
47
  "error-type": "branch_not_found",
@@ -103,6 +112,15 @@ module Dependabot
103
112
  sig { params(error: StandardError).returns(T.nilable(T::Hash[Symbol, T.untyped])) }
104
113
  def self.parser_error_details(error)
105
114
  case error
115
+ when Dependabot::ToolFeatureNotSupported
116
+ {
117
+ "error-type": "tool_feature_not_supported",
118
+ "error-detail": {
119
+ "tool-name": error.tool_name,
120
+ "tool-type": error.tool_type,
121
+ feature: error.feature
122
+ }
123
+ }
106
124
  when Dependabot::DependencyFileNotEvaluatable
107
125
  {
108
126
  "error-type": "dependency_file_not_evaluatable",
@@ -170,6 +188,15 @@ module Dependabot
170
188
  sig { params(error: StandardError).returns(T.nilable(T::Hash[Symbol, T.untyped])) }
171
189
  def self.updater_error_details(error)
172
190
  case error
191
+ when Dependabot::ToolFeatureNotSupported
192
+ {
193
+ "error-type": "tool_feature_not_supported",
194
+ "error-detail": {
195
+ "tool-name": error.tool_name,
196
+ "tool-type": error.tool_type,
197
+ feature: error.feature
198
+ }
199
+ }
173
200
  when Dependabot::DependencyFileNotResolvable
174
201
  {
175
202
  "error-type": "dependency_file_not_resolvable",
@@ -193,6 +220,14 @@ module Dependabot
193
220
  "error-type": "git_dependencies_not_reachable",
194
221
  "error-detail": { "dependency-urls": error.dependency_urls }
195
222
  }
223
+ when Dependabot::DependencyFileNotFound
224
+ {
225
+ "error-type": "dependency_file_not_found",
226
+ "error-detail": {
227
+ message: error.message,
228
+ "file-path": error.file_path
229
+ }
230
+ }
196
231
  when Dependabot::ToolVersionNotSupported
197
232
  {
198
233
  "error-type": "tool_version_not_supported",
@@ -300,6 +335,7 @@ module Dependabot
300
335
  }
301
336
  end
302
337
  end
338
+
303
339
  # rubocop:enable Metrics/MethodLength
304
340
  # rubocop:enable Metrics/CyclomaticComplexity
305
341
  # rubocop:enable Lint/RedundantCopDisableDirective
@@ -490,6 +526,35 @@ module Dependabot
490
526
  end
491
527
  end
492
528
 
529
+ class ToolFeatureNotSupported < DependabotError
530
+ extend T::Sig
531
+
532
+ sig { returns(String) }
533
+ attr_reader :tool_name, :tool_type, :feature
534
+
535
+ sig do
536
+ params(
537
+ tool_name: String,
538
+ tool_type: String,
539
+ feature: String
540
+ ).void
541
+ end
542
+ def initialize(tool_name:, tool_type:, feature:)
543
+ @tool_name = tool_name
544
+ @tool_type = tool_type
545
+ @feature = feature
546
+ super(build_message)
547
+ end
548
+
549
+ private
550
+
551
+ sig { returns(String) }
552
+ def build_message
553
+ "Dependabot doesn't support the feature '#{feature}' for #{tool_name} (#{tool_type}). " \
554
+ "Please refer to the documentation for supported features."
555
+ end
556
+ end
557
+
493
558
  class DependencyFileNotFound < DependabotError
494
559
  extend T::Sig
495
560
 
@@ -128,6 +128,11 @@ module Dependabot
128
128
  source.branch
129
129
  end
130
130
 
131
+ sig { returns(T::Boolean) }
132
+ def allow_beta_ecosystems?
133
+ Experiments.enabled?(:enable_beta_ecosystems)
134
+ end
135
+
131
136
  sig { returns(T::Array[DependencyFile]) }
132
137
  def files
133
138
  return @files if @files.any?
@@ -302,7 +302,7 @@ module Dependabot
302
302
 
303
303
  # Previous version looks like a git SHA and there's a previous ref, we
304
304
  # could be changing to a nil previous ref in which case we want to
305
- # fall back to tge sha version
305
+ # fall back to the sha version
306
306
  if T.must(dependency.previous_version).match?(/^[0-9a-f]{40}$/) &&
307
307
  ref_changed? && previous_ref
308
308
  previous_ref
data/lib/dependabot.rb CHANGED
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Dependabot
5
- VERSION = "0.293.0"
5
+ VERSION = "0.294.0"
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-common
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.293.0
4
+ version: 0.294.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-01-16 00:00:00.000000000 Z
11
+ date: 2025-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-codecommit
@@ -615,7 +615,7 @@ licenses:
615
615
  - MIT
616
616
  metadata:
617
617
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
618
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.293.0
618
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.294.0
619
619
  post_install_message:
620
620
  rdoc_options: []
621
621
  require_paths: