dependabot-cargo 0.222.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: 715507593b7ecb3be2af0847a4b9cc9422b6e78a200148160249cb72df824738
4
- data.tar.gz: 19a64fc691e3d6f2f13a0a7574d056243ceab93d96383dd0c354348f554244a1
3
+ metadata.gz: 40da4ff75944a40a942ec497e3399a0e14358e4097930868053b6b667824f9de
4
+ data.tar.gz: 25cc4cc1572467a4efc612fda4848d641e6b7b761c75efef1eb43fd3ee9b0131
5
5
  SHA512:
6
- metadata.gz: c45ffb3a7e946eb0483a1f898b40d0c343208428521d7e389dfe502485308b009b6765eb1133dcb7b60a1ae00622ae30dc6cdb4b7e90c5e64798a32a678fe836
7
- data.tar.gz: c16f21fd4d03be5370105bd3669bdd320c5e3ace3aa9521e81dcc66c8c554c4bdc2f522eb1b1be641f4215b657e38100e4038d266a37d2421d3f2a92470fb04b
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.222.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.222.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.222.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.222.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: