dependabot-silent 0.250.0 → 0.251.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dependabot/silent/file_parser.rb +27 -11
- data/lib/dependabot/silent/file_updater.rb +3 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fca7323d6fbe01a180ec5dd52d1c25da4793b101da41ac7b46df7e5a965c1c4
|
4
|
+
data.tar.gz: 8a7964ae9b98cac11e86125bb01d137b205c4b5fba76bfff5803121de58e80b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ba5290c40f62dd8e9b77ef1af801e23ae1657cd26779ce397a5adf9229c2483d9b999925bee827cb1025d70cca32367bb9801c42b69a902f7e3c3efeaefb285
|
7
|
+
data.tar.gz: '006903d6f1191b296e8e65ac1183cb2ae1b89b36b8575ec09195a3c107fcc3b451ec57d7a479c44add019bfb3d0404a80e4ed94a33db6b10720a15d47c53f623'
|
@@ -13,17 +13,8 @@ module SilentPackageManager
|
|
13
13
|
dependency_set = DependencySet.new
|
14
14
|
|
15
15
|
JSON.parse(manifest_content).each do |name, info|
|
16
|
-
dependency_set <<
|
17
|
-
|
18
|
-
version: info["version"],
|
19
|
-
package_manager: "silent",
|
20
|
-
requirements: [{
|
21
|
-
requirement: info["version"],
|
22
|
-
file: T.must(dependency_files.first).name,
|
23
|
-
groups: [info["group"]].compact,
|
24
|
-
source: nil
|
25
|
-
}]
|
26
|
-
)
|
16
|
+
dependency_set << parse_single_dependency(name, info) if info.key?("version")
|
17
|
+
dependency_set << parse_multiple_dependency(name, info) if info.key?("versions")
|
27
18
|
end
|
28
19
|
|
29
20
|
dependency_set.dependencies
|
@@ -33,6 +24,31 @@ module SilentPackageManager
|
|
33
24
|
|
34
25
|
private
|
35
26
|
|
27
|
+
def parse_single_dependency(name, info)
|
28
|
+
Dependabot::Dependency.new(
|
29
|
+
name: name,
|
30
|
+
version: info["version"],
|
31
|
+
package_manager: "silent",
|
32
|
+
requirements: [{
|
33
|
+
requirement: info["version"],
|
34
|
+
file: T.must(dependency_files.first).name,
|
35
|
+
groups: [info["group"]].compact,
|
36
|
+
source: nil
|
37
|
+
}]
|
38
|
+
)
|
39
|
+
end
|
40
|
+
|
41
|
+
# To match the behavior of npm_and_yarn, this returns one Dependency but has
|
42
|
+
# a metadata field that includes all the versions of the Dependency.
|
43
|
+
def parse_multiple_dependency(name, info)
|
44
|
+
dependencies = info["versions"].map do |version|
|
45
|
+
info["version"] = version
|
46
|
+
parse_single_dependency(name, info)
|
47
|
+
end
|
48
|
+
dependencies.last.metadata[:all_versions] = dependencies
|
49
|
+
dependencies.last
|
50
|
+
end
|
51
|
+
|
36
52
|
def manifest_content
|
37
53
|
T.must(T.must(dependency_files.first).content)
|
38
54
|
end
|
@@ -41,6 +41,9 @@ module SilentPackageManager
|
|
41
41
|
original_content.each do |name, info|
|
42
42
|
next unless name == dependency.name
|
43
43
|
|
44
|
+
# If this was a multi-version update, assume we've updated all versions to be the same.
|
45
|
+
info.delete("versions") if info["versions"]
|
46
|
+
|
44
47
|
info["version"] = requirements(file).first[:requirement]
|
45
48
|
if info["depends-on"]
|
46
49
|
# also bump dependants to the same version
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dependabot-silent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.251.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-05 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.
|
19
|
+
version: 0.251.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.
|
26
|
+
version: 0.251.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -252,7 +252,7 @@ licenses:
|
|
252
252
|
- Nonstandard
|
253
253
|
metadata:
|
254
254
|
bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
|
255
|
-
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.
|
255
|
+
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.251.0
|
256
256
|
post_install_message:
|
257
257
|
rdoc_options: []
|
258
258
|
require_paths:
|