version: "3"
internal: true

tasks:
  update:
    desc: "Update Elixir dependencies within major versions (mix deps.update --all)"
    silent: false
    cmds:
      - cmd: |
          cd packages/elixir && mix deps.update --all
        ignore_error: false

  upgrade:
    desc: "Upgrade Elixir dependencies to latest including breaking changes (mix hex.outdated --all + mix deps.update)"
    silent: false
    cmds:
      - cmd: |
          command -v mix >/dev/null 2>&1 || { echo "Elixir not found, skipping Elixir upgrade"; exit 0; }
          cd packages/elixir && mix hex.outdated --all || true && mix deps.update --all
        ignore_error: false
