dependabot-devcontainers 0.385.0 → 0.386.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: 67a0dd08afaeeef200839d662dde96e06ddc5470eac063ed2115e913b28117a8
4
- data.tar.gz: 0f17eb94f5d61817f33843c9ab93a979716bc05f4420450640007983e82b6fb5
3
+ metadata.gz: 5882eb429b9ec36741663d84fedf2782f19aa13db7716d46ee88e0acbcc1753d
4
+ data.tar.gz: 1e1b42fc429c9e69f5f4bf5e692845092c72ff8fe7102605b86c6d1e54d1a059
5
5
  SHA512:
6
- metadata.gz: bea7b1f7fb6ab4cb8bb0cf65810c912f53283ebb6d3094154bbc7131c7b1d67ae4eadde4547f10644c9022dadb1f50e33eb8ea848145684d0bf1ec1b7431df68
7
- data.tar.gz: 81c574f22679f84d4fa4d9ef94a6c93c7f2f630a13b539ff4f026e270579beefd7af12d4f5b411bc15d22a3a714ed69a6f433edab00e30fc02a6050284e94dd1
6
+ metadata.gz: 7887c168071758bbe91880bcdfd418b8cfba97311b108319347307a3aa053b2bbefe72bb635d19293cf4140474c938707c7fadc1338d2f0907459b1614593a8f
7
+ data.tar.gz: b7cd260b85e56e04ed58d4b16ecb78a25fe888a2b8df2b009468b58a49a7ec0c3d3e9d927a58fa5a8856d85ee4d993da7e9d7225439b610a74dcc99b2e02d1fd
@@ -63,21 +63,21 @@ module Dependabot
63
63
  return [] unless devcontainer_directory
64
64
 
65
65
  custom_directories.flat_map do |directory|
66
- fetch_config_and_lockfile_from(directory.path)
66
+ fetch_config_and_lockfile_from(T.must(directory.path))
67
67
  end
68
68
  end
69
69
 
70
- sig { returns(T::Array[T.untyped]) }
70
+ sig { returns(T::Array[Dependabot::FileFetchers::RepositoryContent]) }
71
71
  def custom_directories
72
72
  repo_contents(dir: ".devcontainer").select { |f| f.type == "dir" && f.name != ".devcontainer" }
73
73
  end
74
74
 
75
- sig { returns(T.untyped) }
75
+ sig { returns(T.nilable(Dependabot::FileFetchers::RepositoryContent)) }
76
76
  def devcontainer_directory
77
77
  @devcontainer_directory ||=
78
78
  T.let(
79
79
  repo_contents.find { |f| f.type == "dir" && f.name == ".devcontainer" },
80
- T.untyped
80
+ T.nilable(Dependabot::FileFetchers::RepositoryContent)
81
81
  )
82
82
  end
83
83
 
@@ -46,7 +46,7 @@ module Dependabot
46
46
  end
47
47
 
48
48
  # https://github.com/devcontainers/cli/blob/9444540283b236298c28f397dea879e7ec222ca1/src/spec-node/devContainersSpecCLI.ts#L1072
49
- sig { returns(T::Hash[String, T.untyped]) }
49
+ sig { returns(T::Hash[String, T.anything]) }
50
50
  def evaluate_with_cli
51
51
  raise "config_file_path must be a string" unless config_file_path.is_a?(String) && !config_file_path.empty?
52
52
 
@@ -61,13 +61,14 @@ module Dependabot
61
61
  JSON.parse(json)
62
62
  end
63
63
 
64
- sig { params(json: T::Hash[String, T.untyped]).returns(T::Array[Dependabot::Dependency]) }
64
+ sig { params(json: T::Hash[String, T.anything]).returns(T::Array[Dependabot::Dependency]) }
65
65
  def parse_cli_json(json)
66
66
  dependencies = []
67
67
 
68
- features = json["features"]
68
+ features = T.cast(json["features"], T::Hash[String, T.anything])
69
69
  features.each do |feature, versions_object|
70
70
  name, requirement = feature.split(":")
71
+ next if name.nil?
71
72
 
72
73
  # Skip sha pinned tags for now. Ideally the devcontainers CLI would give us updated SHA info
73
74
  next if name.end_with?("@sha256")
@@ -76,7 +77,7 @@ module Dependabot
76
77
  # and `devcontainer upgrade` work with them. See https://github.com/devcontainers/cli/issues/712
77
78
  next unless name.include?("/")
78
79
 
79
- current = versions_object["current"]
80
+ current = T.cast(T.cast(versions_object, T::Hash[String, T.anything])["current"], T.nilable(String))
80
81
 
81
82
  dep = Dependency.new(
82
83
  name: name,
@@ -77,14 +77,14 @@ module Dependabot
77
77
  sig do
78
78
  params(
79
79
  manifest: Dependabot::DependencyFile,
80
- requirement: T::Hash[Symbol, T.untyped]
80
+ requirement: T::Hash[Symbol, T.anything]
81
81
  )
82
82
  .returns(T::Array[String])
83
83
  end
84
84
  def update(manifest, requirement)
85
85
  ConfigUpdater.new(
86
86
  feature: dependency.name,
87
- requirement: requirement[:requirement],
87
+ requirement: T.cast(requirement[:requirement], T.nilable(String)),
88
88
  version: T.must(dependency.version),
89
89
  manifest: manifest,
90
90
  repo_contents_path: T.must(repo_contents_path),
@@ -31,7 +31,7 @@ module Dependabot
31
31
  ignored_versions: T::Array[String],
32
32
  security_advisories: T::Array[Dependabot::SecurityAdvisory],
33
33
  raise_on_ignored: T::Boolean,
34
- options: T::Hash[Symbol, T.untyped],
34
+ options: T::Hash[Symbol, T.anything],
35
35
  cooldown_options: T.nilable(Dependabot::Package::ReleaseCooldownOptions)
36
36
  ).void
37
37
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-devcontainers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.385.0
4
+ version: 0.386.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - '='
17
17
  - !ruby/object:Gem::Version
18
- version: 0.385.0
18
+ version: 0.386.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.385.0
25
+ version: 0.386.0
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: debug
28
28
  requirement: !ruby/object:Gem::Requirement
@@ -260,7 +260,7 @@ licenses:
260
260
  - MIT
261
261
  metadata:
262
262
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
263
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.385.0
263
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.386.0
264
264
  rdoc_options: []
265
265
  require_paths:
266
266
  - lib