dependabot-pub 0.292.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: 63fba8efb80f3eb4f7f88576407481375ef807fa29af3d4c1d94e6b863bdcf08
4
- data.tar.gz: c3fd41b78680f155ecc4400b3f6b5fb8ef3e509f026c04607b424887c97147df
3
+ metadata.gz: d6a96e5847fd71de9aaa3d953aff7f45962b8b9b2a5958e1e6fe2a01eb1fb6f5
4
+ data.tar.gz: 0d43f5648e6b1fb775d1870601b462557b77120dce212db8987d84a08d4b581f
5
5
  SHA512:
6
- metadata.gz: 298d7757d664c1a41985b552490a01aa43b71ed45ca637d3b6c0db810fcace51a63df1aa14b05d3e13bcbd3d330ec907a4e1869e90b63cc98a014d632da45682
7
- data.tar.gz: 05e9a09cebafea2a77f7faa36a67cf41a2f17ea895214e28654375350dc06a92de1eb11d68800e65a0423a926f13c44dbaa3b12e66f7f9cd5e659b55f9341c56
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.292.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-09 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.292.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.292.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.292.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: