diff --git a/bin/dry-run.rb b/bin/dry-run.rb index 653c0c1e68..cae15b736d 100755 --- a/bin/dry-run.rb +++ b/bin/dry-run.rb @@ -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 diff --git a/common/lib/dependabot/file_fetchers/base.rb b/common/lib/dependabot/file_fetchers/base.rb index 509687a964..446e42c351 100644 --- a/common/lib/dependabot/file_fetchers/base.rb +++ b/common/lib/dependabot/file_fetchers/base.rb @@ -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? diff --git a/npm_and_yarn/lib/dependabot/npm_and_yarn/file_fetcher.rb b/npm_and_yarn/lib/dependabot/npm_and_yarn/file_fetcher.rb index 289b20ccb2..a066c5527c 100644 --- a/npm_and_yarn/lib/dependabot/npm_and_yarn/file_fetcher.rb +++ b/npm_and_yarn/lib/dependabot/npm_and_yarn/file_fetcher.rb @@ -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),