Files
renovate/lib/modules/manager/homebrew
Sebastian Poxhofer e0cec3dc95 refactor(lint): add types-location rule and enable it for lib/modules (#45497)
feat(lint): add `types-location` rule and enable it for `lib/modules`

Reviewers consistently ask for exported types to be moved into a
colocated `types.ts`. Add a `renovate/types-location` oxlint rule that
reports `export interface` / `export type` declarations outside such a
file, and turn it on across `lib/modules`.

Re-exports (`export type { X }`, `export type *`), file-local types, and
values (enums, classes, functions) are left alone. `schema.ts` files and
`schema/` directories are excluded via config, matching how
`zod-schema-location` is configured — inferred types belong next to the
schema they are derived from.

Relocating the 87 existing violations means:

- new `types.ts` files for the modules that had none
- `terragrunt/common.ts` folded into its `types.ts`, as it held nothing
  else
- `RangeBound` in `versioning/gradle/compare.ts` un-exported, since only
  a file-local interface referenced it
- `bazel-module/parser/fragments.ts` split from its inferred types, which
  now live in `parser/types.ts` and infer through a namespace import so
  each schema keeps its merged name
2026-08-27 19:52:09 +00:00
..
2026-01-21 15:13:32 +00:00

The homebrew manager extracts dependencies from Homebrew Formula Ruby files.

Supported Files

Renovate supports Formula files that follow the Homebrew naming convention:

  • Files must be located in a Formula/ directory
  • Files must have a .rb extension
  • Example: Formula/my-package.rb

Supported Dependencies

The manager extracts and updates:

  • GitHub releases: URLs in the format https://github.com/owner/repo/releases/download/v1.2.3/repo-1.2.3.tar.gz
  • GitHub archives: URLs in the format https://github.com/owner/repo/archive/refs/tags/v1.2.3.tar.gz
  • NPM packages: URLs in the format https://registry.npmjs.org/package/-/package-1.2.3.tgz or https://registry.npmjs.org/@scope/package/-/package-1.2.3.tgz
  • SHA256 checksums: Automatically computed for new versions

How It Works

When a new version is available, Renovate:

  1. Downloads the new tarball from GitHub or NPM registry
  2. Calculates the SHA256 checksum
  3. Updates both the url and sha256 fields in the Formula file

Limitations

  • GitHub packages: Only supports packages hosted on github.com
  • NPM packages: Only supports packages from registry.npmjs.org (custom registries are not supported)

Example Formulas

GitHub Package

class MyPackage < Formula
  desc "My awesome package"
  homepage "https://github.com/owner/repo"
  url "https://github.com/owner/repo/releases/download/v1.2.3/repo-1.2.3.tar.gz"
  sha256 "abc123def456..."

  def install
    # installation steps
  end
end

npm Package

class ClaudeCode < Formula
  desc "Anthropic's official CLI for Claude"
  homepage "https://www.anthropic.com/claude-code"
  url "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-1.0.0.tgz"
  sha256 "abc123def456..."
  license "Proprietary"
end

Unsupported Formulas

Formulas with the following characteristics will be skipped:

  • Non-GitHub and non-NPM URLs (e.g., SourceForge, custom domains)
  • NPM packages from custom registries (only registry.npmjs.org is supported)
  • Missing or invalid sha256 field
  • Git repository URLs (e.g., url "https://github.com/owner/repo.git")
  • Invalid class definitions

If you need to change the versioning format, read the versioning documentation to learn more.