diff --git a/renovate.json b/renovate.json index f3d1b1076..323e8ea27 100644 --- a/renovate.json +++ b/renovate.json @@ -1,8 +1,23 @@ { - "extends": ["config:recommended", ":disableDependencyDashboard"], + "extends": [ + "config:recommended", + ":disableDependencyDashboard", + ":semanticCommits", + ":disableRateLimiting" + ], + "baseBranches": ["dev"], + "timezone": "Asia/Shanghai", + "enabledManagers": ["cargo", "npm", "github-actions"], "labels": ["dependencies"], + "rangeStrategy": "replace", + + "cargo": { + "enabled": true, + "fileMatch": ["^Cargo\\.toml$", "^crates/.*/Cargo\\.toml$"] + }, + "ignorePaths": [ "**/node_modules/**", "**/bower_components/**", @@ -11,37 +26,68 @@ "**/test/**", "**/tests/**", "**/__fixtures__/**", - "**/crate/**", "shared/**" ], - "rangeStrategy": "bump", + "packageRules": [ { "semanticCommitType": "chore", "matchPackageNames": ["*"] }, + { "description": "Disable node/pnpm version updates", "matchPackageNames": ["node", "pnpm"], "matchDepTypes": ["engines", "packageManager"], "enabled": false }, + { - "description": "Group all cargo dependencies into a single PR", + "description": "Group all cargo workspace dependencies", "matchManagers": ["cargo"], - "groupName": "cargo dependencies" + "groupName": "cargo workspace dependencies", + "groupSlug": "cargo-workspace" }, + { "description": "Group all npm dependencies into a single PR", "matchManagers": ["npm"], "groupName": "npm dependencies" }, + { "description": "Group all GitHub Actions updates into a single PR", "matchManagers": ["github-actions"], "groupName": "github actions" + }, + + { + "description": "Allow Rust major updates but require manual merge after CI", + "matchManagers": ["cargo"], + "matchUpdateTypes": ["major"], + "automerge": false, + "requiredStatusChecks": null, + "labels": ["dependencies", "major"], + "prPriority": 10 + }, + + { + "description": "Automerge Rust patch updates after CI success", + "matchManagers": ["cargo"], + "matchUpdateTypes": ["patch"], + "automerge": true, + "automergeType": "pr", + "requiredStatusChecks": null } ], + + "lockFileMaintenance": { + "enabled": true, + "schedule": ["weekly"], + "ignoreUnstable": true + }, + "postUpdateOptions": ["pnpmDedupe", "updateCargoLock"], + "ignoreDeps": ["criterion"] }