dependabot-pub 0.293.0 → 0.295.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: 899fd23685fd1b60f73103f2df4d7cc7df0d88e9f6064ca724b8c750413e17c6
4
+ data.tar.gz: a4d25f9d87c9ebaf7b99bc518b1004076c903f347d9149bf1fd2759bafc4df8e
5
5
  SHA512:
6
- metadata.gz: 96b0a6fc67b89a98ff344762e57bda900faaddd680dc22e3d23202e38485cd1c3624a488bbca5d0680146df70b38ca9be7dc1033837bb86f2715cdef8d29e5ec
7
- data.tar.gz: a492e6197e52012c2e73df1213e82f4267520d671a37da0919bd21f7c50a1527fb49d926ef43fba555894f7828f5758829f4039b0c9da26047519bfc3e15eaf2
6
+ metadata.gz: 33479134f76a96e057310309b628e485de1b73e593749dfb8aaebb882b1fa4d11ecbca73e64732d097f04e99c17c6abfc1a4d75605ff50328dd9e5c7a1761b85
7
+ data.tar.gz: d88f5e2e21ad3e36ea044d18b0eec9574fd8399ee827bbcb1b94b5fe858e05c0780aead85b6daed59108f04ea3fcc7bd3b5871493d674f53c46475a12259dbd4
@@ -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.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: 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.295.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.295.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.295.0
262
262
  post_install_message:
263
263
  rdoc_options: []
264
264
  require_paths: