Skip to content

Commit

Permalink
Handle enable_beta_ecosystems boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
markhallen committed Jan 17, 2025
1 parent 1328acb commit f3427a3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions bin/dry-run.rb
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,10 @@
"Output pull request information metadata: title, description") do
$options[:pull_request] = true
end

opts.on("--enable-beta-ecosystems", "Enable beta ecosystems") do |_value|
$options[:updater_options] = { enable_beta_ecosystems: true }
end
end
# rubocop:enable Metrics/BlockLength

Expand Down
5 changes: 5 additions & 0 deletions common/lib/dependabot/file_fetchers/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ def target_branch
source.branch
end

sig { returns(T::Boolean)}
def allow_beta_ecosystems?
!!options["enable_beta_ecosystems"]
end

sig { returns(T::Array[DependencyFile]) }
def files
return @files if @files.any?
Expand Down
2 changes: 1 addition & 1 deletion npm_and_yarn/lib/dependabot/npm_and_yarn/file_fetcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def pnpm_version

sig { returns(T.nilable(T.any(Integer, String))) }
def bun_version
return @bun_version = nil unless Experiments.enabled?(:bun_updates)
return @bun_version = nil unless allow_beta_ecosystems? || Experiments.enabled?(:bun_updates)

@bun_version ||= T.let(
package_manager_helper.setup(BunPackageManager::NAME),
Expand Down

0 comments on commit f3427a3

Please sign in to comment.