dependabot-cargo 0.223.0 → 0.224.0

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: 16eda558215c4e6e559914d48c4942996b3222f089c1ad94826dab4e9745d317
4
- data.tar.gz: cc4e207ff45f80160c71279b553d7ce55cb25c06cdf2c98a4bdf00e767f31b78
3
+ metadata.gz: 40da4ff75944a40a942ec497e3399a0e14358e4097930868053b6b667824f9de
4
+ data.tar.gz: 25cc4cc1572467a4efc612fda4848d641e6b7b761c75efef1eb43fd3ee9b0131
5
5
  SHA512:
6
- metadata.gz: af328574f254c93809acc12be8a302cee939ff6044721c564ec06ba2a67f219b8a127826692be94667ef2a6f14dc9aae0d6fd6fbf6356062c8f755ef0f40a5d7
7
- data.tar.gz: 8ba928f93d0d833dfbdb06f1a8da4807f7278dd88c5eb8fab07a657911144e8d25de8b9b9dbd21d182c2035d6ee23ed34b39b4f38d72f83fb28b2a1733bd5ef8
6
+ metadata.gz: be0c11ba56cc69fea40d2fdc2cb73170e223ad42c73e792523ad2d9c7553f36234fe157b5e38cb6282369b920b10d2d71501703d26f1cac75905a263095721e9
7
+ data.tar.gz: fed053f592e5323a06ed35c19f85dd509f5fb43a2353e24ecf309689538a724d1a7251993a49550e9081786628753ab66e19d2e5135985e56d90920d1a0a0e4f
@@ -152,30 +152,32 @@ module Dependabot
152
152
  unfetchable_required_path_deps
153
153
  end
154
154
 
155
- # rubocop:enable Metrics/PerceivedComplexity
155
+ def collect_path_dependencies_paths(dependencies)
156
+ paths = []
157
+ dependencies.each do |_, details|
158
+ next unless details.is_a?(Hash) && details["path"]
156
159
 
160
+ paths << File.join(details["path"], "Cargo.toml").delete_prefix("/")
161
+ end
162
+ paths
163
+ end
164
+
165
+ # rubocop:enable Metrics/PerceivedComplexity
157
166
  def path_dependency_paths_from_file(file)
158
167
  paths = []
159
168
 
160
- # Paths specified in dependency declaration
169
+ workspace = parsed_file(file).fetch("workspace", {})
161
170
  Cargo::FileParser::DEPENDENCY_TYPES.each do |type|
162
- parsed_file(file).fetch(type, {}).each do |_, details|
163
- next unless details.is_a?(Hash)
164
- next unless details["path"]
165
-
166
- paths << File.join(details["path"], "Cargo.toml").delete_prefix("/")
167
- end
171
+ # Paths specified in dependency declaration
172
+ paths += collect_path_dependencies_paths(parsed_file(file).fetch(type, {}))
173
+ # Paths specified as workspace dependencies in workspace root
174
+ paths += collect_path_dependencies_paths(workspace.fetch(type, {}))
168
175
  end
169
176
 
170
177
  # Paths specified for target-specific dependencies
171
178
  parsed_file(file).fetch("target", {}).each do |_, t_details|
172
179
  Cargo::FileParser::DEPENDENCY_TYPES.each do |type|
173
- t_details.fetch(type, {}).each do |_, details|
174
- next unless details.is_a?(Hash)
175
- next unless details["path"]
176
-
177
- paths << File.join(details["path"], "Cargo.toml").delete_prefix("/")
178
- end
180
+ paths += collect_path_dependencies_paths(t_details.fetch(type, {}))
179
181
  end
180
182
  end
181
183
 
@@ -263,6 +265,16 @@ module Dependabot
263
265
  end
264
266
  end
265
267
 
268
+ # Paths specified for workspace-wide dependencies
269
+ workspace = parsed_file(file).fetch("workspace", {})
270
+ workspace.fetch("dependencies", {}).each do |_, details|
271
+ next unless details.is_a?(Hash)
272
+ next unless details["path"]
273
+ next unless path == File.join(details["path"], "Cargo.toml")
274
+
275
+ return true if details["git"].nil?
276
+ end
277
+
266
278
  # Paths specified as replacements
267
279
  parsed_file(file).fetch("replace", {}).each do |_, details|
268
280
  next unless details.is_a?(Hash)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-cargo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.223.0
4
+ version: 0.224.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-25 00:00:00.000000000 Z
11
+ date: 2023-07-27 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.223.0
19
+ version: 0.224.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.223.0
26
+ version: 0.224.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: debug
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -205,7 +205,7 @@ licenses:
205
205
  - Nonstandard
206
206
  metadata:
207
207
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
208
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.223.0
208
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.224.0
209
209
  post_install_message:
210
210
  rdoc_options: []
211
211
  require_paths: