# Dependabot 自动依赖更新配置
# https://docs.github.com/code-security/dependabot/dependabot-version-updates

version: 2
updates:
  # npm 前端依赖
  - package-ecosystem: "npm"
    directory: "/"
    schedule:
      interval: "weekly"
      day: "monday"
      time: "09:00"
      timezone: "Asia/Shanghai"
    versioning-strategy: "auto"
    allow:
      - dependency-type: "all"
    labels:
      - "dependencies"
      - "javascript"
    commit-message:
      prefix: "chore(deps)"
      prefix-development: "chore(deps-dev)"
    open-pull-requests-limit: 5
    groups:
      react:
        patterns:
          - "react"
          - "react-dom"
          - "@types/react"
          - "@types/react-dom"
      tauri:
        patterns:
          - "@tauri-apps/*"
      testing:
        patterns:
          - "@testing-library/*"
          - "@playwright/test"
          - "vitest"
          - "jsdom"
      eslint:
        patterns:
          - "eslint"
          - "eslint-plugin-*"
          - "typescript-eslint"
          - "globals"
          - "@eslint/js"

  # Cargo Rust 依赖
  - package-ecosystem: "cargo"
    directory: "/"
    schedule:
      interval: "weekly"
      day: "monday"
      time: "09:00"
      timezone: "Asia/Shanghai"
    labels:
      - "dependencies"
      - "rust"
    commit-message:
      prefix: "chore(deps)"
      prefix-development: "chore(deps-dev)"
    open-pull-requests-limit: 3

  # GitHub Actions
  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "monthly"
    labels:
      - "dependencies"
      - "ci"
    commit-message:
      prefix: "ci(deps)"
