@@ -64,7 +64,7 @@ decoder =
6464 (D.field "dirs" (D.list D.string))
6565 (D.field "files" (D.list fileDecoder))
6666 (D.field "readme" (D.nullable D.string))
67− (D.field "project" (D.nullable Project.decoder))
67+ (D.field "outline" (D.nullable Project.decoder))
6868 (D.field "exactDeps" (D.dict Version.decoder))
6969
7070
@@ -219,10 +219,10 @@ viewDeps exactDeps project =
219219 dependencies =
220220 case project of
221221 Project.Application info ->
222− List.map (viewDependency exactDeps) info.depsDirect
222+ List.map viewVersion info.depsDirect
223223
224224 Project.Package info ->
225− List.map (viewDependency exactDeps) info.deps
225+ List.map (viewConstraint exactDeps) info.deps
226226 in
227227 Skeleton.box
228228 { title = "Dependencies"
@@ -237,10 +237,10 @@ viewTestDeps exactDeps project =
237237 dependencies =
238238 case project of
239239 Project.Application info ->
240− List.map (viewDependency exactDeps) info.testDepsDirect
240+ List.map viewVersion info.testDepsDirect
241241
242242 Project.Package info ->
243− List.map (viewDependency exactDeps) info.testDeps
243+ List.map (viewConstraint exactDeps) info.testDeps
244244 in
245245 Skeleton.box
246246 { title = "Test Dependencies"
@@ -249,24 +249,31 @@ viewTestDeps exactDeps project =
249249 }
250250
251251
252−viewDependency : ExactDeps -> (Package.Name, vsn) -> List (Html msg)
253−viewDependency exactDeps (pkg, _) =
254− case Dict.get (Package.toString pkg) exactDeps of
255− Nothing ->
256− [ div [ style "float" "left" ]
257− [ Icon.package
258− , text (Package.toString pkg)
259− ]
260− , div [ style "float" "right" ] [ text "???" ]
252+viewVersion : (Package.Name, Version.Version) -> List (Html msg)
253+viewVersion (pkg, version) =
254+ [ div [ style "float" "left" ]
255+ [ Icon.package
256+ , a [ href (toPackageUrl pkg version) ] [ text (Package.toString pkg) ]
261257 ]
258+ , div [ style "float" "right" ] [ text (Version.toString version) ]
259+ ]
262260
263− Just version ->
264− [ div [ style "float" "left" ]
265− [ Icon.package
266− , a [ href (toPackageUrl pkg version) ] [ text (Package.toString pkg) ]
267− ]
268− , div [ style "float" "right" ] [ text (Version.toString version) ]
261+
262+viewConstraint : ExactDeps -> (Package.Name, constraint) -> List (Html msg)
263+viewConstraint exactDeps (packageName, _) =
264+ let
265+ pkg = Package.toString packageName
266+ vsn =
267+ case Dict.get pkg exactDeps of
268+ Just v -> Version.toString v
269+ Nothing -> "???"
270+ in
271+ [ div [ style "float" "left" ]
272+ [ Icon.package
273+ , text pkg
269274 ]
275+ , div [ style "float" "right" ] [ text vsn ]
276+ ]
270277
271278
272279toPackageUrl : Package.Name -> Version.Version -> String