Class: Dependabot::NpmAndYarn::DependencyFilesFilterer
- Inherits:
-
Object
- Object
- Dependabot::NpmAndYarn::DependencyFilesFilterer
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/npm_and_yarn/dependency_files_filterer.rb
Instance Method Summary collapse
- #files_requiring_update ⇒ Object
-
#initialize(dependency_files:, updated_dependencies:) ⇒ DependencyFilesFilterer
constructor
A new instance of DependencyFilesFilterer.
- #package_files_requiring_update ⇒ Object
- #paths_requiring_update_check ⇒ Object
Constructor Details
#initialize(dependency_files:, updated_dependencies:) ⇒ DependencyFilesFilterer
Returns a new instance of DependencyFilesFilterer.
17 18 19 20 |
# File 'lib/dependabot/npm_and_yarn/dependency_files_filterer.rb', line 17 def initialize(dependency_files:, updated_dependencies:) @dependency_files = dependency_files @updated_dependencies = updated_dependencies end |
Instance Method Details
#files_requiring_update ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'lib/dependabot/npm_and_yarn/dependency_files_filterer.rb', line 28 def files_requiring_update @files_requiring_update ||= T.let( dependency_files.select do |file| package_files_requiring_update.include?(file) || package_required_lockfile?(file) || workspaces_lockfile?(file) end, T.nilable(T::Array[DependencyFile]) ) end |
#package_files_requiring_update ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/dependabot/npm_and_yarn/dependency_files_filterer.rb', line 39 def package_files_requiring_update @package_files_requiring_update ||= T.let( dependency_files.select do |file| dependency_manifest_requirements.include?(file.name) end, T.nilable(T::Array[DependencyFile]) ) end |
#paths_requiring_update_check ⇒ Object
23 24 25 |
# File 'lib/dependabot/npm_and_yarn/dependency_files_filterer.rb', line 23 def paths_requiring_update_check @paths_requiring_update_check ||= T.let(fetch_paths_requiring_update_check, T.nilable(T::Array[String])) end |