Files
app__bitwarden-clients/.github/renovate.json5
2026-11-11 11:23:09 -05:00

670 lines
21 KiB
Plaintext

{
$schema: "https://docs.renovatebot.com/renovate-schema.json",
extends: ["github>bitwarden/renovate-config"], // Extends our default configuration for pinned dependencies
enabledManagers: ["cargo", "github-actions", "npm", "custom.regex"],
// Don't install dependencies to node_modules. It causes incomplete
// lockfile updates, and CI already runs npm ci to assert builds
skipInstalls: true,
// Renovate's current default Rust (1.99) ignores
// registry.global-min-publish-age in .cargo/config.toml. Remove once
// Renovate installs Rust 1.100+ This should be in stable 2026-11-12,
// but double check before removing this line.
constraints: { rust: "nightly-2026-09-25" },
customManagers: [
{
// Pinned binary cargo tools declared in [workspace.metadata.bin]. These are
// not real dependency tables, so Renovate's native cargo manager ignores
// them. The `locked = true` field is the discriminator that keeps this regex
// from also matching [workspace.dependencies] entries of the same shape.
customType: "regex",
fileMatch: ["apps/desktop/desktop_native/Cargo\\.toml$"],
matchStrings: [
'(?<depName>[a-z][a-z0-9_-]*)\\s*=\\s*\\{\\s*version\\s*=\\s*"=?(?<currentValue>\\d+\\.\\d+\\.\\d+)"\\s*,\\s*locked\\s*=\\s*true',
],
datasourceTemplate: "crate",
versioningTemplate: "cargo",
},
{
// Bootstrap pin for cargo-run-bin across the CI workflows,
// scripts/prepare-env-rust.mjs, and the devcontainer. Keep these in sync.
// build.js is deliberately absent: it invokes cargo-xwin directly rather than
// through `cargo bin`, so it pins no cargo-run-bin version.
customType: "regex",
fileMatch: [
"^\\.github/workflows/.*\\.ya?ml$",
"scripts/prepare-env-rust\\.mjs$",
"\\.devcontainer/common/post-create-command\\.sh$",
],
matchStrings: [
"cargo install (?<depName>cargo-run-bin) --locked --version (?<currentValue>\\d+\\.\\d+\\.\\d+)",
// JS const form: const CARGO_RUN_BIN_VERSION = "x" (in scripts/prepare-env-rust.mjs).
'CARGO_RUN_BIN_VERSION\\s*=\\s*"(?<currentValue>\\d+\\.\\d+\\.\\d+)"',
],
depNameTemplate: "cargo-run-bin",
datasourceTemplate: "crate",
versioningTemplate: "cargo",
},
{
// Keep electronVersion in electron-builder.json in sync with the electron package.
customType: "regex",
fileMatch: ["apps/desktop/electron-builder\\.json$"],
matchStrings: ['"electronVersion":\\s*"(?<currentValue>[\\d.]+)"'],
depNameTemplate: "electron",
datasourceTemplate: "npm",
},
{
// Keep electronVersion in electron-builder.beta.json in sync with the electron package.
customType: "regex",
fileMatch: ["apps/desktop/electron-builder.beta\\.json$"],
matchStrings: ['"electronVersion":\\s*"(?<currentValue>[\\d.]+)"'],
depNameTemplate: "electron",
datasourceTemplate: "npm",
},
],
packageRules: [
// ==================== Repo-Wide Update Behavior Rules ====================
{
// Group all Github Action minor updates together to reduce PR noise.
groupName: "Minor github-actions updates",
matchManagers: ["github-actions"],
matchUpdateTypes: ["minor"],
},
{
// Enable support for Rust toolchain updates.
matchManagers: ["custom.regex"],
matchDepNames: ["rust"],
commitMessageTopic: "Rust",
},
{
// Disable major and minor updates for TypeScript and Zone.js because they are managed by Angular.
matchPackageNames: ["typescript", "zone.js"],
matchUpdateTypes: ["major", "minor"],
description: "Determined by Angular",
enabled: false,
},
{
// Disable major updates for core Angular dependencies because they are managed through ng update
// when we decide to upgrade.
matchSourceUrls: [
"https://github.com/angular-eslint/angular-eslint",
"https://github.com/angular/angular-cli",
"https://github.com/angular/angular",
"https://github.com/angular/components",
"https://github.com/ng-select/ng-select",
],
matchUpdateTypes: ["major"],
description: "Manually updated using ng update",
enabled: false,
},
// ==================== Team Ownership Rules ====================
{
matchPackageNames: ["buffer", "bufferutil", "core-js", "process", "url", "util"],
description: "Admin Console owned dependencies",
commitMessagePrefix: "[deps] AC:",
reviewers: ["team:team-admin-console-dev"],
},
{
matchPackageNames: ["qrious"],
description: "Auth owned dependencies",
commitMessagePrefix: "[deps] Auth:",
reviewers: ["team:team-auth-dev"],
},
{
matchPackageNames: [
"@angular-eslint/schematics",
"@eslint/compat",
"@typescript-eslint/rule-tester",
"@typescript-eslint/utils",
"angular-eslint",
"eslint-config-prettier",
"eslint-import-resolver-typescript",
"eslint-plugin-import",
"eslint-plugin-jest",
"eslint-plugin-rxjs-angular",
"eslint-plugin-rxjs",
"eslint-plugin-storybook",
"eslint-plugin-tailwindcss",
"eslint",
"husky",
"lint-staged",
"prettier",
"typescript-eslint",
],
description: "Architecture owned dependencies",
commitMessagePrefix: "[deps] Architecture:",
reviewers: ["team:dept-architecture"],
},
{
matchPackageNames: [
"@emotion/css",
"@webcomponents/custom-elements",
"lit",
"@lit-labs/signals",
"@storybook/web-components-vite",
"tabbable",
"tldts",
],
description: "Autofill owned dependencies",
commitMessagePrefix: "[deps] Autofill:",
reviewers: ["team:team-autofill-dev"],
},
{
matchPackageNames: ["mockall", "serial_test", "ssh-key"],
description: "Desktop Native owned dependencies",
commitMessagePrefix: "[deps] Desktop Native:",
reviewers: ["team:team-desktop-native-dev"],
},
{
matchPackageNames: ["braintree-web-drop-in"],
description: "Billing owned dependencies",
commitMessagePrefix: "[deps] Billing:",
reviewers: ["team:team-billing-dev"],
},
{
matchPackageNames: [
"@babel/core",
"@babel/preset-env",
"@bitwarden/sdk-internal",
"@bitwarden/commercial-sdk-internal",
"@bitwarden/desktop-napi",
"@electron/fuses",
"@electron/notarize",
"@electron/rebuild",
"@ngtools/webpack",
"@nx/devkit",
"@nx/eslint",
"@nx/jest",
"@nx/js",
"@nx/webpack",
"@types/chrome",
"@types/firefox-webext-browser",
"@types/glob",
"@types/lowdb",
"@types/jest",
"@types/node",
"@types/node-ipc",
"@yao-pkg/pkg",
"anyhow",
"arboard",
"ashpd",
"babel-loader",
"base64-loader",
"base64",
"bindgen",
"browserslist",
"byteorder",
"bytes",
"concurrently",
"core-foundation",
"copy-webpack-plugin",
"cross-env",
"css-loader",
"ctor",
"dirs",
"electron",
"electron-builder",
"electron-log",
"electron-reload",
"electron-store",
"electron-updater",
"embed_plist",
"futures",
"hex",
"homedir",
"html-loader",
"html-webpack-injector",
"html-webpack-plugin",
"interprocess",
"itertools",
"jest",
"jest-diff",
"jest-environment-jsdom",
"jest-junit",
"jest-mock-extended",
"jest-preset-angular",
"json5",
"keytar",
"libc",
"lowdb",
"mini-css-extract-plugin",
"napi",
"napi-build",
"napi-derive",
"napi-derive-backend",
"node-ipc",
"nx",
"oo7",
"oslog",
"pkg",
"rimraf",
"rxjs",
"scopeguard",
"secmem-proc",
"security-framework",
"security-framework-sys",
"semver",
"serde",
"serde_json",
"serde_with",
"simplelog",
"style-loader",
"sysinfo",
"thiserror",
"tokio",
"tokio-util",
"tracing",
"tracing-subscriber",
"ts-jest",
"ts-loader",
"ts-node",
"tsconfig-paths-webpack-plugin",
"type-fest",
"typescript",
"typescript-strict-plugin",
"uniffi",
"wait-on",
"webpack",
"webpack-cli",
"webpack-dev-server",
"webpack-node-externals",
"widestring",
"windows",
"windows-core",
"windows-future",
"windows-registry",
"zbus",
"zbus_polkit",
"zeroizing-alloc",
],
description: "Platform owned dependencies",
commitMessagePrefix: "[deps] Platform:",
reviewers: ["team:team-platform-dev"],
},
{
matchUpdateTypes: ["lockFileMaintenance"],
description: "Platform owns lock file maintenance",
commitMessagePrefix: "[deps] Platform:",
reviewers: ["team:team-platform-dev"],
},
{
matchPackageNames: [
"@angular-devkit/build-angular",
"@angular/animations",
"@angular/cdk",
"@angular/cli",
"@angular/common",
"@angular/compiler-cli",
"@angular/compiler",
"@angular/core",
"@angular/forms",
"@angular/platform-browser",
"@angular/platform-browser-dynamic",
"@angular/platform",
"@angular/router",
"axe-playwright",
"@compodoc/compodoc",
"@ng-select/ng-select",
"@storybook/addon-a11y",
"@storybook/addon-designs",
"@storybook/addon-docs",
"@storybook/addon-links",
"@storybook/test-runner",
"@storybook/addon-themes",
"@storybook/angular",
"@types/react",
"autoprefixer",
"bootstrap",
"chromatic",
"fantasticon",
"ngx-toastr",
"path-browserify",
"postcss",
"postcss-loader",
"prettier-plugin-tailwindcss",
"react",
"react-dom",
"remark-gfm",
"sass",
"sass-loader",
"storybook",
"svgo",
"tailwindcss",
"vite-tsconfig-paths",
"zone.js",
"@tailwindcss/container-queries",
],
description: "UI Foundation owned dependencies",
commitMessagePrefix: "[deps] UI Foundation:",
reviewers: ["team:team-ui-foundation"],
},
{
matchPackageNames: [
"@microsoft/signalr-protocol-msgpack",
"@microsoft/signalr",
"@bufbuild/protobuf",
"@types/jsdom",
"@types/papaparse",
"@types/zxcvbn",
"aes-gcm",
"async-trait",
"clap",
"jsdom",
"jszip",
"oauth4webapi",
"papaparse",
"utf-8-validate",
"verifysign",
"zxcvbn",
],
description: "Tools owned dependencies",
commitMessagePrefix: "[deps] Tools:",
reviewers: ["team:team-tools-dev"],
},
{
matchPackageNames: [
"@koa/multer",
"@koa/router",
"@types/inquirer",
"@types/koa",
"@types/koa__multer",
"@types/koa-bodyparser",
"@types/koa-json",
"@types/lunr",
"@types/node-fetch",
"@types/proper-lockfile",
"@types/retry",
"chalk",
"commander",
"form-data",
"https-proxy-agent",
"inquirer",
"koa",
"koa-bodyparser",
"koa-json",
"lunr",
"multer",
"node-fetch",
"open",
"proper-lockfile",
"qrcode-parser",
],
description: "Vault owned dependencies",
commitMessagePrefix: "[deps] Vault:",
reviewers: ["team:team-vault-dev"],
},
{
matchPackageNames: [
"@types/node-forge",
"aes",
"big-integer",
"cbc",
"chacha20poly1305",
"linux-keyutils",
"memsec",
"node-forge",
"rand",
"rand_core",
"rsa",
"sha2",
],
description: "Key Management owned dependencies",
commitMessagePrefix: "[deps] KM:",
reviewers: ["team:team-key-management-dev"],
},
{
matchPackageNames: ["chart.js", "chartjs-adapter-date-fns"],
description: "DIRT owned dependencies",
commitMessagePrefix: "[deps] DIRT:",
reviewers: ["team:team-data-insights-and-reporting-dev"],
},
// ==================== Grouping Rules ====================
// These come after any specific team assignment rules to ensure
// that grouping is not overridden by subsequent rule definitions.
{
matchPackageNames: [
"@angular-eslint/schematics",
"@eslint/compat",
"@typescript-eslint/rule-tester",
"@typescript-eslint/utils",
"angular-eslint",
"eslint-config-prettier",
"eslint-import-resolver-typescript",
"eslint-plugin-import",
"eslint-plugin-jest",
"eslint-plugin-rxjs-angular",
"eslint-plugin-rxjs",
"eslint-plugin-storybook",
"eslint-plugin-tailwindcss",
"eslint",
"husky",
"lint-staged",
"typescript-eslint",
],
groupName: "Minor and patch linting updates",
matchUpdateTypes: ["minor", "patch"],
},
{
// We need to group all napi-related packages together to avoid build errors caused by version incompatibilities.
groupName: "napi",
matchPackageNames: ["napi", "napi-build", "napi-derive", "napi-derive-backend", "napi-sys"],
},
{
// We need to group all macOS/iOS binding-related packages together to avoid build errors caused by version incompatibilities.
groupName: "macOS/iOS bindings",
matchPackageNames: ["core-foundation", "security-framework", "security-framework-sys"],
},
{
// We need to group all zbus-related packages together to avoid build errors caused by version incompatibilities.
groupName: "zbus",
matchPackageNames: ["zbus", "zbus_polkit"],
},
{
// We need to group all windows-related packages together to avoid build errors caused by version incompatibilities.
groupName: "windows",
matchPackageNames: ["windows", "windows-core", "windows-future", "windows-registry"],
},
{
// We need to group all tokio-related packages together to avoid build errors caused by version incompatibilities.
groupName: "tokio",
matchPackageNames: ["bytes", "tokio", "tokio-util"],
},
{
// We need to group all serde-related packages together to avoid build errors caused by version incompatibilities.
groupName: "serde",
matchPackageNames: ["serde", "serde_json", "serde_with"],
},
{
// We group all webpack build-related minor and patch updates together to reduce PR noise.
// We include patch updates here because we want PRs for webpack patch updates and it's in this group.
matchPackageNames: [
"@babel/core",
"@babel/preset-env",
"babel-loader",
"base64-loader",
"browserslist",
"copy-webpack-plugin",
"css-loader",
"html-loader",
"html-webpack-injector",
"html-webpack-plugin",
"mini-css-extract-plugin",
"postcss-loader",
"postcss",
"sass-loader",
"sass",
"style-loader",
"ts-loader",
"tsconfig-paths-webpack-plugin",
"webpack-cli",
"webpack-dev-server",
"webpack-node-externals",
"webpack",
],
description: "webpack-related build dependencies",
groupName: "Minor and patch webpack updates",
matchUpdateTypes: ["minor", "patch"],
},
{
// We need to update several Jest-related packages together, for version compatibility.
groupName: "jest",
matchPackageNames: ["@types/jest", "jest", "ts-jest", "jest-preset-angular"],
},
{
// Some electron packages are version coupled
groupName: "electron",
matchPackageNames: [
"@electron/fuses",
"@electron/rebuild",
"electron",
"electron-builder",
"electron-updater",
],
},
{
// Add snapcraft compatibility note to electron-builder PRs
matchPackageNames: ["electron-builder"],
prBodyNotes: [
"⚠️ **Snapcraft Compatibility Check Required**",
"",
"electron-builder 26.x + core22 requires snapcraft ≤8.x due to deprecated 'snap pack' command.",
"Currently pinned to `8.x/stable` in `.github/workflows/build-desktop.yml` (lines 205, 362)",
"",
"**If upgrading to electron-builder ≥27.0.0:**",
"- Test if electron-builder v27 + core22 works with snapcraft 9.x",
"- OR migrate to core24 in `apps/desktop/electron-builder.json` (requires ubuntu-24.04 runners)",
"- If compatible, remove `--channel=8.x/stable` pin from workflow",
"",
"Related: BRE-2018",
],
},
// ==================== Dashboard Rules ====================
{
// For the packages below, we have decided we will only be creating PRs
// for major updates, and sending minor (as well as patch) to the dashboard.
// This rule comes AFTER grouping rules so that groups are respected while still
// sending minor/patch updates to the dependency dashboard for approval.
matchPackageNames: [
"@types/jest",
"anyhow",
"arboard",
"ashpd",
"babel-loader",
"base64",
"base64-loader",
"bindgen",
"byteorder",
"bytes",
"core-foundation",
"copy-webpack-plugin",
"css-loader",
"ctor",
"dirs",
"electron-builder",
"electron-log",
"electron-reload",
"electron-store",
"electron-updater",
"embed_plist",
"futures",
"hex",
"homedir",
"html-loader",
"html-webpack-injector",
"html-webpack-plugin",
"interprocess",
"jest",
"jest-diff",
"jest-environment-jsdom",
"jest-junit",
"jest-mock-extended",
"jest-preset-angular",
"json5",
"keytar",
"libc",
"lowdb",
"mini-css-extract-plugin",
"napi",
"napi-build",
"napi-derive",
"node-ipc",
"nx",
"oo7",
"oslog",
"pkg",
"postcss",
"postcss-loader",
"rand",
"sass",
"sass-loader",
"scopeguard",
"secmem-proc",
"security-framework",
"security-framework-sys",
"semver",
"serde",
"serde_json",
"serde_with",
"simplelog",
"style-loader",
"sysinfo",
"thiserror",
"tokio",
"tokio-util",
"tracing",
"tracing-subscriber",
"ts-jest",
"ts-loader",
"ts-node",
"tsconfig-paths-webpack-plugin",
"type-fest",
"typescript-strict-plugin",
"uniffi",
"webpack-cli",
"webpack-dev-server",
"webpack-node-externals",
"widestring",
"windows",
"windows-core",
"windows-future",
"windows-registry",
"zbus",
"zbus_polkit",
"zeroizing-alloc",
],
matchUpdateTypes: ["minor", "patch"],
dependencyDashboardApproval: true,
},
{
// By default, we send patch updates to the Dependency Dashboard and do not generate a PR.
// We want to generate PRs for a select number of dependencies to ensure we stay up to date on these.
matchPackageNames: ["browserslist", "electron", "rxjs", "typescript", "webpack", "zone.js"],
matchUpdateTypes: ["patch"],
dependencyDashboardApproval: false,
},
// ==================== Special Version Constraints ====================
{
// Any versions of lowdb above 1.0.0 are not compatible with CommonJS.
matchPackageNames: ["lowdb"],
allowedVersions: "1.0.0",
description: "Higher versions of lowdb are not compatible with CommonJS",
},
{
// Pin types as well since we are not upgrading past v1 (and also v2+ does not need separate types).
matchPackageNames: ["@types/lowdb"],
allowedVersions: "< 2.0.0",
description: "Higher versions of lowdb do not need separate types",
},
],
ignoreDeps: [
"@types/koa-bodyparser",
"bootstrap",
"node-ipc",
"@bitwarden/sdk-internal",
"@bitwarden/commercial-sdk-internal",
],
}