dependabot-pub 0.293.0 → 0.294.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dependabot/pub/helpers.rb +15 -1
  3. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7911ff06109add18e4d1f17639ca626f28968f461b3efc5f76338ad9d74395e9
4
- data.tar.gz: 05b3161a095f10e714bf5b49ca6dfc311010a5ae59a1d6ff63191f299bd70075
3
+ metadata.gz: d6a96e5847fd71de9aaa3d953aff7f45962b8b9b2a5958e1e6fe2a01eb1fb6f5
4
+ data.tar.gz: 0d43f5648e6b1fb775d1870601b462557b77120dce212db8987d84a08d4b581f
5
5
  SHA512:
6
- metadata.gz: 96b0a6fc67b89a98ff344762e57bda900faaddd680dc22e3d23202e38485cd1c3624a488bbca5d0680146df70b38ca9be7dc1033837bb86f2715cdef8d29e5ec
7
- data.tar.gz: a492e6197e52012c2e73df1213e82f4267520d671a37da0919bd21f7c50a1527fb49d926ef43fba555894f7828f5758829f4039b0c9da26047519bfc3e15eaf2
6
+ metadata.gz: 8106a1d4a6fab149486bbcbb1e7cb3fd5f85e505a03d0b77e35070097db3da8d4889bcdfc143b758107047e02e12e9f522ae7ece82b49ce28c884fb25e0edfda
7
+ data.tar.gz: e5df24060e59ead8c99d8ea28704cc5e6205e9196edd05b1305576f80626041803204be0019443d74c21fbd01dc9442afb024398102cdfa6b3d4ccac28b7df90
@@ -244,7 +244,7 @@ module Dependabot
244
244
  stdin_data: stdin_data,
245
245
  chdir: command_dir
246
246
  )
247
- raise Dependabot::DependabotError, "dependency_services failed: #{stderr}" unless status.success?
247
+ raise_error(stderr) unless status.success?
248
248
  return stdout unless block_given?
249
249
 
250
250
  yield command_dir
@@ -252,6 +252,20 @@ module Dependabot
252
252
  end
253
253
  end
254
254
 
255
+ def raise_error(stderr)
256
+ if stderr.include?("Failed parsing lock file") || stderr.include?("Unsupported operation")
257
+ raise DependencyFileNotEvaluatable, "dependency_services failed: #{stderr}"
258
+ elsif stderr.include?("Git error")
259
+ raise Dependabot::InvalidGitAuthToken, "dependency_services failed: #{stderr}"
260
+ elsif stderr.include?("version solving failed")
261
+ raise Dependabot::DependencyFileNotResolvable, "dependency_services failed: #{stderr}"
262
+ elsif stderr.include?("Could not find a file named \"pubspec.yaml\"")
263
+ raise Dependabot::DependencyFileNotFound.new("pubspec.yaml", "dependency_services failed: #{stderr}")
264
+ else
265
+ raise Dependabot::DependabotError, "dependency_services failed: #{stderr}"
266
+ end
267
+ end
268
+
255
269
  # Parses a dependency as listed by `dependency_services list`.
256
270
  def parse_listed_dependency(json)
257
271
  params = {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-pub
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: dependabot-common
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.293.0
19
+ version: 0.294.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.293.0
26
+ version: 0.294.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: debug
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -258,7 +258,7 @@ licenses:
258
258
  - MIT
259
259
  metadata:
260
260
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
261
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.293.0
261
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.294.0
262
262
  post_install_message:
263
263
  rdoc_options: []
264
264
  require_paths: