dependabot-hex 0.392.0 → 0.393.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: 9587a3a768819d1a9f8f93c794a8fb6f207c7e11505a01ceed45c3ef1b625e2d
4
- data.tar.gz: c86ce17c07e9d0ee74fb8acbcb8eb135a46eb066935cdee9cb1d90eb8a97671e
3
+ metadata.gz: 92323d9c76236c94839493510f99be26235107905a7ad357f959c35decf99ed2
4
+ data.tar.gz: 4b6bddad28382f25198a679f9ee03618db2770c7b0d1b1ebd552838354b9bbc2
5
5
  SHA512:
6
- metadata.gz: 4ec2563a4358e608e09046e5ca9c4cc334011211232bab4ec21b2bc00ade4ec0c634e9c8d387c14e20a46f1c85b4b67f58853d045af8a2e707b34afdc61f12b0
7
- data.tar.gz: 7a3a452c29f6fc050ba510c5ded29a0b37e0a4e988bccf9d291d7b5d877ee1f420f97e141d4dbd1e35a52ed4813ef7e54bafe97ac219db2643a9b294c0a0804a
6
+ metadata.gz: eddd39a645ea753ed5c4c77e072f67f3b822442fea1b2f0511c7e6ee2899e23acdb3410edf4174c181dcaff2005069b0ac8fad3bc3efcc0b57c2f1f0834243d5
7
+ data.tar.gz: 6b09a9b0300bb8b615bd8a21d8a8ec5ac5dae8ddb91ee5fc9cf292c3bd9cff5b4d946a5514ddc7be909db31ff22a99ba5c20e7784e0b067cbfda4656221cb562
@@ -1,4 +1,4 @@
1
- # typed: strict
1
+ # typed: strong
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require "sorbet-runtime"
@@ -29,13 +29,13 @@ module Dependabot
29
29
  @dependencies = dependencies
30
30
  @dependency_files = dependency_files
31
31
  @credentials = credentials
32
+ @updated_lockfile_content = T.let(nil, T.nilable(String))
32
33
  end
33
34
 
34
35
  sig { returns(String) }
35
36
  def updated_lockfile_content
36
- @updated_lockfile_content = T.let(@updated_lockfile_content, T.nilable(String))
37
- @updated_lockfile_content ||=
38
- SharedHelpers.in_a_temporary_directory do
37
+ unless @updated_lockfile_content
38
+ result = SharedHelpers.in_a_temporary_directory do
39
39
  write_temporary_dependency_files
40
40
  FileUtils.cp(elixir_helper_do_update_path, "do_update.exs")
41
41
 
@@ -48,6 +48,9 @@ module Dependabot
48
48
  )
49
49
  end
50
50
  end
51
+ content = T.cast(result, String)
52
+ @updated_lockfile_content = content
53
+ end
51
54
 
52
55
  post_process_lockfile(@updated_lockfile_content)
53
56
  rescue SharedHelpers::HelperSubprocessFailed => e
@@ -79,12 +79,15 @@ module Dependabot
79
79
 
80
80
  sig { returns(String) }
81
81
  def run_elixir_update_checker
82
- SharedHelpers.run_helper_subprocess(
83
- env: mix_env,
84
- command: "mix run #{elixir_helper_path}",
85
- function: "get_latest_resolvable_version",
86
- args: [Dir.pwd, dependency.name, CredentialHelpers.hex_credentials(credentials)],
87
- stderr_to_stdout: true
82
+ T.cast(
83
+ SharedHelpers.run_helper_subprocess(
84
+ env: mix_env,
85
+ command: "mix run #{elixir_helper_path}",
86
+ function: "get_latest_resolvable_version",
87
+ args: [Dir.pwd, dependency.name, CredentialHelpers.hex_credentials(credentials)],
88
+ stderr_to_stdout: true
89
+ ),
90
+ String
88
91
  )
89
92
  end
90
93
 
@@ -91,7 +91,7 @@ module Dependabot
91
91
  if git_commit_checker.pinned_ref_looks_like_version? &&
92
92
  latest_git_tag_is_resolvable?
93
93
  new_tag = git_commit_checker.local_tag_for_latest_version(update_cooldown)
94
- return T.must(new_tag).fetch(:commit_sha)
94
+ return T.must(new_tag).commit_sha
95
95
  end
96
96
 
97
97
  # If the dependency is pinned then there's nothing we can do.
@@ -126,7 +126,7 @@ module Dependabot
126
126
  # of the latest tag that looks like a version.
127
127
  if git_commit_checker.pinned_ref_looks_like_version?
128
128
  latest_tag = git_commit_checker.local_tag_for_latest_version(update_cooldown)
129
- return latest_tag&.fetch(:commit_sha) || dependency.version
129
+ return latest_tag&.commit_sha || dependency.version
130
130
  end
131
131
 
132
132
  # If the dependency is pinned to a tag that doesn't look like a
@@ -147,7 +147,7 @@ module Dependabot
147
147
  prepared_files = FilePreparer.new(
148
148
  dependency: dependency,
149
149
  dependency_files: dependency_files,
150
- replacement_git_pin: T.must(replacement_tag).fetch(:tag)
150
+ replacement_git_pin: T.must(replacement_tag).tag
151
151
  ).prepared_dependency_files
152
152
 
153
153
  resolver_result = VersionResolver.new(
@@ -178,7 +178,7 @@ module Dependabot
178
178
  new_tag = git_commit_checker.local_tag_for_latest_version(update_cooldown)
179
179
  return source_with_ref(
180
180
  T.must(dependency_source_details),
181
- T.cast(T.must(new_tag).fetch(:tag), String)
181
+ T.must(new_tag).tag
182
182
  )
183
183
  end
184
184
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-hex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.392.0
4
+ version: 0.393.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.392.0
18
+ version: 0.393.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.392.0
25
+ version: 0.393.0
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: debug
28
28
  requirement: !ruby/object:Gem::Requirement
@@ -274,7 +274,7 @@ licenses:
274
274
  - MIT
275
275
  metadata:
276
276
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
277
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.392.0
277
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.393.0
278
278
  rdoc_options: []
279
279
  require_paths:
280
280
  - lib