Skip to content

Commit

Permalink
Remove :enable_pnpm_workspace_catalog feature flag (#11477)
Browse files Browse the repository at this point in the history
* remove `:enable_pnpm_workspace_catalog` feature flag

* removing any
  • Loading branch information
robaiken authored Feb 4, 2025
1 parent fc8025f commit 605f4a7
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 18 deletions.
7 changes: 1 addition & 6 deletions npm_and_yarn/lib/dependabot/npm_and_yarn/file_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def parse # rubocop:disable Metrics/PerceivedComplexity
dependency_set = DependencySet.new
dependency_set += manifest_dependencies
dependency_set += lockfile_dependencies
dependency_set += workspace_catalog_dependencies if enable_pnpm_workspace_catalog?
dependency_set += workspace_catalog_dependencies if pnpm_workspace_yml

dependencies = Helpers.dependencies_with_all_versions_metadata(dependency_set)

Expand Down Expand Up @@ -94,11 +94,6 @@ def ecosystem

private

sig { returns(T.nilable(T::Boolean)) }
def enable_pnpm_workspace_catalog?
pnpm_workspace_yml && Dependabot::Experiments.enabled?(:enable_pnpm_workspace_catalog)
end

sig { returns(PackageManagerHelper) }
def package_manager_helper
@package_manager_helper ||= T.let(
Expand Down
7 changes: 1 addition & 6 deletions npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def updated_dependency_files
updated_files = T.let([], T::Array[DependencyFile])

updated_files += updated_manifest_files
updated_files += if should_update_pnpm_workspace?
updated_files += if pnpm_workspace.any?
update_pnpm_workspace_and_locks
else
updated_lockfiles
Expand Down Expand Up @@ -99,11 +99,6 @@ def updated_dependency_files

private

sig { returns(T::Boolean) }
def should_update_pnpm_workspace?
Dependabot::Experiments.enabled?(:enable_pnpm_workspace_catalog) && pnpm_workspace.any?
end

sig { returns(T::Array[Dependabot::DependencyFile]) }
def update_pnpm_workspace_and_locks
workspace_updates = updated_pnpm_workspace_files
Expand Down
2 changes: 0 additions & 2 deletions npm_and_yarn/spec/dependabot/npm_and_yarn/file_parser_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
.with(:npm_v6_deprecation_warning).and_return(true)
allow(Dependabot::Experiments).to receive(:enabled?)
.with(:enable_fix_for_pnpm_no_change_error).and_return(true)
allow(Dependabot::Experiments).to receive(:enabled?)
.with(:enable_pnpm_workspace_catalog).and_return(true)
end

after do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@
.with(:enable_corepack_for_npm_and_yarn).and_return(enable_corepack_for_npm_and_yarn)
allow(Dependabot::Experiments).to receive(:enabled?)
.with(:enable_shared_helpers_command_timeout).and_return(true)
allow(Dependabot::Experiments).to receive(:enabled?)
.with(:enable_pnpm_workspace_catalog).and_return(true)
end

after do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@
.with(:npm_v6_deprecation_warning).and_return(true)
allow(Dependabot::Experiments).to receive(:enabled?)
.with(:enable_fix_for_pnpm_no_change_error).and_return(true)
allow(Dependabot::Experiments).to receive(:enabled?)
.with(:enable_pnpm_workspace_catalog).and_return(true)
allow(Dependabot::Experiments).to receive(:enabled?)
.with(:avoid_duplicate_updates_package_json).and_return(false)
end
Expand Down

0 comments on commit 605f4a7

Please sign in to comment.