dependabot-uv 0.373.0 → 0.375.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 70d931188f97da35d9640f12c9e46ce6448d11e217a5929c42147d0bc5921da0
|
|
4
|
+
data.tar.gz: 9fbff1b9ec1f035932b1e8183d51d0c2b3c1fba55ecf5d7432ec9933f1262f98
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2617fb6467bbaee53b2aeb34ef1674312b7266a8a301ae8fbb60d77cadce8ca95edf35aeca16939eb0d1782b5f8ae35e6b619953a804535ebd602fbf954129c2
|
|
7
|
+
data.tar.gz: 4d9bd0393f2c71a08aa867c81440a4ee0aefa7d770bf0c4da9ed428badce9d78e4599937512336123b85bc0c036dea96bc14c48abe6a395efaf8ae2aefe075a1
|
|
@@ -31,6 +31,7 @@ module Dependabot
|
|
|
31
31
|
dependency_set = Dependabot::FileParsers::Base::DependencySet.new
|
|
32
32
|
|
|
33
33
|
dependency_set += pyproject_dependencies if using_poetry? || using_pep621? || using_pep735?
|
|
34
|
+
dependency_set += workspace_member_dependencies if workspace_member_pyproject_files.any?
|
|
34
35
|
dependency_set += lockfile_dependencies if using_poetry? && lockfile
|
|
35
36
|
|
|
36
37
|
dependency_set
|
|
@@ -46,7 +47,7 @@ module Dependabot
|
|
|
46
47
|
if using_poetry?
|
|
47
48
|
poetry_dependencies
|
|
48
49
|
else
|
|
49
|
-
pep621_pep735_dependencies
|
|
50
|
+
pep621_pep735_dependencies(T.must(pyproject))
|
|
50
51
|
end
|
|
51
52
|
end
|
|
52
53
|
|
|
@@ -71,8 +72,8 @@ module Dependabot
|
|
|
71
72
|
dependencies
|
|
72
73
|
end
|
|
73
74
|
|
|
74
|
-
sig { returns(Dependabot::FileParsers::Base::DependencySet) }
|
|
75
|
-
def pep621_pep735_dependencies
|
|
75
|
+
sig { params(pyproject_file: Dependabot::DependencyFile).returns(Dependabot::FileParsers::Base::DependencySet) }
|
|
76
|
+
def pep621_pep735_dependencies(pyproject_file)
|
|
76
77
|
dependencies = Dependabot::FileParsers::Base::DependencySet.new
|
|
77
78
|
|
|
78
79
|
# PDM is not yet supported, so we want to ignore it for now because in
|
|
@@ -81,7 +82,7 @@ module Dependabot
|
|
|
81
82
|
# undesirable. Leave PDM alone until properly supported
|
|
82
83
|
return dependencies if using_pdm?
|
|
83
84
|
|
|
84
|
-
parse_pep621_pep735_dependencies.each do |dep|
|
|
85
|
+
parse_pep621_pep735_dependencies(pyproject_file).each do |dep|
|
|
85
86
|
# If a requirement has a `<` or `<=` marker then updating it is
|
|
86
87
|
# probably blocked. Ignore it.
|
|
87
88
|
next if dep["markers"]&.include?("<")
|
|
@@ -106,6 +107,22 @@ module Dependabot
|
|
|
106
107
|
dependencies
|
|
107
108
|
end
|
|
108
109
|
|
|
110
|
+
sig { returns(T::Array[Dependabot::DependencyFile]) }
|
|
111
|
+
def workspace_member_pyproject_files
|
|
112
|
+
dependency_files.select { |file| file.support_file? && file.name.end_with?("pyproject.toml") }
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
sig { returns(Dependabot::FileParsers::Base::DependencySet) }
|
|
116
|
+
def workspace_member_dependencies
|
|
117
|
+
dependencies = Dependabot::FileParsers::Base::DependencySet.new
|
|
118
|
+
|
|
119
|
+
workspace_member_pyproject_files.each do |pyproject_file|
|
|
120
|
+
dependencies += pep621_pep735_dependencies(pyproject_file)
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
dependencies
|
|
124
|
+
end
|
|
125
|
+
|
|
109
126
|
sig do
|
|
110
127
|
params(
|
|
111
128
|
type: String,
|
|
@@ -298,24 +315,24 @@ module Dependabot
|
|
|
298
315
|
poetry_lock
|
|
299
316
|
end
|
|
300
317
|
|
|
301
|
-
sig { returns(T.untyped) }
|
|
302
|
-
def parse_pep621_pep735_dependencies
|
|
318
|
+
sig { params(pyproject_file: Dependabot::DependencyFile).returns(T.untyped) }
|
|
319
|
+
def parse_pep621_pep735_dependencies(pyproject_file)
|
|
303
320
|
SharedHelpers.in_a_temporary_directory do
|
|
304
|
-
write_temporary_pyproject
|
|
321
|
+
write_temporary_pyproject(pyproject_file)
|
|
305
322
|
|
|
306
323
|
SharedHelpers.run_helper_subprocess(
|
|
307
324
|
command: "pyenv exec python3 #{NativeHelpers.python_helper_path}",
|
|
308
325
|
function: "parse_pep621_pep735_dependencies",
|
|
309
|
-
args: [
|
|
326
|
+
args: [pyproject_file.name]
|
|
310
327
|
)
|
|
311
328
|
end
|
|
312
329
|
end
|
|
313
330
|
|
|
314
|
-
sig { returns(Integer) }
|
|
315
|
-
def write_temporary_pyproject
|
|
316
|
-
path =
|
|
331
|
+
sig { params(pyproject_file: Dependabot::DependencyFile).returns(Integer) }
|
|
332
|
+
def write_temporary_pyproject(pyproject_file)
|
|
333
|
+
path = pyproject_file.name
|
|
317
334
|
FileUtils.mkdir_p(Pathname.new(path).dirname)
|
|
318
|
-
File.write(path,
|
|
335
|
+
File.write(path, pyproject_file.content)
|
|
319
336
|
end
|
|
320
337
|
|
|
321
338
|
sig { returns(T.untyped) }
|
|
@@ -93,14 +93,13 @@ module Dependabot
|
|
|
93
93
|
def fetch_updated_dependency_files
|
|
94
94
|
return [] unless create_or_update_lock_file?
|
|
95
95
|
|
|
96
|
-
updated_files =
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
)
|
|
96
|
+
updated_files = pyproject_files.filter_map do |file|
|
|
97
|
+
next unless file_changed?(file)
|
|
98
|
+
|
|
99
|
+
updated_file(
|
|
100
|
+
file: file,
|
|
101
|
+
content: T.must(updated_pyproject_content_for(file))
|
|
102
|
+
)
|
|
104
103
|
end
|
|
105
104
|
|
|
106
105
|
if lockfile && !build_system_only_dependency?
|
|
@@ -117,15 +116,20 @@ module Dependabot
|
|
|
117
116
|
|
|
118
117
|
sig { returns(T.nilable(String)) }
|
|
119
118
|
def updated_pyproject_content
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
updated_pyproject_content_for(T.must(pyproject))
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
sig { params(file: Dependabot::DependencyFile).returns(T.nilable(String)) }
|
|
123
|
+
def updated_pyproject_content_for(file)
|
|
124
|
+
content = T.must(file.content)
|
|
125
|
+
return content unless file_changed?(file)
|
|
122
126
|
|
|
123
127
|
updated_content = content.dup
|
|
124
128
|
|
|
125
129
|
T.must(dependency).requirements.zip(T.must(T.must(dependency).previous_requirements)).each do |new_r, old_r|
|
|
126
|
-
next unless new_r[:file] ==
|
|
130
|
+
next unless new_r[:file] == file.name && T.must(old_r)[:file] == file.name
|
|
127
131
|
|
|
128
|
-
updated_content = replace_dep(T.must(dependency),
|
|
132
|
+
updated_content = replace_dep(T.must(dependency), updated_content, new_r, T.must(old_r))
|
|
129
133
|
end
|
|
130
134
|
|
|
131
135
|
raise DependencyFileContentNotChanged, "Content did not change!" if content == updated_content
|
|
@@ -302,12 +306,17 @@ module Dependabot
|
|
|
302
306
|
dependency_files.each do |file|
|
|
303
307
|
path = file.name
|
|
304
308
|
FileUtils.mkdir_p(Pathname.new(path).dirname)
|
|
305
|
-
|
|
309
|
+
content = if file.name == "pyproject.toml"
|
|
310
|
+
pyproject_content
|
|
311
|
+
elsif file.name.end_with?("pyproject.toml") && file_changed?(file)
|
|
312
|
+
T.must(updated_pyproject_content_for(file))
|
|
313
|
+
else
|
|
314
|
+
T.must(file.content)
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
File.write(path, content)
|
|
306
318
|
end
|
|
307
319
|
|
|
308
|
-
# Overwrite the pyproject with updated content
|
|
309
|
-
File.write("pyproject.toml", pyproject_content)
|
|
310
|
-
|
|
311
320
|
ensure_version_file_directories
|
|
312
321
|
end
|
|
313
322
|
|
|
@@ -598,6 +607,11 @@ module Dependabot
|
|
|
598
607
|
)
|
|
599
608
|
end
|
|
600
609
|
|
|
610
|
+
sig { returns(T::Array[Dependabot::DependencyFile]) }
|
|
611
|
+
def pyproject_files
|
|
612
|
+
dependency_files.select { |file| file.name.end_with?("pyproject.toml") }
|
|
613
|
+
end
|
|
614
|
+
|
|
601
615
|
sig { returns(String) }
|
|
602
616
|
def directory
|
|
603
617
|
dependency_files.first&.directory || "/"
|
|
@@ -18,8 +18,8 @@ module Dependabot
|
|
|
18
18
|
|
|
19
19
|
sig { override.returns(T::Array[DependencyFile]) }
|
|
20
20
|
def updated_dependency_files
|
|
21
|
-
updated_files = updated_pip_compile_based_files
|
|
22
|
-
updated_files
|
|
21
|
+
updated_files = updated_pip_compile_based_files + updated_uv_lock_files
|
|
22
|
+
updated_files = updated_files.reverse.uniq(&:name).reverse
|
|
23
23
|
|
|
24
24
|
if updated_files.none? ||
|
|
25
25
|
updated_files.sort_by(&:name) == dependency_files.sort_by(&:name)
|
|
@@ -158,7 +158,7 @@ module Dependabot
|
|
|
158
158
|
requirement = reqs.find do |r|
|
|
159
159
|
file = r[:file]
|
|
160
160
|
|
|
161
|
-
file == "uv.lock" || file
|
|
161
|
+
file == "uv.lock" || file.end_with?("pyproject.toml") || file.end_with?(".in") || file.end_with?(".txt")
|
|
162
162
|
end
|
|
163
163
|
|
|
164
164
|
requirement&.fetch(:requirement)
|
|
@@ -235,6 +235,11 @@ module Dependabot
|
|
|
235
235
|
false
|
|
236
236
|
end
|
|
237
237
|
|
|
238
|
+
sig { returns(T::Boolean) }
|
|
239
|
+
def updating_pyproject?
|
|
240
|
+
requirement_files.any? { |file| file.end_with?("pyproject.toml") }
|
|
241
|
+
end
|
|
242
|
+
|
|
238
243
|
sig { returns(T::Boolean) }
|
|
239
244
|
def updating_uv_lock?
|
|
240
245
|
requirement_files.any?("uv.lock")
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dependabot-uv
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.375.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dependabot
|
|
@@ -15,28 +15,28 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - '='
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.
|
|
18
|
+
version: 0.375.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - '='
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 0.
|
|
25
|
+
version: 0.375.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: dependabot-python
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
29
29
|
requirements:
|
|
30
30
|
- - '='
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: 0.
|
|
32
|
+
version: 0.375.0
|
|
33
33
|
type: :runtime
|
|
34
34
|
prerelease: false
|
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
36
36
|
requirements:
|
|
37
37
|
- - '='
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: 0.
|
|
39
|
+
version: 0.375.0
|
|
40
40
|
- !ruby/object:Gem::Dependency
|
|
41
41
|
name: debug
|
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -301,7 +301,7 @@ licenses:
|
|
|
301
301
|
- MIT
|
|
302
302
|
metadata:
|
|
303
303
|
bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
|
|
304
|
-
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.
|
|
304
|
+
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.375.0
|
|
305
305
|
rdoc_options: []
|
|
306
306
|
require_paths:
|
|
307
307
|
- lib
|