Skip to content

Commit 2cafffb

Browse files
authored
Merge branch 'main' into kamil/fix-maven-sorbet-typings
2 parents 56c4be7 + 048feb4 commit 2cafffb

File tree

2 files changed

+5
-26
lines changed

2 files changed

+5
-26
lines changed

bun/lib/dependabot/bun/file_fetcher.rb

-2
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ def bun_files
9898

9999
sig { returns(T.nilable(T.any(Integer, String))) }
100100
def bun_version
101-
return @bun_version = nil unless allow_beta_ecosystems?
102-
103101
@bun_version ||= T.let(
104102
package_manager_helper.setup(BunPackageManager::NAME),
105103
T.nilable(T.any(Integer, String))

bun/spec/dependabot/bun/file_fetcher_spec.rb

+5-24
Original file line numberDiff line numberDiff line change
@@ -73,32 +73,13 @@
7373
describe "fetching and parsing the bun.lock" do
7474
before do
7575
allow(Dependabot::Experiments).to receive(:enabled?)
76-
allow(Dependabot::Experiments).to receive(:enabled?)
77-
.with(:enable_bun_ecosystem).and_return(enable_beta_ecosystems)
78-
allow(Dependabot::Experiments).to receive(:enabled?)
79-
.with(:enable_beta_ecosystems).and_return(enable_beta_ecosystems)
8076
end
8177

82-
context "when the experiment :enable_beta_ecosystems is inactive" do
83-
let(:enable_beta_ecosystems) { false }
84-
85-
it "does not fetch or parse the the bun.lock" do
86-
expect(file_fetcher_instance.files.map(&:name))
87-
.to match_array(%w(package.json))
88-
expect(file_fetcher_instance.ecosystem_versions)
89-
.to match({ package_managers: { "unknown" => an_instance_of(Integer) } })
90-
end
91-
end
92-
93-
context "when the experiment :enable_beta_ecosystems is active" do
94-
let(:enable_beta_ecosystems) { true }
95-
96-
it "fetches and parses the bun.lock" do
97-
expect(file_fetcher_instance.files.map(&:name))
98-
.to match_array(%w(package.json bun.lock))
99-
expect(file_fetcher_instance.ecosystem_versions)
100-
.to match({ package_managers: { "bun" => an_instance_of(Integer) } })
101-
end
78+
it "fetches and parses the bun.lock" do
79+
expect(file_fetcher_instance.files.map(&:name))
80+
.to match_array(%w(package.json bun.lock))
81+
expect(file_fetcher_instance.ecosystem_versions)
82+
.to match({ package_managers: { "bun" => an_instance_of(Integer) } })
10283
end
10384
end
10485
end

0 commit comments

Comments
 (0)