Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle enable_beta_ecosystems boolean setting #11334

Merged
merged 3 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading