#TIL #elixirlang 업데이트 가능한 패키지를 찾기 덤으로 버전 간 변경 사항까지 확인

프로젝트에 쓰는 패키지 중 버전이 올라간 패키지가 있을까?

$ mix hex.outdated

Dependency                    Current     Latest  Update possible
dialyxir                      1.0.0-rc.3  1.0.0   Yes
httpoison                     1.1.1       1.6.2   No
jason                         1.1.2       1.2.0   Yes
logger_file_backend           0.0.10      0.0.11  Yes
prometheus_ex                 3.0.5       3.0.5
prometheus_httpd              2.1.11      2.1.11
prometheus_process_collector  1.4.5       1.4.5
sentry                        7.2.1       7.2.4   Yes
slack                         0.14.0      0.23.2  No
telemetry                     0.4.1       0.4.1
timex                         3.3.0       3.6.1   Yes

A green version in latest means you have the latest version of a given package, a red version means there is a newer version available. Update possible indicates if your current requirement matches the latest version.
Run `mix hex.outdated APP` to see requirements for a specific dependency.

hex.outdated 옵션을 사용하면 최신 버전과 업그레이드가 가능한지 확인할 수 있다.

$ mix deps.update dialyxir jason logger_file_backend sentry timex

업데이트는 deps.update 옵션을 사용한다. 패키지 이름을 적으면 된다.

$ mix deps.update --all

전체 업데이트는 --all 옵션을 사용한다.

$ mix hex.outdated slack
There is newer version of the dependency available 0.23.2 > 0.14.0!

Source   Requirement
mix.exs  ~> 0.14.0

A green requirement means that it matches the latest version, a red requirement means that that it does not match the latest version.

hex.outdated 옵션 뒤에 패키지 이름을 넘기면 업데이트가 안 되는 이유를 알 수 있다. slack 패키지는 mix.exs 파일에 마이너 버전이 14를 넘지 않게 정의해서 업데이트가 안 된다.

$ mix hex.package diff httpoison 1.1.1..1.6.2

hex.package diff 옵션을 사용해 패키지 버전 사이에 변경 사항을 볼 수도 있다.

Feedback plz <3 @ohyecloudy, ohyecloudy@gmail.com

A Random Post