dependabot-composer 0.124.8 → 0.125.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4dabba3626cb16859532f49be1bec10e70f738fc4e05f89eaee651e076898271
4
- data.tar.gz: 4916a6463aeb6c5cd0ffb09a6adca6342602b19ecee5185ff87237a91f15ada5
3
+ metadata.gz: 887ce17815295677785b0d1f4bbbbe176ccb52a349ae21be444395cd7627676a
4
+ data.tar.gz: 4e3a04db5e44a48159fe521b2fe5f439660456d5374fc2c05044a87e8bd778e9
5
5
  SHA512:
6
- metadata.gz: 1c9aff27f9e6a47b5de27f597e8ef92ac471a5a734a92e61ea27fcd1439c1bfbd6d6eeb640cfc0b336911ee64a59ef733e93c89c7b700984a4cbe7370015c21d
7
- data.tar.gz: aeb81e1bfb522e4f8f4c91fc7e746c1c545f065c3f208525de3b6599a3fad8cba7dc57263c9fb1559532cdff480f8f385e136e2abe746a57dd57df69e0a6b865
6
+ metadata.gz: dbf316fdc2a9796ac136566c6eff3208bf4a5a7ec5c83148484b7836116a35c9f577b8a59e2adb41cfa1a5de6c0029a9a8350a623d0c0b378ac968f9f9e1a571
7
+ data.tar.gz: 6c361e3fab5a1e5afac0064b948abcdc8d0ad9bf98ca34cb6d9f2def8464a86e9e9c9517d11946beffe8464c98775129c3793bf0a80f4c5eb49785b8dfcc3fa0
@@ -65,9 +65,7 @@ module Dependabot
65
65
  updated_content = run_update_helper.fetch("composer.lock")
66
66
 
67
67
  updated_content = post_process_lockfile(updated_content)
68
- if lockfile.content == updated_content
69
- raise "Expected content to change!"
70
- end
68
+ raise "Expected content to change!" if lockfile.content == updated_content
71
69
 
72
70
  updated_content
73
71
  end
@@ -92,7 +90,7 @@ module Dependabot
92
90
  SharedHelpers.with_git_configured(credentials: credentials) do
93
91
  SharedHelpers.run_helper_subprocess(
94
92
  command: "php -d memory_limit=-1 #{php_helper_path}",
95
- escape_command_str: false,
93
+ allow_unsafe_shell_command: true,
96
94
  function: "update",
97
95
  env: credentials_env,
98
96
  args: [
@@ -159,9 +157,7 @@ module Dependabot
159
157
  raise MissingExtensions, [missing_extension]
160
158
  end
161
159
 
162
- if error.message.start_with?("Failed to execute git checkout")
163
- raise git_dependency_reference_error(error)
164
- end
160
+ raise git_dependency_reference_error(error) if error.message.start_with?("Failed to execute git checkout")
165
161
 
166
162
  # Special case for Laravel Nova, which will fall back to attempting
167
163
  # to close a private repo if given invalid (or no) credentials
@@ -193,9 +189,7 @@ module Dependabot
193
189
  raise DependencyFileNotResolvable, error.message
194
190
  end
195
191
 
196
- if error.message.start_with?("Allowed memory size")
197
- raise Dependabot::OutOfMemory
198
- end
192
+ raise Dependabot::OutOfMemory if error.message.start_with?("Allowed memory size")
199
193
 
200
194
  if error.message.include?("403 Forbidden")
201
195
  source = error.message.match(%r{https?://(?<source>[^/]+)/}).
@@ -457,9 +451,7 @@ module Dependabot
457
451
  platform_php = parsed_composer_json.dig("config", "platform", "php")
458
452
 
459
453
  platform = {}
460
- if platform_php.is_a?(String) && requirement_valid?(platform_php)
461
- platform["php"] = [platform_php]
462
- end
454
+ platform["php"] = [platform_php] if platform_php.is_a?(String) && requirement_valid?(platform_php)
463
455
 
464
456
  # Note: We *don't* include the require-dev PHP version in our initial
465
457
  # platform. If we fail to resolve with the PHP version specified in
@@ -26,9 +26,7 @@ module Dependabot
26
26
 
27
27
  def look_up_source_from_packagist
28
28
  return nil if packagist_listing&.fetch("packages", nil) == []
29
- unless packagist_listing&.dig("packages", dependency.name.downcase)
30
- return nil
31
- end
29
+ return nil unless packagist_listing&.dig("packages", dependency.name.downcase)
32
30
 
33
31
  version_listings =
34
32
  packagist_listing["packages"][dependency.name.downcase].
@@ -41,9 +41,7 @@ module Dependabot
41
41
  def lowest_resolvable_security_fix_version
42
42
  raise "Dependency not vulnerable!" unless vulnerable?
43
43
 
44
- if defined?(@lowest_resolvable_security_fix_version)
45
- return @lowest_resolvable_security_fix_version
46
- end
44
+ return @lowest_resolvable_security_fix_version if defined?(@lowest_resolvable_security_fix_version)
47
45
 
48
46
  @lowest_resolvable_security_fix_version =
49
47
  fetch_lowest_resolvable_security_fix_version
@@ -72,9 +70,7 @@ module Dependabot
72
70
 
73
71
  def requirements_update_strategy
74
72
  # If passed in as an option (in the base class) honour that option
75
- if @requirements_update_strategy
76
- return @requirements_update_strategy.to_sym
77
- end
73
+ return @requirements_update_strategy.to_sym if @requirements_update_strategy
78
74
 
79
75
  # Otherwise, widen ranges for libraries and bump versions for apps
80
76
  library? ? :widen_ranges : :bump_versions_if_necessary
@@ -149,9 +145,7 @@ module Dependabot
149
145
  def latest_version_for_git_dependency
150
146
  # If the dependency isn't pinned then we just want to check that it
151
147
  # points to the latest commit on the relevant branch.
152
- unless git_commit_checker.pinned?
153
- return git_commit_checker.head_commit_for_current_branch
154
- end
148
+ return git_commit_checker.head_commit_for_current_branch unless git_commit_checker.pinned?
155
149
 
156
150
  # If the dependency is pinned to a tag that looks like a version then
157
151
  # we want to update that tag. The latest version will then be the SHA
@@ -62,9 +62,7 @@ module Dependabot
62
62
  versions_array.
63
63
  reject { |v| ignore_reqs.any? { |r| r.satisfied_by?(v) } }
64
64
 
65
- if @raise_on_ignored && filtered.empty? && versions_array.any?
66
- raise AllVersionsIgnored
67
- end
65
+ raise AllVersionsIgnored if @raise_on_ignored && filtered.empty? && versions_array.any?
68
66
 
69
67
  filtered
70
68
  end
@@ -81,9 +79,7 @@ module Dependabot
81
79
 
82
80
  def wants_prerelease?
83
81
  current_version = dependency.version
84
- if current_version && version_class.new(current_version).prerelease?
85
- return true
86
- end
82
+ return true if current_version && version_class.new(current_version).prerelease?
87
83
 
88
84
  dependency.requirements.any? do |req|
89
85
  req[:requirement].match?(/\d-[A-Za-z]/)
@@ -144,9 +144,7 @@ module Dependabot
144
144
  def update_version_string(req_string)
145
145
  req_string.
146
146
  sub(VERSION_REGEX) do |old_version|
147
- unless req_string.match?(/[~*\^]/)
148
- next latest_resolvable_version.to_s
149
- end
147
+ next latest_resolvable_version.to_s unless req_string.match?(/[~*\^]/)
150
148
 
151
149
  old_parts = old_version.split(".")
152
150
  new_parts = latest_resolvable_version.to_s.split(".").
@@ -125,7 +125,7 @@ module Dependabot
125
125
  SharedHelpers.with_git_configured(credentials: credentials) do
126
126
  SharedHelpers.run_helper_subprocess(
127
127
  command: "php -d memory_limit=-1 #{php_helper_path}",
128
- escape_command_str: false,
128
+ allow_unsafe_shell_command: true,
129
129
  function: "get_latest_resolvable_version",
130
130
  args: [
131
131
  Dir.pwd,
@@ -156,9 +156,7 @@ module Dependabot
156
156
  json = JSON.parse(content)
157
157
 
158
158
  composer_platform_extensions.each do |extension, requirements|
159
- unless version_for_reqs(requirements)
160
- raise "No matching version for #{requirements}!"
161
- end
159
+ raise "No matching version for #{requirements}!" unless version_for_reqs(requirements)
162
160
 
163
161
  json["config"] ||= {}
164
162
  json["config"]["platform"] ||= {}
@@ -223,9 +221,7 @@ module Dependabot
223
221
 
224
222
  # If the original requirement is just a stability flag we append that
225
223
  # flag to the requirement
226
- if lower_bound.strip.start_with?("@")
227
- return "<=#{latest_allowable_version}#{lower_bound.strip}"
228
- end
224
+ return "<=#{latest_allowable_version}#{lower_bound.strip}" if lower_bound.strip.start_with?("@")
229
225
 
230
226
  lower_bound + ", <= #{latest_allowable_version}"
231
227
  end
@@ -439,9 +435,7 @@ module Dependabot
439
435
  platform_php = parsed_composer_file.dig("config", "platform", "php")
440
436
 
441
437
  platform = {}
442
- if platform_php.is_a?(String) && requirement_valid?(platform_php)
443
- platform["php"] = [platform_php]
444
- end
438
+ platform["php"] = [platform_php] if platform_php.is_a?(String) && requirement_valid?(platform_php)
445
439
 
446
440
  # Note: We *don't* include the require-dev PHP version in our initial
447
441
  # platform. If we fail to resolve with the PHP version specified in
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-composer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.124.8
4
+ version: 0.125.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-04 00:00:00.000000000 Z
11
+ date: 2020-11-17 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.124.8
19
+ version: 0.125.4
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.124.8
26
+ version: 0.125.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: byebug
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 0.7.2
131
+ version: 0.8.0
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 0.7.2
138
+ version: 0.8.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: vcr
141
141
  requirement: !ruby/object:Gem::Requirement