Skip to content

Commit

Permalink
Fix missing module name (#1187)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhyskoedijk authored Jul 3, 2024
1 parent 35a44d3 commit 359f1f7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions updater/bin/update_script.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,10 @@
unless ENV["DEPENDABOT_VERSIONING_STRATEGY"].to_s.strip.empty?
# [Hash<String, Symbol>]
VERSIONING_STRATEGIES = {
"lockfile-only" => RequirementsUpdateStrategy::LockfileOnly,
"widen" => RequirementsUpdateStrategy::WidenRanges,
"increase" => RequirementsUpdateStrategy::BumpVersions,
"increase-if-necessary" => RequirementsUpdateStrategy::BumpVersionsIfNecessary
"lockfile-only" => Dependabot::RequirementsUpdateStrategy::LockfileOnly,
"widen" => Dependabot::RequirementsUpdateStrategy::WidenRanges,
"increase" => Dependabot::RequirementsUpdateStrategy::BumpVersions,
"increase-if-necessary" => Dependabot::RequirementsUpdateStrategy::BumpVersionsIfNecessary
}.freeze
strategy_raw = ENV.fetch("DEPENDABOT_VERSIONING_STRATEGY", nil)
$options[:requirements_update_strategy] = case strategy_raw
Expand All @@ -195,17 +195,17 @@
# https://github.com/dependabot/dependabot-core/blob/5926b243b2875ad0d8c0a52c09210c4f5f274c5e/composer/lib/dependabot/composer/update_checker/requirements_updater.rb#L23-L24
if $package_manager == "npm_and_yarn" || $package_manager == "composer"
strategy = $options[:requirements_update_strategy]
if strategy.nil? || strategy == RequirementsUpdateStrategy::LockfileOnly
$options[:requirements_update_strategy] = RequirementsUpdateStrategy::BumpVersions
if strategy.nil? || strategy == Dependabot::RequirementsUpdateStrategy::LockfileOnly
$options[:requirements_update_strategy] = Dependabot::RequirementsUpdateStrategy::BumpVersions
end
end

# For pub, we also correct the strategy
# https://github.com/dependabot/dependabot-core/blob/ca9f236591ba49fa6e2a8d5f06e538614033a628/pub/lib/dependabot/pub/update_checker.rb#L110
if $package_manager == "pub"
strategy = $options[:requirements_update_strategy]
if strategy == RequirementsUpdateStrategy::LockfileOnly
$options[:requirements_update_strategy] = RequirementsUpdateStrategy::BumpVersions
if strategy == Dependabot::RequirementsUpdateStrategy::LockfileOnly
$options[:requirements_update_strategy] = Dependabot::RequirementsUpdateStrategy::BumpVersions
end
end
end
Expand Down

0 comments on commit 359f1f7

Please sign in to comment.