From 045212b56142341fc95b79659c3ca218b0d5d282 Mon Sep 17 00:00:00 2001 From: antew Date: Sun, 12 Apr 2020 10:06:36 -0400 Subject: [PATCH] Fix decoding of package versions, the elm package site switched to having only the latest versions in a 'version' param (#130) --- lib/elm/platform/parser.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/elm/platform/parser.ex b/lib/elm/platform/parser.ex index 788abaec..9690830f 100644 --- a/lib/elm/platform/parser.ex +++ b/lib/elm/platform/parser.ex @@ -66,7 +66,7 @@ defmodule Elm.Platform.Parser do Decode.succeed(Function.curry(&%Searchable{name: &1, summary: &2, versions: &3})) |> Decode.and_map(Decode.field("name", name)) |> Decode.and_map(Decode.field("summary", Decode.string())) - |> Decode.and_map(Decode.field("versions", Decode.list(version))) + |> Decode.and_map(Decode.map(Decode.field("version", version), fn val -> [val] end)) Decode.list(searchable) end