dependabot-core 0.77.2 → 0.78.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/dependabot/file_fetchers.rb +0 -2
- data/lib/dependabot/file_parsers.rb +0 -2
- data/lib/dependabot/file_updaters.rb +0 -2
- data/lib/dependabot/file_updaters/ruby/.DS_Store +0 -0
- data/lib/dependabot/metadata_finders.rb +0 -2
- data/lib/dependabot/update_checkers.rb +0 -2
- data/lib/dependabot/version.rb +1 -1
- metadata +3 -7
- data/lib/dependabot/file_fetchers/git/submodules.rb +0 -73
- data/lib/dependabot/file_parsers/git/submodules.rb +0 -69
- data/lib/dependabot/file_updaters/git/submodules.rb +0 -38
- data/lib/dependabot/metadata_finders/git/submodules.rb +0 -20
- data/lib/dependabot/update_checkers/git/submodules.rb +0 -52
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95c11f6783d5750a80f0cb5733246a913f4171b771bd2543f9d7e46d3092d2c6
|
4
|
+
data.tar.gz: 05b220175026cecb6153863d9ed5910da8025798be814f54de4792586bc81c13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a3eff9df94cb5ea0bc46301527bbbbd1a72cd55863c6905d323a10f701ffaad8a3b24ffd67f86e2790e4740074306e7bf4929018176d94222abb9f7beb16d04
|
7
|
+
data.tar.gz: 874b136db86a44268b7b5ff2ac535903d582089a71e6f6ffb614184ac496b081108a4bc21438f978c5160eb944bc11333a0bfd6b08e0f9cd0f31d7f6f1863861
|
data/CHANGELOG.md
CHANGED
@@ -6,7 +6,6 @@ require "dependabot/file_fetchers/java_script/npm_and_yarn"
|
|
6
6
|
require "dependabot/file_fetchers/java/maven"
|
7
7
|
require "dependabot/file_fetchers/java/gradle"
|
8
8
|
require "dependabot/file_fetchers/php/composer"
|
9
|
-
require "dependabot/file_fetchers/git/submodules"
|
10
9
|
require "dependabot/file_fetchers/elixir/hex"
|
11
10
|
require "dependabot/file_fetchers/rust/cargo"
|
12
11
|
require "dependabot/file_fetchers/dotnet/nuget"
|
@@ -23,7 +22,6 @@ module Dependabot
|
|
23
22
|
"gradle" => FileFetchers::Java::Gradle,
|
24
23
|
"pip" => FileFetchers::Python::Pip,
|
25
24
|
"composer" => FileFetchers::Php::Composer,
|
26
|
-
"submodules" => FileFetchers::Git::Submodules,
|
27
25
|
"hex" => FileFetchers::Elixir::Hex,
|
28
26
|
"cargo" => FileFetchers::Rust::Cargo,
|
29
27
|
"nuget" => FileFetchers::Dotnet::Nuget,
|
@@ -6,7 +6,6 @@ require "dependabot/file_parsers/java_script/npm_and_yarn"
|
|
6
6
|
require "dependabot/file_parsers/java/maven"
|
7
7
|
require "dependabot/file_parsers/java/gradle"
|
8
8
|
require "dependabot/file_parsers/php/composer"
|
9
|
-
require "dependabot/file_parsers/git/submodules"
|
10
9
|
require "dependabot/file_parsers/elixir/hex"
|
11
10
|
require "dependabot/file_parsers/rust/cargo"
|
12
11
|
require "dependabot/file_parsers/dotnet/nuget"
|
@@ -23,7 +22,6 @@ module Dependabot
|
|
23
22
|
"gradle" => FileParsers::Java::Gradle,
|
24
23
|
"pip" => FileParsers::Python::Pip,
|
25
24
|
"composer" => FileParsers::Php::Composer,
|
26
|
-
"submodules" => FileParsers::Git::Submodules,
|
27
25
|
"hex" => FileParsers::Elixir::Hex,
|
28
26
|
"cargo" => FileParsers::Rust::Cargo,
|
29
27
|
"nuget" => FileParsers::Dotnet::Nuget,
|
@@ -6,7 +6,6 @@ require "dependabot/file_updaters/java_script/npm_and_yarn"
|
|
6
6
|
require "dependabot/file_updaters/java/maven"
|
7
7
|
require "dependabot/file_updaters/java/gradle"
|
8
8
|
require "dependabot/file_updaters/php/composer"
|
9
|
-
require "dependabot/file_updaters/git/submodules"
|
10
9
|
require "dependabot/file_updaters/elixir/hex"
|
11
10
|
require "dependabot/file_updaters/rust/cargo"
|
12
11
|
require "dependabot/file_updaters/dotnet/nuget"
|
@@ -23,7 +22,6 @@ module Dependabot
|
|
23
22
|
"gradle" => FileUpdaters::Java::Gradle,
|
24
23
|
"pip" => FileUpdaters::Python::Pip,
|
25
24
|
"composer" => FileUpdaters::Php::Composer,
|
26
|
-
"submodules" => FileUpdaters::Git::Submodules,
|
27
25
|
"hex" => FileUpdaters::Elixir::Hex,
|
28
26
|
"cargo" => FileUpdaters::Rust::Cargo,
|
29
27
|
"nuget" => FileUpdaters::Dotnet::Nuget,
|
Binary file
|
@@ -5,7 +5,6 @@ require "dependabot/metadata_finders/python/pip"
|
|
5
5
|
require "dependabot/metadata_finders/java_script/npm_and_yarn"
|
6
6
|
require "dependabot/metadata_finders/java/maven"
|
7
7
|
require "dependabot/metadata_finders/php/composer"
|
8
|
-
require "dependabot/metadata_finders/git/submodules"
|
9
8
|
require "dependabot/metadata_finders/elixir/hex"
|
10
9
|
require "dependabot/metadata_finders/rust/cargo"
|
11
10
|
require "dependabot/metadata_finders/dotnet/nuget"
|
@@ -21,7 +20,6 @@ module Dependabot
|
|
21
20
|
"gradle" => MetadataFinders::Java::Maven,
|
22
21
|
"pip" => MetadataFinders::Python::Pip,
|
23
22
|
"composer" => MetadataFinders::Php::Composer,
|
24
|
-
"submodules" => MetadataFinders::Git::Submodules,
|
25
23
|
"hex" => MetadataFinders::Elixir::Hex,
|
26
24
|
"cargo" => MetadataFinders::Rust::Cargo,
|
27
25
|
"nuget" => MetadataFinders::Dotnet::Nuget,
|
@@ -6,7 +6,6 @@ require "dependabot/update_checkers/java_script/npm_and_yarn"
|
|
6
6
|
require "dependabot/update_checkers/java/maven"
|
7
7
|
require "dependabot/update_checkers/java/gradle"
|
8
8
|
require "dependabot/update_checkers/php/composer"
|
9
|
-
require "dependabot/update_checkers/git/submodules"
|
10
9
|
require "dependabot/update_checkers/elixir/hex"
|
11
10
|
require "dependabot/update_checkers/rust/cargo"
|
12
11
|
require "dependabot/update_checkers/dotnet/nuget"
|
@@ -23,7 +22,6 @@ module Dependabot
|
|
23
22
|
"gradle" => UpdateCheckers::Java::Gradle,
|
24
23
|
"pip" => UpdateCheckers::Python::Pip,
|
25
24
|
"composer" => UpdateCheckers::Php::Composer,
|
26
|
-
"submodules" => UpdateCheckers::Git::Submodules,
|
27
25
|
"hex" => UpdateCheckers::Elixir::Hex,
|
28
26
|
"cargo" => UpdateCheckers::Rust::Cargo,
|
29
27
|
"nuget" => UpdateCheckers::Dotnet::Nuget,
|
data/lib/dependabot/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dependabot-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.78.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
@@ -385,7 +385,6 @@ files:
|
|
385
385
|
- lib/dependabot/file_fetchers/dotnet/nuget/sln_project_paths_finder.rb
|
386
386
|
- lib/dependabot/file_fetchers/elixir/hex.rb
|
387
387
|
- lib/dependabot/file_fetchers/elm/elm_package.rb
|
388
|
-
- lib/dependabot/file_fetchers/git/submodules.rb
|
389
388
|
- lib/dependabot/file_fetchers/go/dep.rb
|
390
389
|
- lib/dependabot/file_fetchers/go/modules.rb
|
391
390
|
- lib/dependabot/file_fetchers/java/gradle.rb
|
@@ -410,7 +409,6 @@ files:
|
|
410
409
|
- lib/dependabot/file_parsers/dotnet/nuget/property_value_finder.rb
|
411
410
|
- lib/dependabot/file_parsers/elixir/hex.rb
|
412
411
|
- lib/dependabot/file_parsers/elm/elm_package.rb
|
413
|
-
- lib/dependabot/file_parsers/git/submodules.rb
|
414
412
|
- lib/dependabot/file_parsers/go/dep.rb
|
415
413
|
- lib/dependabot/file_parsers/go/modules.rb
|
416
414
|
- lib/dependabot/file_parsers/go/modules/go_mod_parser.rb
|
@@ -446,7 +444,6 @@ files:
|
|
446
444
|
- lib/dependabot/file_updaters/elm/elm_package.rb
|
447
445
|
- lib/dependabot/file_updaters/elm/elm_package/elm_json_updater.rb
|
448
446
|
- lib/dependabot/file_updaters/elm/elm_package/elm_package_updater.rb
|
449
|
-
- lib/dependabot/file_updaters/git/submodules.rb
|
450
447
|
- lib/dependabot/file_updaters/go/dep.rb
|
451
448
|
- lib/dependabot/file_updaters/go/dep/lockfile_updater.rb
|
452
449
|
- lib/dependabot/file_updaters/go/dep/manifest_updater.rb
|
@@ -476,6 +473,7 @@ files:
|
|
476
473
|
- lib/dependabot/file_updaters/python/pip/requirement_file_updater.rb
|
477
474
|
- lib/dependabot/file_updaters/python/pip/requirement_replacer.rb
|
478
475
|
- lib/dependabot/file_updaters/python/pip/setup_file_sanitizer.rb
|
476
|
+
- lib/dependabot/file_updaters/ruby/.DS_Store
|
479
477
|
- lib/dependabot/file_updaters/ruby/bundler.rb
|
480
478
|
- lib/dependabot/file_updaters/ruby/bundler/gemfile_updater.rb
|
481
479
|
- lib/dependabot/file_updaters/ruby/bundler/gemspec_dependency_name_finder.rb
|
@@ -499,7 +497,6 @@ files:
|
|
499
497
|
- lib/dependabot/metadata_finders/dotnet/nuget.rb
|
500
498
|
- lib/dependabot/metadata_finders/elixir/hex.rb
|
501
499
|
- lib/dependabot/metadata_finders/elm/elm_package.rb
|
502
|
-
- lib/dependabot/metadata_finders/git/submodules.rb
|
503
500
|
- lib/dependabot/metadata_finders/go/dep.rb
|
504
501
|
- lib/dependabot/metadata_finders/java/maven.rb
|
505
502
|
- lib/dependabot/metadata_finders/java_script/npm_and_yarn.rb
|
@@ -535,7 +532,6 @@ files:
|
|
535
532
|
- lib/dependabot/update_checkers/elm/elm_package/elm_18_version_resolver.rb
|
536
533
|
- lib/dependabot/update_checkers/elm/elm_package/elm_19_version_resolver.rb
|
537
534
|
- lib/dependabot/update_checkers/elm/elm_package/requirements_updater.rb
|
538
|
-
- lib/dependabot/update_checkers/git/submodules.rb
|
539
535
|
- lib/dependabot/update_checkers/go/dep.rb
|
540
536
|
- lib/dependabot/update_checkers/go/dep/file_preparer.rb
|
541
537
|
- lib/dependabot/update_checkers/go/dep/latest_version_finder.rb
|
@@ -622,7 +618,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
622
618
|
version: 2.7.3
|
623
619
|
requirements: []
|
624
620
|
rubyforge_project:
|
625
|
-
rubygems_version: 2.7.
|
621
|
+
rubygems_version: 2.7.8
|
626
622
|
signing_key:
|
627
623
|
specification_version: 4
|
628
624
|
summary: Automated dependency management
|
@@ -1,73 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "parseconfig"
|
4
|
-
require "dependabot/file_fetchers/base"
|
5
|
-
require "dependabot/shared_helpers"
|
6
|
-
|
7
|
-
module Dependabot
|
8
|
-
module FileFetchers
|
9
|
-
module Git
|
10
|
-
class Submodules < Dependabot::FileFetchers::Base
|
11
|
-
def self.required_files_in?(filenames)
|
12
|
-
filenames.include?(".gitmodules")
|
13
|
-
end
|
14
|
-
|
15
|
-
def self.required_files_message
|
16
|
-
"Repo must contain a .gitmodules file."
|
17
|
-
end
|
18
|
-
|
19
|
-
private
|
20
|
-
|
21
|
-
def fetch_files
|
22
|
-
fetched_files = []
|
23
|
-
fetched_files << gitmodules_file
|
24
|
-
fetched_files += submodule_refs
|
25
|
-
fetched_files
|
26
|
-
end
|
27
|
-
|
28
|
-
def gitmodules_file
|
29
|
-
@gitmodules_file ||= fetch_file_from_host(".gitmodules")
|
30
|
-
end
|
31
|
-
|
32
|
-
def submodule_refs
|
33
|
-
submodule_paths.
|
34
|
-
map { |path| fetch_submodule_ref_from_host(path) }.
|
35
|
-
tap { |refs| refs.each { |f| f.support_file = true } }
|
36
|
-
end
|
37
|
-
|
38
|
-
def submodule_paths
|
39
|
-
SharedHelpers.in_a_temporary_directory do
|
40
|
-
File.write(".gitmodules", gitmodules_file.content)
|
41
|
-
ParseConfig.new(".gitmodules").params.values.map { |p| p["path"] }
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
def fetch_submodule_ref_from_host(submodule_path)
|
46
|
-
path = Pathname.new(File.join(directory, submodule_path)).
|
47
|
-
cleanpath.to_path.gsub(%r{^/*}, "")
|
48
|
-
sha = case source.provider
|
49
|
-
when "github"
|
50
|
-
github_client_for_source.contents(
|
51
|
-
repo,
|
52
|
-
path: path,
|
53
|
-
ref: commit
|
54
|
-
).sha
|
55
|
-
when "gitlab"
|
56
|
-
tmp_path = path.gsub(%r{^/*}, "")
|
57
|
-
gitlab_client.get_file(repo, tmp_path, commit).blob_id
|
58
|
-
else raise "Unsupported provider '#{source.provider}'."
|
59
|
-
end
|
60
|
-
|
61
|
-
DependencyFile.new(
|
62
|
-
name: Pathname.new(submodule_path).cleanpath.to_path,
|
63
|
-
content: sha,
|
64
|
-
directory: directory,
|
65
|
-
type: "submodule"
|
66
|
-
)
|
67
|
-
rescue Octokit::NotFound, Gitlab::Error::NotFound
|
68
|
-
raise Dependabot::DependencyFileNotFound, path
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
@@ -1,69 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "parseconfig"
|
4
|
-
require "dependabot/dependency"
|
5
|
-
require "dependabot/file_parsers/base"
|
6
|
-
require "dependabot/shared_helpers"
|
7
|
-
|
8
|
-
module Dependabot
|
9
|
-
module FileParsers
|
10
|
-
module Git
|
11
|
-
class Submodules < Dependabot::FileParsers::Base
|
12
|
-
def parse
|
13
|
-
SharedHelpers.in_a_temporary_directory do
|
14
|
-
File.write(".gitmodules", gitmodules_file.content)
|
15
|
-
|
16
|
-
ParseConfig.new(".gitmodules").params.map do |_, params|
|
17
|
-
branch = params["branch"]
|
18
|
-
|
19
|
-
Dependency.new(
|
20
|
-
name: params["path"],
|
21
|
-
version: submodule_sha(params["path"]),
|
22
|
-
package_manager: "submodules",
|
23
|
-
requirements: [{
|
24
|
-
requirement: nil,
|
25
|
-
file: ".gitmodules",
|
26
|
-
source: {
|
27
|
-
type: "git",
|
28
|
-
url: absolute_url(params["url"]),
|
29
|
-
branch: branch,
|
30
|
-
ref: branch
|
31
|
-
},
|
32
|
-
groups: []
|
33
|
-
}]
|
34
|
-
)
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
private
|
40
|
-
|
41
|
-
def absolute_url(url)
|
42
|
-
# Submodules can be specified with a relative URL (e.g., ../repo.git)
|
43
|
-
# which we want to expand out into a full URL if present.
|
44
|
-
return url unless url.start_with?("../", "./")
|
45
|
-
|
46
|
-
path = Pathname.new(File.join(source.repo, url))
|
47
|
-
"https://#{source.hostname}/#{path.cleanpath}"
|
48
|
-
end
|
49
|
-
|
50
|
-
def submodule_sha(path)
|
51
|
-
submodule = dependency_files.find { |f| f.name == path }
|
52
|
-
raise "Submodule not found #{path}" unless submodule
|
53
|
-
|
54
|
-
submodule.content
|
55
|
-
end
|
56
|
-
|
57
|
-
def gitmodules_file
|
58
|
-
@gitmodules_file ||= get_original_file(".gitmodules")
|
59
|
-
end
|
60
|
-
|
61
|
-
def check_required_files
|
62
|
-
%w(.gitmodules).each do |filename|
|
63
|
-
raise "No #{filename}!" unless get_original_file(filename)
|
64
|
-
end
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
@@ -1,38 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "dependabot/file_updaters/base"
|
4
|
-
|
5
|
-
module Dependabot
|
6
|
-
module FileUpdaters
|
7
|
-
module Git
|
8
|
-
class Submodules < Dependabot::FileUpdaters::Base
|
9
|
-
def self.updated_files_regex
|
10
|
-
[]
|
11
|
-
end
|
12
|
-
|
13
|
-
def updated_dependency_files
|
14
|
-
[updated_file(file: submodule, content: dependency.version)]
|
15
|
-
end
|
16
|
-
|
17
|
-
private
|
18
|
-
|
19
|
-
def dependency
|
20
|
-
# Git submodules will only ever be updating a single dependency
|
21
|
-
dependencies.first
|
22
|
-
end
|
23
|
-
|
24
|
-
def check_required_files
|
25
|
-
%w(.gitmodules).each do |filename|
|
26
|
-
raise "No #{filename}!" unless get_original_file(filename)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
def submodule
|
31
|
-
@submodule ||= dependency_files.find do |file|
|
32
|
-
file.name == dependency.name
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "dependabot/metadata_finders/base"
|
4
|
-
|
5
|
-
module Dependabot
|
6
|
-
module MetadataFinders
|
7
|
-
module Git
|
8
|
-
class Submodules < Dependabot::MetadataFinders::Base
|
9
|
-
private
|
10
|
-
|
11
|
-
def look_up_source
|
12
|
-
url = dependency.requirements.first.fetch(:source)[:url] ||
|
13
|
-
dependency.requirements.first.fetch(:source).fetch("url")
|
14
|
-
|
15
|
-
Source.from_url(url)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,52 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "dependabot/update_checkers/base"
|
4
|
-
require "dependabot/git_commit_checker"
|
5
|
-
|
6
|
-
module Dependabot
|
7
|
-
module UpdateCheckers
|
8
|
-
module Git
|
9
|
-
class Submodules < Dependabot::UpdateCheckers::Base
|
10
|
-
def latest_version
|
11
|
-
@latest_version ||= fetch_latest_version
|
12
|
-
end
|
13
|
-
|
14
|
-
def latest_resolvable_version
|
15
|
-
# Resolvability isn't an issue for submodules.
|
16
|
-
latest_version
|
17
|
-
end
|
18
|
-
|
19
|
-
def latest_resolvable_version_with_no_unlock
|
20
|
-
# No concept of "unlocking" for submodules
|
21
|
-
latest_version
|
22
|
-
end
|
23
|
-
|
24
|
-
def updated_requirements
|
25
|
-
# Submodule requirements are the URL and branch to use for the
|
26
|
-
# submodule. We never want to update either.
|
27
|
-
dependency.requirements
|
28
|
-
end
|
29
|
-
|
30
|
-
private
|
31
|
-
|
32
|
-
def latest_version_resolvable_with_full_unlock?
|
33
|
-
# Full unlock checks aren't relevant for submodules
|
34
|
-
false
|
35
|
-
end
|
36
|
-
|
37
|
-
def updated_dependencies_after_full_unlock
|
38
|
-
raise NotImplementedError
|
39
|
-
end
|
40
|
-
|
41
|
-
def fetch_latest_version
|
42
|
-
git_commit_checker = GitCommitChecker.new(
|
43
|
-
dependency: dependency,
|
44
|
-
credentials: credentials
|
45
|
-
)
|
46
|
-
|
47
|
-
git_commit_checker.head_commit_for_current_branch
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|