version: 2

# Every ecosystem groups its updates into a single PR. Splitting per package
# means each ecosystem's lockfile (go.sum, package-lock.json, Cargo.lock) is
# rewritten once per PR, so merging any one of them invalidates all the rest —
# every sibling then rebases and re-runs the full ~15 minute CI matrix. The
# 2026-08-10 batch opened 17 PRs for one weekly refresh.
#
# Grouping also keeps release trains together. The OpenTelemetry modules move
# in lockstep, and npm families version-lock their own packages with exact peer
# pins (typescript-checker@9.6.0 requires core@9.6.0, not ^9.6.0), so a partial
# merge is an ERESOLVE failure waiting to happen.
#
# Majors are ignored everywhere below, so each group only ever carries patch and
# minor updates. If one member of a group is bad, add it to that ecosystem's
# ignore list rather than ungrouping the rest.

updates:
  # Go server dependencies
  - package-ecosystem: gomod
    directory: /Server
    schedule:
      interval: weekly
      day: monday
    commit-message:
      prefix: "chore(deps):"
    labels:
      - dependencies
      - go
    open-pull-requests-limit: 10
    groups:
      go-dependencies:
        patterns:
          - "*"
    ignore:
      - dependency-name: "*"
        update-types: ["version-update:semver-major"]

  # Tauri client npm dependencies
  - package-ecosystem: npm
    directory: /Client/tauri-client
    schedule:
      interval: weekly
      day: monday
    commit-message:
      prefix: "chore(deps):"
    labels:
      - dependencies
      - npm
    open-pull-requests-limit: 10
    groups:
      npm-dependencies:
        patterns:
          - "*"
    ignore:
      - dependency-name: "*"
        update-types: ["version-update:semver-major"]

  # Tauri Rust/Cargo dependencies
  - package-ecosystem: cargo
    directory: /Client/tauri-client/src-tauri
    schedule:
      interval: weekly
      day: monday
    commit-message:
      prefix: "chore(deps):"
    labels:
      - dependencies
      - rust
    open-pull-requests-limit: 5
    groups:
      cargo-dependencies:
        patterns:
          - "*"
    ignore:
      - dependency-name: "*"
        update-types: ["version-update:semver-major"]

  # GitHub Actions
  - package-ecosystem: github-actions
    directory: /
    schedule:
      interval: weekly
      day: monday
    commit-message:
      prefix: "ci(deps):"
    labels:
      - dependencies
      - ci
    open-pull-requests-limit: 5
    groups:
      actions-dependencies:
        patterns:
          - "*"
    ignore:
      - dependency-name: "*"
        update-types: ["version-update:semver-major"]
