dependabot-common 0.295.0 → 0.296.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dependabot/config/file.rb +1 -0
- data/lib/dependabot/errors.rb +40 -0
- data/lib/dependabot/metadata_finders/base.rb +1 -1
- data/lib/dependabot.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b37c3cc241cf0adeec6af8e18edcd2a467634710ad0e9b0c33dca7b67f4eb398
|
4
|
+
data.tar.gz: e86e292bd9ffddf62c69fbfef8baffdeed8ef811d02e6f90ccd91b4e5594a28b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2950c408959e44770cfadd5135cc90aee61a72d70b124391d0751dfb6e9e10e0fee109ce365fdce8075ec50463a87be3528b1b257588f72997035ea80ae9dcca
|
7
|
+
data.tar.gz: 40fa3047565d88b58f7649d273fcf4f05832eb2be907166c8dcd40a8e13c90d8421802672df94b09abbfcc35b392a41ed343d4411b4dd87967f71d9856011942
|
data/lib/dependabot/errors.rb
CHANGED
@@ -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
|
@@ -15,7 +15,7 @@ module Dependabot
|
|
15
15
|
require "dependabot/metadata_finders/base/release_finder"
|
16
16
|
require "dependabot/metadata_finders/base/commits_finder"
|
17
17
|
|
18
|
-
PACKAGE_MANAGERS_WITH_RELIABLE_DIRECTORIES = T.let(%w(npm_and_yarn pub).freeze, T::Array[String])
|
18
|
+
PACKAGE_MANAGERS_WITH_RELIABLE_DIRECTORIES = T.let(%w(bun npm_and_yarn pub).freeze, T::Array[String])
|
19
19
|
|
20
20
|
sig { returns(Dependabot::Dependency) }
|
21
21
|
attr_reader :dependency
|
data/lib/dependabot.rb
CHANGED
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.
|
4
|
+
version: 0.296.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-02-11 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.
|
618
|
+
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.296.1
|
619
619
|
post_install_message:
|
620
620
|
rdoc_options: []
|
621
621
|
require_paths:
|