dependabot-common 0.295.0 → 0.296.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: 8089a954a78a6c6c517bca5f73391485dc143ff053c607c55e822d2a0d1233a9
4
- data.tar.gz: '08e8842b1209fd1d21f00d380a429ac9852345b2fc13f35f5c3ca4f3a89911ba'
3
+ metadata.gz: 7931534498ba21a6ffa1ab7b284ce7a17351208b8257966ab4d28b9b534d45fe
4
+ data.tar.gz: d1fa9e5c8dc06dd38421780800456779e3db7dd07825a347bf86e7f63ebb631b
5
5
  SHA512:
6
- metadata.gz: 21e75ab998f9608d8da2cf5ed09b7cb9953659fe22b7c3a8a44e61d730b0ffe614141f7af175ad9621be06ab659519c42f1db24ee1ea191d8af2806269c8552e
7
- data.tar.gz: c45ae338eff5f21fd8462d539c0367dd1fcb103c3bc013fcf1a4ef5579b9987317ea773e4a40e96f3cfec3f62899aed49bba236afc836fed35e29293f3b353dc
6
+ metadata.gz: a1d0ed1ec43fd93a6ad2dabc7fda04c59176f2caf7aea307441d7df870c46bb61d36c8b20f7c0019ba23838d1ee04ab1d5bf7846d7d7a3649bc3c2fe4d2a8c20
7
+ data.tar.gz: 5e8045a62309fa8c4bd43a7fedca2816296074fa6eac9caf3a3163c02857b1d7db49a3c79db87494774981cdf4b4054c10c68da02ad8d2eb23369c495005d71a
@@ -58,6 +58,7 @@ module Dependabot
58
58
  private
59
59
 
60
60
  PACKAGE_MANAGER_LOOKUP = T.let({
61
+ "bun" => "bun",
61
62
  "bundler" => "bundler",
62
63
  "cargo" => "cargo",
63
64
  "composer" => "composer",
@@ -4,6 +4,7 @@
4
4
  require "sorbet-runtime"
5
5
  require "dependabot/utils"
6
6
 
7
+ # rubocop:disable Metrics/ModuleLength
7
8
  module Dependabot
8
9
  extend T::Sig
9
10
 
@@ -21,6 +22,7 @@ module Dependabot
21
22
  end
22
23
 
23
24
  # rubocop:disable Metrics/MethodLength
25
+ # rubocop:disable Metrics/CyclomaticComplexity
24
26
  sig { params(error: StandardError).returns(T.nilable(T::Hash[Symbol, T.untyped])) }
25
27
  def self.fetcher_error_details(error)
26
28
  case error
@@ -90,6 +92,11 @@ module Dependabot
90
92
  "error-type": "private_source_authentication_failure",
91
93
  "error-detail": { source: error.source }
92
94
  }
95
+ when Dependabot::PrivateSourceBadResponse
96
+ {
97
+ "error-type": "private_source_bad_response",
98
+ "error-detail": { source: error.source }
99
+ }
93
100
  when Octokit::Unauthorized
94
101
  { "error-type": "octokit_unauthorized" }
95
102
  when Octokit::ServerError
@@ -113,6 +120,7 @@ module Dependabot
113
120
  }
114
121
  end
115
122
  end
123
+ # rubocop:enable Metrics/CyclomaticComplexity
116
124
 
117
125
  sig { params(error: StandardError).returns(T.nilable(T::Hash[Symbol, T.untyped])) }
118
126
  def self.parser_error_details(error)
@@ -167,6 +175,11 @@ module Dependabot
167
175
  "error-type": "private_source_authentication_failure",
168
176
  "error-detail": { source: error.source }
169
177
  }
178
+ when Dependabot::PrivateSourceBadResponse
179
+ {
180
+ "error-type": "private_source_bad_response",
181
+ "error-detail": { source: error.source }
182
+ }
170
183
  when Dependabot::GitDependenciesNotReachable
171
184
  {
172
185
  "error-type": "git_dependencies_not_reachable",
@@ -238,6 +251,11 @@ module Dependabot
238
251
  "file-path": error.file_path
239
252
  }
240
253
  }
254
+ when Dependabot::DependencyFileContentNotChanged
255
+ {
256
+ "error-type": "dependency_file_content_not_changed",
257
+ "error-detail": { message: error.message }
258
+ }
241
259
  when Dependabot::ToolVersionNotSupported
242
260
  {
243
261
  "error-type": "tool_version_not_supported",
@@ -262,6 +280,11 @@ module Dependabot
262
280
  "error-type": "private_source_authentication_failure",
263
281
  "error-detail": { source: error.source }
264
282
  }
283
+ when Dependabot::PrivateSourceBadResponse
284
+ {
285
+ "error-type": "private_source_bad_response",
286
+ "error-detail": { source: error.source }
287
+ }
265
288
  when Dependabot::DependencyNotFound
266
289
  {
267
290
  "error-type": "dependency_not_found",
@@ -623,6 +646,8 @@ module Dependabot
623
646
 
624
647
  class DependencyFileNotSupported < DependabotError; end
625
648
 
649
+ class DependencyFileContentNotChanged < DependabotError; end
650
+
626
651
  class BadRequirementError < Gem::Requirement::BadRequirementError; end
627
652
 
628
653
  #######################
@@ -645,6 +670,20 @@ module Dependabot
645
670
  end
646
671
  end
647
672
 
673
+ class PrivateSourceBadResponse < DependabotError
674
+ extend T::Sig
675
+
676
+ sig { returns(String) }
677
+ attr_reader :source
678
+
679
+ sig { params(source: T.nilable(String)).void }
680
+ def initialize(source)
681
+ @source = T.let(sanitize_source(T.must(source)), String)
682
+ msg = "Bad response error while accessing source: #{@source}"
683
+ super(msg)
684
+ end
685
+ end
686
+
648
687
  class PrivateSourceTimedOut < DependabotError
649
688
  extend T::Sig
650
689
 
@@ -846,3 +885,4 @@ module Dependabot
846
885
  end
847
886
  end
848
887
  end
888
+ # rubocop:enable Metrics/ModuleLength
data/lib/dependabot.rb CHANGED
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Dependabot
5
- VERSION = "0.295.0"
5
+ VERSION = "0.296.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.295.0
4
+ version: 0.296.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-30 00:00:00.000000000 Z
11
+ date: 2025-02-06 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.295.0
618
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.296.0
619
619
  post_install_message:
620
620
  rdoc_options: []
621
621
  require_paths: