elm-upgrade
elm-upgrade copied to clipboard
elm-upgrade checklist additions (elm/json, elm/url, elm/browser)
-
Json.Encode.list takes care of mapping
( a -> Value )now egList.map toValue |> Json.Encode.list->Json.Encode.list toValue -
Navigation.newUrl -> Browser.Navigation.pushUrl
-
jweir/elm-iso8601 now converts between Posix (elm/time) and ISO8601: https://package.elm-lang.org/packages/jweir/elm-iso8601/latest/ISO8601#toPosix
-
rm -rf elm-stuffis a very reasonable solution to commonelm: not enough bytesissues due to compiler performance gains -
UrlParser.custom -> Url.Parser.custom ( returns Maybe now instead of Result )
more to come as I work out Navigation: https://gist.github.com/mordrax/efcd34739ed56bb64d2b12d2401b7291
- As inline js and innerHTML is not longuer supported, it would be handy to have a warning about it. I don't know how feasible it would be to detect code doing it (href with
javascript:?onxxxas attributes?) but displaying a warning when elm-upgrade runs would be a start. And mention web component as an upgrade path. - If the project has tests, remove the
elm-package.jsonin the test folder and put dependencies intest-dependenciesalongsideelm-explirations/test.
In my recent run, this import was not updated:
import UrlParser as Url exposing ((</>), Parser, parseHash, s, string)
My upgrade failed due to websocket dependency, so I haven't tested, but I think it ought to be:
import Url exposing ((</>), Parser, parseHash, s, string)