Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sachin-sandhu committed Dec 11, 2024
1 parent c5949ab commit 817438f
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions nuget/lib/dependabot/nuget/file_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def dependencies
end, T.nilable(T::Array[Dependabot::Dependency]))
end

sig { returns(T.nilable(Dependabot::Nuget::NativeDiscoveryJsonReader)) }
sig { returns(T.nilable(T::Array[Dependabot::Nuget::NativeProjectDiscovery])) }
def content
@content ||= T.let(begin
directory = source&.directory || "/"
Expand All @@ -63,8 +63,8 @@ def content
credentials: credentials
)

discovery_json_reader
end, T.nilable(Dependabot::Nuget::NativeDiscoveryJsonReader))
discovery_json_reader.workspace_discovery&.projects
end, T.nilable(T::Array[Dependabot::Nuget::NativeProjectDiscovery]))
end

sig { override.void }
Expand Down Expand Up @@ -112,13 +112,18 @@ def language

sig { returns(T.nilable(T::Array[T.nilable(String)])) }
def framework_version
workplace_json = T.let(content.send(:workspace_discovery),
T.nilable(Dependabot::Nuget::NativeWorkspaceDiscovery))
project_json = T.let(workplace_json.send(:projects),
T::Array[NativeProjectDiscovery])
project_json.map do |framework|
T.let(T.let(framework.instance_variable_get(:@target_frameworks), T::Array[String]).first,
T.nilable(String))
# x debugger

# T.nilable(Dependabot::Nuget::NativeWorkspaceDiscovery))
# workplace_json = T.let(content.send(:workspace_discovery),
# T.nilable(Dependabot::Nuget::NativeWorkspaceDiscovery))
# project_json = T.let(workplace_json.send(:projects),
# T::Array[NativeProjectDiscovery])
content&.map do |framework|
# T.let(T.let(framework.instance_variable_get(:@target_frameworks), T::Array[String]).first,
# T.nilable(String))
# debugger
T.let(framework.instance_variable_get(:@target_frameworks), T::Array[String]).first
end
rescue StandardError
nil
Expand Down

0 comments on commit 817438f

Please sign in to comment.