avh4 / elm-upgrade

Upgrade Elm projects

Home Page:https://www.npmjs.com/package/elm-upgrade

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Don't do the 0.18 -> 0.19 upgrade if `elm.json` already exists

avh4 opened this issue · comments

Actually, it should probably move it to old-elm-package.json in case the user doesn't ahve version control.

The current behavior is that elm-package.json is left, but it is also strangely modified with some of the dependencies removed.

One of the things it modifies is changing the source-directories back to ".".

Hmm... it looks like elm-upgrade already does this, but it seems like people then accidentally run Elm 0.18 commands which recreate it, or something like that.

Yeah, this seems to be caused by people running Elm 0.18 commands, which silently recreate the elm-package.json. However, elm-upgrade-0.19.3 will no longer attempt the 0.18 upgrade if an elm.json is found, so this will hopefully no longer confuse elm-upgrade users.