Class: Dependabot::NpmAndYarn::FileUpdater::NpmLockfileUpdater
- Inherits:
-
Object
- Object
- Dependabot::NpmAndYarn::FileUpdater::NpmLockfileUpdater
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/npm_and_yarn/file_updater/npm_lockfile_updater.rb
Instance Method Summary collapse
-
#initialize(lockfile:, dependencies:, dependency_files:, credentials:) ⇒ NpmLockfileUpdater
constructor
A new instance of NpmLockfileUpdater.
- #updated_lockfile ⇒ Object
- #updated_lockfile_reponse(response) ⇒ Object
Constructor Details
#initialize(lockfile:, dependencies:, dependency_files:, credentials:) ⇒ NpmLockfileUpdater
Returns a new instance of NpmLockfileUpdater.
36 37 38 39 40 41 |
# File 'lib/dependabot/npm_and_yarn/file_updater/npm_lockfile_updater.rb', line 36 def initialize(lockfile:, dependencies:, dependency_files:, credentials:) @lockfile = lockfile @dependencies = dependencies @dependency_files = dependency_files @credentials = credentials end |
Instance Method Details
#updated_lockfile ⇒ Object
44 45 46 47 48 |
# File 'lib/dependabot/npm_and_yarn/file_updater/npm_lockfile_updater.rb', line 44 def updated_lockfile updated_file = lockfile.dup updated_file.content = updated_lockfile_content updated_file end |
#updated_lockfile_reponse(response) ⇒ Object
51 52 53 |
# File 'lib/dependabot/npm_and_yarn/file_updater/npm_lockfile_updater.rb', line 51 def updated_lockfile_reponse(response) handle_npm_updater_error(response) end |