Class: Dependabot::NpmAndYarn::UpdateChecker::LibraryDetector

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

Instance Method Summary collapse

Constructor Details

#initialize(package_json_file:, credentials:, dependency_files:) ⇒ LibraryDetector



24
25
26
27
28
# File 'lib/dependabot/npm_and_yarn/update_checker/library_detector.rb', line 24

def initialize(package_json_file:, credentials:, dependency_files:)
  @package_json_file = package_json_file
  @credentials = credentials
  @dependency_files = dependency_files
end

Instance Method Details

#library?Boolean



31
32
33
34
35
# File 'lib/dependabot/npm_and_yarn/update_checker/library_detector.rb', line 31

def library?
  return false unless package_json_may_be_for_library?

  npm_response_matches_package_json?
end