version: "3"
internal: true

tasks:
  update:
    desc: "Update Dart dependencies within major versions (dart pub upgrade)"
    silent: false
    cmds:
      - cmd: |
          cd packages/dart && dart pub upgrade
        ignore_error: false

  upgrade:
    desc: "Upgrade Dart dependencies to latest including breaking changes (dart pub upgrade --major-versions)"
    silent: false
    cmds:
      - cmd: |
          command -v dart >/dev/null 2>&1 || { echo "Dart not found, skipping Dart upgrade"; exit 0; }
          cd packages/dart && dart pub upgrade --major-versions
        ignore_error: false
