Class: Dependabot::Elm::FileParser

Inherits:
FileParsers::Base
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/dependabot/elm/file_parser.rb

Constant Summary collapse

DEPENDENCY_TYPES =
%w(dependencies test-dependencies).freeze

Instance Method Summary collapse

Instance Method Details

#ecosystemObject



33
34
35
36
37
38
39
40
41
42
# File 'lib/dependabot/elm/file_parser.rb', line 33

def ecosystem
  @ecosystem ||= T.let(
    Ecosystem.new(
      name: ECOSYSTEM,
      package_manager: package_manager,
      language: language
    ),
    T.nilable(Ecosystem)
  )
end

#parseObject



24
25
26
27
28
29
30
# File 'lib/dependabot/elm/file_parser.rb', line 24

def parse
  dependency_set = DependencySet.new

  dependency_set += elm_json_dependencies if elm_json

  dependency_set.dependencies.sort_by(&:name)
end