{
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
  "description": "Shared Renovate preset for mandrel-platform consumers. Consume as: github>dsj1984/mandrel-platform.",
  "schedule": ["before 9am on Monday"],
  "timezone": "America/New_York",
  "minimumReleaseAge": "3 days",
  "platformAutomerge": true,
  "dependencyDashboard": true,
  "lockFileMaintenance": {
    "enabled": true,
    "schedule": ["before 5am on Monday"]
  },
  "packageRules": [
    {
      "description": "Automerge patch and minor updates",
      "matchUpdateTypes": ["patch", "minor"],
      "automerge": true,
      "automergeType": "pr",
      "platformAutomerge": true
    },
    {
      "description": "Gate major updates behind dependency-dashboard approval",
      "matchUpdateTypes": ["major"],
      "dependencyDashboardApproval": true,
      "automerge": false
    },
    {
      "description": "Bump SHA-pinned mandrel-platform reusable-workflow and composite-action uses: pins (github-actions manager). Renovate only updates a bare-SHA pin when the consumer adds a version comment after it, e.g. uses: dsj1984/mandrel-platform/...@<sha> # v0.10.0 — see the dependency-update runbook. Grouped into one PR and scheduled via the preset's weekly window + 3-day minimumReleaseAge.",
      "matchManagers": ["github-actions"],
      "matchDepNames": ["dsj1984/mandrel-platform"],
      "groupName": "mandrel-platform workflows",
      "groupSlug": "mandrel-platform"
    },
    {
      "description": "Group Astro packages",
      "matchPackagePatterns": ["^astro$", "^@astrojs/"],
      "groupName": "Astro packages",
      "groupSlug": "astro"
    },
    {
      "description": "Group Sentry packages",
      "matchPackagePatterns": ["^@sentry/"],
      "groupName": "Sentry packages",
      "groupSlug": "sentry"
    },
    {
      "description": "Group ESLint packages",
      "matchPackagePatterns": [
        "^eslint$",
        "^@eslint/",
        "^eslint-config-",
        "^eslint-plugin-",
        "^@typescript-eslint/"
      ],
      "groupName": "ESLint packages",
      "groupSlug": "eslint"
    },
    {
      "description": "Group Vitest packages",
      "matchPackagePatterns": ["^vitest$", "^@vitest/"],
      "groupName": "Vitest packages",
      "groupSlug": "vitest"
    },
    {
      "description": "Group Playwright packages",
      "matchPackagePatterns": ["^playwright$", "^@playwright/"],
      "groupName": "Playwright packages",
      "groupSlug": "playwright"
    },
    {
      "description": "Group Cloudflare packages",
      "matchPackagePatterns": ["^wrangler$", "^@cloudflare/", "^miniflare$"],
      "groupName": "Cloudflare packages",
      "groupSlug": "cloudflare"
    },
    {
      "description": "Group Clerk packages",
      "matchPackagePatterns": ["^@clerk/"],
      "groupName": "Clerk packages",
      "groupSlug": "clerk"
    },
    {
      "description": "Keep .nvmrc and engines.node in lockstep — Renovate's nvm manager bumps .nvmrc; group the matching engines.node bump into the same PR. NOTE: automatically rewriting engines.node requires a postUpgradeTasks command, which hosted Mend (the Renovate app) DISABLES for security. Self-hosted Renovate runners must allowlist the command via allowedCommands; on hosted Mend, bump engines.node by hand in the same PR — see docs/runbooks/dependency-update.md.",
      "matchManagers": ["nvm"],
      "matchPackageNames": ["node"],
      "automerge": true,
      "automergeType": "pr",
      "platformAutomerge": true
    },
    {
      "description": "Group wrangler bumps so the wrangler compatibility_date can be advanced alongside. NOTE: automatically rewriting compatibility_date requires a postUpgradeTasks command, which hosted Mend (the Renovate app) DISABLES for security. Self-hosted Renovate runners must allowlist the command via allowedCommands; on hosted Mend, advance compatibility_date by hand in the same PR — see docs/runbooks/dependency-update.md.",
      "matchManagers": ["npm"],
      "matchPackageNames": ["wrangler"],
      "groupName": "wrangler",
      "groupSlug": "wrangler"
    }
  ]
}
