dependabot-nuget 0.220.0 → 0.221.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: ee37330535bf474dcbfe5d3555320fea1d19b3df9304b9e468b2e139c9ba5d7c
4
- data.tar.gz: e45223129f4e11afedac2c2755633fa386e4289c75eee5fe1be46e50a6d45ecf
3
+ metadata.gz: d7d776be775e76a5a58be89d6b097216f3578acffd53e3898a4d9fabea4f7981
4
+ data.tar.gz: 97cd3e0080fccacbf98e31f9dce05b3732bcc17fe2956ae1728d83f62eee22ae
5
5
  SHA512:
6
- metadata.gz: 9277939477201b20c8b75afa44d726ae8a3a0666e5f52f96171a9f3160ac3b2ccb1210b89fb05d6cc361c68f3f5e8337f80e706de4e5bcd402af9c0b48e1d743
7
- data.tar.gz: e91b5a675968f61bab2dec32b7dec540b7d45ced8af6a757b8a1a35d16e718b634138b2beb3ad8e9d6e669ebc61f2fd4055347178a34fa660ac551fd200d3e1a
6
+ metadata.gz: 29bd2c29a75911814e34a7497e4b8f761da60f0fbe0126fbb5377bf31764709d0be4e8085561af773b96e5af91782f9bf1caea052a932eafd78328b5e3781218
7
+ data.tar.gz: b1c1d9567db4ce7ab9f3936aad96e29a9c4d1dfc38a17520409d63923d19f6fda0810a8d3403bc3c17feaedb3179a8e5f6076a4ac15c67fd91fb1e015a51adb2
@@ -2,6 +2,7 @@
2
2
 
3
3
  require "dependabot/file_fetchers"
4
4
  require "dependabot/file_fetchers/base"
5
+ require "set"
5
6
 
6
7
  module Dependabot
7
8
  module Nuget
@@ -56,6 +57,7 @@ module Dependabot
56
57
  project_files << csproj_file if csproj_file
57
58
  project_files << vbproj_file if vbproj_file
58
59
  project_files << fsproj_file if fsproj_file
60
+ project_files << directory_packages_props_file if directory_packages_props_file
59
61
 
60
62
  project_files += sln_project_files
61
63
  project_files
@@ -203,19 +205,40 @@ module Dependabot
203
205
  end
204
206
  end
205
207
 
208
+ def directory_packages_props_file
209
+ @directory_packages_props_file ||=
210
+ begin
211
+ file = repo_contents.find { |f| f.name.casecmp?("directory.packages.props") }
212
+ fetch_file_from_host(file.name) if file
213
+ end
214
+ end
215
+
206
216
  def nuget_config_files
207
217
  return @nuget_config_files if @nuget_config_files
208
218
 
209
- candidate_paths =
210
- [*project_files.map { |f| File.dirname(f.name) }, "."].uniq
219
+ @nuget_config_files = []
220
+ candidate_paths = [*project_files.map { |f| File.dirname(f.name) }, "."].uniq
221
+ visited_directories = Set.new
222
+ candidate_paths.each do |dir|
223
+ search_in_directory_and_parents(dir, visited_directories)
224
+ end
225
+ @nuget_config_files
226
+ end
211
227
 
212
- @nuget_config_files ||=
213
- candidate_paths.filter_map do |dir|
214
- file = repo_contents(dir: dir).
215
- find { |f| f.name.casecmp("nuget.config").zero? }
216
- file = fetch_file_from_host(File.join(dir, file.name)) if file
228
+ def search_in_directory_and_parents(dir, visited_directories)
229
+ loop do
230
+ break if visited_directories.include?(dir)
231
+
232
+ visited_directories << dir
233
+ file = repo_contents(dir: dir).
234
+ find { |f| f.name.casecmp("nuget.config").zero? }
235
+ if file
236
+ file = fetch_file_from_host(File.join(dir, file.name))
217
237
  file&.tap { |f| f.support_file = true }
238
+ @nuget_config_files << file
218
239
  end
240
+ dir = File.dirname(dir)
241
+ end
219
242
  end
220
243
 
221
244
  def global_json
@@ -70,7 +70,13 @@ module Dependabot
70
70
  end
71
71
 
72
72
  def project_files
73
- dependency_files.select { |df| df.name.match?(/\.[a-z]{2}proj$/) }
73
+ projfile = /\.[a-z]{2}proj$/
74
+ packageprops = /[Dd]irectory.[Pp]ackages.props/
75
+
76
+ dependency_files.select do |df|
77
+ df.name.match?(projfile) ||
78
+ df.name.match?(packageprops)
79
+ end
74
80
  end
75
81
 
76
82
  def packages_config_files
@@ -46,7 +46,7 @@ module Dependabot
46
46
  private
47
47
 
48
48
  def project_files
49
- dependency_files.select { |df| df.name.match?(/\.[a-z]{2}proj$/) }
49
+ dependency_files.select { |df| df.name.match?(/\.[a-z]{2}proj$|[Dd]irectory.[Pp]ackages.props/) }
50
50
  end
51
51
 
52
52
  def packages_config_files
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-nuget
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.220.0
4
+ version: 0.221.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-06-12 00:00:00.000000000 Z
11
+ date: 2023-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dependabot-common
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.220.0
19
+ version: 0.221.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.220.0
26
+ version: 0.221.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: debug
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.7.1
33
+ version: 1.8.0
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.7.1
40
+ version: 1.8.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: gpgme
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -136,34 +136,6 @@ dependencies:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: 1.17.1
139
- - !ruby/object:Gem::Dependency
140
- name: simplecov
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - "~>"
144
- - !ruby/object:Gem::Version
145
- version: 0.22.0
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - "~>"
151
- - !ruby/object:Gem::Version
152
- version: 0.22.0
153
- - !ruby/object:Gem::Dependency
154
- name: simplecov-console
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - "~>"
158
- - !ruby/object:Gem::Version
159
- version: 0.9.1
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - "~>"
165
- - !ruby/object:Gem::Version
166
- version: 0.9.1
167
139
  - !ruby/object:Gem::Dependency
168
140
  name: stackprof
169
141
  requirement: !ruby/object:Gem::Requirement
@@ -241,7 +213,7 @@ licenses:
241
213
  - Nonstandard
242
214
  metadata:
243
215
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
244
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.220.0
216
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.221.0
245
217
  post_install_message:
246
218
  rdoc_options: []
247
219
  require_paths: