dependabot-common 0.293.0 → 0.295.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: 8089a954a78a6c6c517bca5f73391485dc143ff053c607c55e822d2a0d1233a9
4
+ data.tar.gz: '08e8842b1209fd1d21f00d380a429ac9852345b2fc13f35f5c3ca4f3a89911ba'
5
5
  SHA512:
6
- metadata.gz: 49f0a7dd758a5329ead57e18df49bf954fa2220582695cc9fed271d60eb9642fe72bc9154663454533c7703436733a6622635c43f54b0578736c17e4a20e5631
7
- data.tar.gz: 6e43c31f3902f35f53e2edaec282519c8c97fba6a0db1e36a2e39513d16d5882d9fb33d4a66f7515280c957309593b69af6d12624a23c399e71ca90c1a67ffbd
6
+ metadata.gz: 21e75ab998f9608d8da2cf5ed09b7cb9953659fe22b7c3a8a44e61d730b0ffe614141f7af175ad9621be06ab659519c42f1db24ee1ea191d8af2806269c8552e
7
+ data.tar.gz: c45ae338eff5f21fd8462d539c0367dd1fcb103c3bc013fcf1a4ef5579b9987317ea773e4a40e96f3cfec3f62899aed49bba236afc836fed35e29293f3b353dc
@@ -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",
@@ -76,6 +85,11 @@ module Dependabot
76
85
  "error-type": "path_dependencies_not_reachable",
77
86
  "error-detail": { dependencies: error.dependencies }
78
87
  }
88
+ when Dependabot::PrivateSourceAuthenticationFailure
89
+ {
90
+ "error-type": "private_source_authentication_failure",
91
+ "error-detail": { source: error.source }
92
+ }
79
93
  when Octokit::Unauthorized
80
94
  { "error-type": "octokit_unauthorized" }
81
95
  when Octokit::ServerError
@@ -103,6 +117,15 @@ module Dependabot
103
117
  sig { params(error: StandardError).returns(T.nilable(T::Hash[Symbol, T.untyped])) }
104
118
  def self.parser_error_details(error)
105
119
  case error
120
+ when Dependabot::ToolFeatureNotSupported
121
+ {
122
+ "error-type": "tool_feature_not_supported",
123
+ "error-detail": {
124
+ "tool-name": error.tool_name,
125
+ "tool-type": error.tool_type,
126
+ feature: error.feature
127
+ }
128
+ }
106
129
  when Dependabot::DependencyFileNotEvaluatable
107
130
  {
108
131
  "error-type": "dependency_file_not_evaluatable",
@@ -170,6 +193,15 @@ module Dependabot
170
193
  sig { params(error: StandardError).returns(T.nilable(T::Hash[Symbol, T.untyped])) }
171
194
  def self.updater_error_details(error)
172
195
  case error
196
+ when Dependabot::ToolFeatureNotSupported
197
+ {
198
+ "error-type": "tool_feature_not_supported",
199
+ "error-detail": {
200
+ "tool-name": error.tool_name,
201
+ "tool-type": error.tool_type,
202
+ feature: error.feature
203
+ }
204
+ }
173
205
  when Dependabot::DependencyFileNotResolvable
174
206
  {
175
207
  "error-type": "dependency_file_not_resolvable",
@@ -188,11 +220,24 @@ module Dependabot
188
220
  "file-path": error.file_path
189
221
  }
190
222
  }
223
+ when Dependabot::DependencyFileNotSupported
224
+ {
225
+ "error-type": "dependency_file_not_supported",
226
+ "error-detail": { message: error.message }
227
+ }
191
228
  when Dependabot::GitDependenciesNotReachable
192
229
  {
193
230
  "error-type": "git_dependencies_not_reachable",
194
231
  "error-detail": { "dependency-urls": error.dependency_urls }
195
232
  }
233
+ when Dependabot::DependencyFileNotFound
234
+ {
235
+ "error-type": "dependency_file_not_found",
236
+ "error-detail": {
237
+ message: error.message,
238
+ "file-path": error.file_path
239
+ }
240
+ }
196
241
  when Dependabot::ToolVersionNotSupported
197
242
  {
198
243
  "error-type": "tool_version_not_supported",
@@ -300,6 +345,7 @@ module Dependabot
300
345
  }
301
346
  end
302
347
  end
348
+
303
349
  # rubocop:enable Metrics/MethodLength
304
350
  # rubocop:enable Metrics/CyclomaticComplexity
305
351
  # rubocop:enable Lint/RedundantCopDisableDirective
@@ -490,6 +536,35 @@ module Dependabot
490
536
  end
491
537
  end
492
538
 
539
+ class ToolFeatureNotSupported < DependabotError
540
+ extend T::Sig
541
+
542
+ sig { returns(String) }
543
+ attr_reader :tool_name, :tool_type, :feature
544
+
545
+ sig do
546
+ params(
547
+ tool_name: String,
548
+ tool_type: String,
549
+ feature: String
550
+ ).void
551
+ end
552
+ def initialize(tool_name:, tool_type:, feature:)
553
+ @tool_name = tool_name
554
+ @tool_type = tool_type
555
+ @feature = feature
556
+ super(build_message)
557
+ end
558
+
559
+ private
560
+
561
+ sig { returns(String) }
562
+ def build_message
563
+ "Dependabot doesn't support the feature '#{feature}' for #{tool_name} (#{tool_type}). " \
564
+ "Please refer to the documentation for supported features."
565
+ end
566
+ end
567
+
493
568
  class DependencyFileNotFound < DependabotError
494
569
  extend T::Sig
495
570
 
@@ -546,6 +621,8 @@ module Dependabot
546
621
 
547
622
  class DependencyFileNotResolvable < DependabotError; end
548
623
 
624
+ class DependencyFileNotSupported < DependabotError; end
625
+
549
626
  class BadRequirementError < Gem::Requirement::BadRequirementError; end
550
627
 
551
628
  #######################
@@ -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.295.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.295.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-30 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.295.0
619
619
  post_install_message:
620
620
  rdoc_options: []
621
621
  require_paths: