avh4 / elm-upgrade

Upgrade Elm projects
https://www.npmjs.com/package/elm-upgrade
MIT License
122 stars 15 forks source link

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

Closed avh4 closed 6 years ago

avh4 commented 6 years ago

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.

Qqwy commented 6 years ago

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

avh4 commented 6 years ago

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.

avh4 commented 6 years ago

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.