| { | |
| $schema: "https://docs.renovatebot.com/renovate-schema.json", | |
| extends: [ | |
| "github>astral-sh/renovate-config", | |
| "customManagers:githubActionsVersions", | |
| ], | |
| schedule: ["before 4am on Wednesday"], | |
| enabledManagers: ["github-actions", "pre-commit", "cargo", "pep621", "pip_requirements", "npm", "custom.regex"], | |
| pep621: { | |
| // The default for this package manager is to only search for `pyproject.toml` files | |
| // found at the repository root: https://docs.renovatebot.com/modules/manager/pep621/#file-matching | |
| managerFilePatterns: ["^(python|scripts)/.*pyproject\\.toml$"], | |
| }, | |
| pip_requirements: { | |
| // The default for this package manager is to run on all requirements.txt files: | |
| // https://docs.renovatebot.com/modules/manager/pip_requirements/#file-matching | |
| // `fileMatch` doesn't work for excluding files; to exclude `requirements.txt` files | |
| // outside the `doc/` directory, we instead have to use `ignorePaths`. Unlike `fileMatch`, | |
| // which takes a regex string, `ignorePaths` takes a glob string, so we have to use | |
| // a "negative glob pattern". | |
| // See: | |
| // - https://docs.renovatebot.com/modules/manager/#ignoring-files-that-match-the-default-filematch | |
| // - https://docs.renovatebot.com/configuration-options/#ignorepaths | |
| // - https://docs.renovatebot.com/string-pattern-matching/#negative-matching | |
| ignorePaths: ["!docs/requirements*.txt"] | |
| }, | |
| npm: { | |
| // The default for this package manager is to only search for `package.json` files | |
| // found at the repository root: https://docs.renovatebot.com/modules/manager/npm/#file-matching | |
| managerFilePatterns: ["^playground/.*package\\.json$"], | |
| }, | |
| packageRules: [ | |
| { | |
| // This package rule disables updates for GitHub runners: | |
| // we'd only pin them to a specific version | |
| // if there was a deliberate reason to do so | |
| groupName: "GitHub runners", | |
| matchManagers: ["github-actions"], | |
| matchDatasources: ["github-runners"], | |
| description: "Disable PRs updating GitHub runners (e.g. 'runs-on: macos-14')", | |
| enabled: false, | |
| }, | |
| { | |
| groupName: "prek dependencies", | |
| matchManagers: ["pre-commit"], | |
| // The shared preset groups uv-pre-commit with uv workflow pins. | |
| // Exclude it here so the prek group doesn't override that grouping. | |
| matchPackageNames: ["!astral-sh/uv-pre-commit"], | |
| description: "Weekly update of prek dependencies", | |
| }, | |
| { | |
| groupName: "NPM Development dependencies", | |
| matchManagers: ["npm"], | |
| matchDepTypes: ["devDependencies"], | |
| description: "Weekly update of NPM development dependencies", | |
| }, | |
| { | |
| groupName: "Monaco", | |
| matchManagers: ["npm"], | |
| matchPackageNames: ["monaco"], | |
| description: "Weekly update of the Monaco editor", | |
| }, | |
| { | |
| groupName: "phf", | |
| matchManagers: ["cargo"], | |
| matchPackageNames: ["phf", "phf_codegen"], | |
| description: "Weekly update of phf dependencies", | |
| }, | |
| { | |
| groupName: "strum", | |
| matchManagers: ["cargo"], | |
| matchPackageNames: ["strum", "strum_macros"], | |
| description: "Weekly update of strum dependencies", | |
| }, | |
| { | |
| commitMessageTopic: "MSRV", | |
| matchManagers: ["custom.regex"], | |
| matchDepNames: ["msrv"], | |
| // We have a rolling support policy for the MSRV | |
| // 2 releases back * 6 weeks per release * 7 days per week + 1 | |
| minimumReleaseAge: "85 days", | |
| groupName: "MSRV", | |
| }, | |
| { | |
| matchManagers: ["custom.regex"], | |
| matchDepNames: ["rust"], | |
| commitMessageTopic: "Rust", | |
| }, | |
| { | |
| matchManagers: ["custom.regex"], | |
| matchDepNames: ["maturin"], | |
| commitMessageTopic: "maturin", | |
| }, | |
| ], | |
| customManagers: [ | |
| // uv release used by the reusable security review workflow. | |
| { | |
| customType: "regex", | |
| managerFilePatterns: ["/^\\.github/workflows/ci\\.yaml$/"], | |
| matchStrings: [ | |
| '# renovate: datasource=github-release-attachments depName=astral-sh/uv\\s+uv-version: "(?<currentValue>[^"\\r\\n]+)"\\s+uv-checksum: "(?<currentDigest>[a-f0-9]{64})"', | |
| ], | |
| depNameTemplate: "astral-sh/uv", | |
| datasourceTemplate: "github-release-attachments", | |
| versioningTemplate: "semver", | |
| }, | |
| // Maturin version used in maturin-action | |
| { | |
| customType: "regex", | |
| managerFilePatterns: [ | |
| "/.github/workflows/build-binaries\\.yml$/", | |
| ], | |
| matchStrings: ["maturin-version: (?<currentValue>v\\d+\\.\\d+\\.\\d+)"], | |
| depNameTemplate: "maturin", | |
| packageNameTemplate: "PyO3/maturin", | |
| datasourceTemplate: "github-releases", | |
| }, | |
| // Minimum supported Rust toolchain version | |
| { | |
| customType: "regex", | |
| managerFilePatterns: ["/(^|/)Cargo\\.toml?$/"], | |
| matchStrings: [ | |
| 'rust-version\\s*=\\s*"(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)"', | |
| ], | |
| depNameTemplate: "msrv", | |
| packageNameTemplate: "rust-lang/rust", | |
| datasourceTemplate: "github-releases", | |
| }, | |
| // Rust toolchain version | |
| { | |
| customType: "regex", | |
| managerFilePatterns: ["/(^|/)rust-toolchain\\.toml?$/"], | |
| matchStrings: [ | |
| 'channel\\s*=\\s*"(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)"', | |
| ], | |
| depNameTemplate: "rust", | |
| packageNameTemplate: "rust-lang/rust", | |
| datasourceTemplate: "github-releases", | |
| }, | |
| ], | |
| } |