Class: Dependabot::NpmAndYarn::FileUpdater::PnpmWorkspaceUpdater

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/dependabot/npm_and_yarn/file_updater/pnpm_workspace_updater.rb

Instance Method Summary collapse

Constructor Details

#initialize(workspace_file:, dependencies:) ⇒ PnpmWorkspaceUpdater

Returns a new instance of PnpmWorkspaceUpdater.



28
29
30
31
# File 'lib/dependabot/npm_and_yarn/file_updater/pnpm_workspace_updater.rb', line 28

def initialize(workspace_file:, dependencies:)
  @dependencies = dependencies
  @workspace_file = workspace_file
end

Instance Method Details

#updated_pnpm_workspaceObject



34
35
36
37
38
# File 'lib/dependabot/npm_and_yarn/file_updater/pnpm_workspace_updater.rb', line 34

def updated_pnpm_workspace
  updated_file = workspace_file.dup
  updated_file.content = updated_pnpm_workspace_content
  updated_file
end