33509 Commits

Author SHA1 Message Date
Douglas Eichelberger
19332ee1d5
Merge pull request #19383 from Homebrew/fix-yard-directives
docs: Remove misused YARD directives
2025-02-25 20:56:58 +00:00
Douglas Eichelberger
3b3c55ca0d
fix: Remove misused YARD directives 2025-02-25 11:55:37 -08:00
Douglas Eichelberger
cad6f53109
Merge pull request #19382 from Homebrew/fix-formula-type
fix: Revert breaking type change in Formula#std_npm_args
2025-02-25 19:34:21 +00:00
Douglas Eichelberger
a092403b16
Fix breaking type change in Formula#std_npm_args 2025-02-25 11:23:29 -08:00
Douglas Eichelberger
6bb2a4c8e2
Merge pull request #19380 from Homebrew/dependabot/pip/Library/Homebrew/formula-analytics/setuptools-75.8.1
build(deps): bump setuptools from 75.8.0 to 75.8.1 in /Library/Homebrew/formula-analytics
2025-02-25 19:20:23 +00:00
BrewTestBot
4b2ce255ec
Update RBI files for sorbet.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2025-02-25 19:00:23 +00:00
BrewTestBot
92f4ff88e4
brew vendor-gems: commit updates. 2025-02-25 19:00:19 +00:00
BrewTestBot
0b8ae8f2fe
Update RBI files for setuptools.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2025-02-25 19:00:10 +00:00
dependabot[bot]
d520b7dc72
build(deps): bump the sorbet group in /Library/Homebrew with 4 updates
Bumps the sorbet group in /Library/Homebrew with 4 updates: [sorbet-static-and-runtime](https://github.com/sorbet/sorbet), [sorbet-runtime](https://github.com/sorbet/sorbet), [sorbet](https://github.com/sorbet/sorbet) and [sorbet-static](https://github.com/sorbet/sorbet).


Updates `sorbet-static-and-runtime` from 0.5.11851 to 0.5.11856
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

Updates `sorbet-runtime` from 0.5.11851 to 0.5.11856
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

Updates `sorbet` from 0.5.11851 to 0.5.11856
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

Updates `sorbet-static` from 0.5.11851 to 0.5.11856
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

---
updated-dependencies:
- dependency-name: sorbet-static-and-runtime
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: sorbet
- dependency-name: sorbet-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: sorbet
- dependency-name: sorbet
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: sorbet
- dependency-name: sorbet-static
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: sorbet
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-25 18:57:03 +00:00
dependabot[bot]
95a0675eb7
build(deps): bump setuptools in /Library/Homebrew/formula-analytics
Bumps [setuptools](https://github.com/pypa/setuptools) from 75.8.0 to 75.8.1.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst)
- [Commits](https://github.com/pypa/setuptools/compare/v75.8.0...v75.8.1)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-25 18:44:10 +00:00
Douglas Eichelberger
9cb5ecf8b3
Merge pull request #19379 from Homebrew/fix-formula-type
Fix return type of Formula.build
2025-02-25 17:15:51 +00:00
Douglas Eichelberger
6cd9daffdf
Fix return type of Formula.build 2025-02-25 09:03:01 -08:00
Sam Ford
6291c24004
Merge pull request #19293 from Homebrew/livecheck/options
livecheck: add Options class
2025-02-25 16:50:51 +00:00
Sam Ford
749a7c846e
Add livecheck_find_versions_parameters tests 2025-02-25 10:56:32 -05:00
Sam Ford
0bb18b33b2
Livecheck::Options: Add #merge! 2025-02-25 10:56:32 -05:00
Douglas Eichelberger
c1b9136805
rm unnecessary rbi file 2025-02-25 10:56:32 -05:00
Douglas Eichelberger
9aa8ab1789
Simplify livecheck_find_versions_parameters 2025-02-25 10:56:32 -05:00
Sam Ford
c1401ae360
Livecheck::Options: Enable typed: strong
This enables `typed: strong` in `Options` and resolves the related
errors.

I annotated the return value of `serialize` in `#to_hash` to resolve
a type error and then updated other methods to use `to_hash` instead.
This approach resolves similar type errors without duplicating the
same `serialize` annotation.

For `#==`, I switched `instance_of?(other.class)` to
`other.is_a?(Options)`, as Sorbet understands that `is_a?` ensures
`other` is an `Options` object but doesn't seem to understand
that `instance_of?` was doing the same thing. The tests continue to
pass with these changes, so hopefully this is fine.
2025-02-25 10:56:32 -05:00
Sam Ford
8afa354c35
Livecheck::Options: Rework as T::Struct
As suggested, this reworks `Options` to subclass `T::Struct`, which
simplifies the implementation and makes it easier to maintain.

One noteworthy difference in switching to `T::Struct` is that
`#serialize` omits `nil` values but I don't _think_ this should be a
problem for us. In terms of changes, I modified `#merge` to remove a
now-unnecessary `compact` call and updated related tests.

Co-authored-by: Douglas Eichelberger <697964+dduugg@users.noreply.github.com>
2025-02-25 10:56:32 -05:00
Sam Ford
b6eb945320
livecheck: Add Options class
This adds a `Livecheck::Options` class, which is intended to house
various configuration options that are set in `livecheck` blocks,
conditionally set by livecheck at runtime, etc. The general idea is
that when we add features involving configurations options (e.g., for
livecheck, strategies, curl, etc.), we can make changes to `Options`
without needing to modify parameters for strategy `find_versions`
methods, `Strategy` methods like `page_headers` and `page_content`,
etc. This is something that I've been trying to improve over the years
and `Options` should help to reduce maintenance overhead in this area
while also strengthening type signatures.

`Options` replaces the existing `homebrew_curl` option (which related
strategies pass to `Strategy` methods and on to `curl_args`) and the
new `url_options` (which contains `post_form` or `post_json` values
that are used to make `POST` requests). I recently added `url_options`
as a temporary way of enabling `POST` support without `Options` but
this restores the original `Options`-based implementation.

Along the way, I added a `homebrew_curl` parameter to the `url` DSL
method, allowing us to set an explicit value in `livecheck` blocks.
This is something that we've needed in some cases but I also intend
to replace implicit/inferred `homebrew_curl` usage with explicit
values in `livecheck` blocks once this is available for use. My
intention is to eventually remove the implicit behavior and only rely
on explicit values. That will align with how `homebrew_curl` options
work for other URLs and makes the behavior clear just from looking at
the `livecheck` block.

Lastly, this removes the `unused` rest parameter from `find_versions`
methods. I originally added `unused` as a way of handling parameters
that some `find_versions` methods have but others don't (e.g., `cask`
in `ExtractPlist`), as this allowed us to pass various arguments to
`find_versions` methods without worrying about whether a particular
parameter is available. This isn't an ideal solution and I originally
wanted to handle this situation by only passing expected arguments to
`find_versions` methods but there was a technical issue standing in
the way. I recently found an answer to the issue, so this also
replaces the existing `ExtractPlist` special case with generic logic
that checks the parameters for a strategy's `find_versions` method
and only passes expected arguments.

Replacing the aforementioned `find_versions` parameters with `Options`
ensures that the remaining parameters are fairly consistent across
strategies and any differences are handled by the aforementioned
logic. Outside of `ExtractPlist`, the only other difference is that
some `find_versions` methods have a `provided_content` parameter but
that's currently only used by tests (though it's intended for caching
support in the future). I will be renaming that parameter to `content`
in an upcoming PR and expanding it to the other strategies, which
should make them all consistent outside of `ExtractPlist`.
2025-02-25 10:56:31 -05:00
Mike McQuaid
b1559f38a0
Add HOMEBREW_UPGRADE_GREEDY_CASKS
A space-separated list of casks. Homebrew will act as if `--greedy`
was passed when upgrading any cask on this list.
2025-02-25 15:34:49 +00:00
Adrian Ho
571da49165 diagnostic: fix call to missing_dependencies
Followup to #19323.
2025-02-25 19:12:11 +08:00
Mike McQuaid
e49b36d118
Merge pull request #19323 from Homebrew/typed-formula
Enable strict typing in Formula
2025-02-25 08:36:24 +00:00
Douglas Eichelberger
cdb6a3df84
Merge pull request #19356 from Homebrew/nilable-demodulize
refactor: move nil check inside demodulize
2025-02-24 20:07:44 +00:00
Patrick Linnane
e647b747dd
Merge pull request #19368 from Homebrew/dependabot/bundler/Library/Homebrew/sorbet-40d3d6f023
build(deps): bump the sorbet group in /Library/Homebrew with 4 updates
2025-02-24 20:00:06 +00:00
Douglas Eichelberger
936b9b5369
Move nil check inside demodulize 2025-02-24 11:57:20 -08:00
BrewTestBot
c98a434e46
Update RBI files for tapioca.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2025-02-24 19:49:30 +00:00
BrewTestBot
af60b687ef
brew vendor-gems: commit updates. 2025-02-24 19:49:18 +00:00
BrewTestBot
1054444dcf
brew vendor-gems: commit updates. 2025-02-24 19:48:56 +00:00
dependabot[bot]
b57e8fc853
build(deps): bump the sorbet group in /Library/Homebrew with 4 updates
Bumps the sorbet group in /Library/Homebrew with 4 updates: [sorbet-static-and-runtime](https://github.com/sorbet/sorbet), [sorbet-runtime](https://github.com/sorbet/sorbet), [sorbet](https://github.com/sorbet/sorbet) and [sorbet-static](https://github.com/sorbet/sorbet).


Updates `sorbet-static-and-runtime` from 0.5.11845 to 0.5.11851
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

Updates `sorbet-runtime` from 0.5.11845 to 0.5.11851
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

Updates `sorbet` from 0.5.11845 to 0.5.11851
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

Updates `sorbet-static` from 0.5.11845 to 0.5.11851
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

---
updated-dependencies:
- dependency-name: sorbet-static-and-runtime
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: sorbet
- dependency-name: sorbet-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: sorbet
- dependency-name: sorbet
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: sorbet
- dependency-name: sorbet-static
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: sorbet
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-24 19:19:24 +00:00
dependabot[bot]
42f89a868f
build(deps-dev): bump tapioca in /Library/Homebrew
Bumps [tapioca](https://github.com/Shopify/tapioca) from 0.16.10 to 0.16.11.
- [Release notes](https://github.com/Shopify/tapioca/releases)
- [Commits](https://github.com/Shopify/tapioca/compare/v0.16.10...v0.16.11)

---
updated-dependencies:
- dependency-name: tapioca
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-24 18:48:17 +00:00
Douglas Eichelberger
49ee4d5720
Fix docs 2025-02-24 10:23:43 -08:00
Douglas Eichelberger
ca8759605c
Fix tests 2025-02-24 10:23:42 -08:00
Douglas Eichelberger
beeb0b8f6d
Reclaim some vertical real estate 2025-02-24 10:23:42 -08:00
Douglas Eichelberger
a81239ec2d
Enable strict typing in Formula 2025-02-24 10:23:42 -08:00
Mike McQuaid
89d1d6b8f4
Merge pull request #19359 from Homebrew/no-attr_rw
refactor: inline use of attr_rw
2025-02-24 09:02:02 +00:00
Mike McQuaid
b9eff75108
Merge pull request #19351 from Homebrew/livecheck/refactor-livecheck_strategy_names
livecheck: refactor livecheck_strategy_names
2025-02-24 08:59:51 +00:00
Mike McQuaid
b4648182ca
Merge pull request #19352 from Homebrew/livecheck/restrict-post-hashes-to-symbol-keys
livecheck: restrict POST hashes to symbol keys
2025-02-24 08:57:53 +00:00
Douglas Eichelberger
7880490f85
Update Library/Homebrew/formula.rb
Co-authored-by: Markus Reiter <me@reitermark.us>
2025-02-23 15:09:34 -08:00
Douglas Eichelberger
3ef22f3181
Inline use of attr_rw 2025-02-23 13:18:49 -08:00
Michael Cho
05d3ce85cd
dev-cmd/bottle: check for prefix when not /usr/local
Fixes incorrectly marking bottles as relocatable, e.g.

425d4ea43d/Formula/p/pkgconf.rb (L34-L36)

This cannot be done for `/usr/local` as it is used outside Homebrew.
Other default prefixes are Homebrew-specific.
2025-02-23 14:28:31 -05:00
Sam Ford
5e57df7287
livecheck: restrict POST hashes to symbol keys
I initially set the type for livecheck's `post_form` and `post_json`
hashes to allow either a string or symbol key. I used string keys in
the documentation, as there will inevitably be some form field names
that would pose a problem for symbols (e.g., `E-mail` uses a hyphen,
`1twothree` starts with a digit, etc.). However, I remembered that we
can simply use quote symbols like `:"E-mail"` to handle these
situations, as they have the flexibility of a string while still being
a symbol.

With that in mind, this updates related type signatures to only allow
symbol keys and updates documentation and tests accordingly. The
documentation example contains a hyphenated form field, so it
demonstrates how to handle names that don't work as a bare symbol.
2025-02-21 21:54:46 -05:00
Sam Ford
efeff905eb
livecheck: refactor livecheck_strategy_names
This refactors the `livecheck_strategy_names` method to align with
Doug's `livecheck_find_versions_parameters` implementation.
2025-02-21 20:24:28 -05:00
BrewTestBot
88751b7db9
sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow.
2025-02-22 00:24:35 +00:00
Mike McQuaid
db657725b5
Merge pull request #19346 from botantony/zig-args
Zig template and std args
2025-02-21 19:29:27 +00:00
Patrick Linnane
d6fd0b6359
Merge pull request #19347 from Homebrew/dependabot/bundler/Library/Homebrew/sorbet-20eb92d5ee
build(deps): bump the sorbet group in /Library/Homebrew with 4 updates
2025-02-21 18:52:56 +00:00
BrewTestBot
744eaa4cf5
brew vendor-gems: commit updates. 2025-02-21 18:42:38 +00:00
BrewTestBot
a7ef82df50
brew vendor-gems: commit updates. 2025-02-21 18:42:15 +00:00
dependabot[bot]
574a595e2d
build(deps-dev): bump rubocop-sorbet in /Library/Homebrew
Bumps [rubocop-sorbet](https://github.com/shopify/rubocop-sorbet) from 0.8.7 to 0.8.9.
- [Release notes](https://github.com/shopify/rubocop-sorbet/releases)
- [Commits](https://github.com/shopify/rubocop-sorbet/compare/v0.8.7...v0.8.9)

---
updated-dependencies:
- dependency-name: rubocop-sorbet
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-21 18:36:32 +00:00
dependabot[bot]
7c21f48f29
build(deps): bump the sorbet group in /Library/Homebrew with 4 updates
Bumps the sorbet group in /Library/Homebrew with 4 updates: [sorbet-static-and-runtime](https://github.com/sorbet/sorbet), [sorbet-runtime](https://github.com/sorbet/sorbet), [sorbet](https://github.com/sorbet/sorbet) and [sorbet-static](https://github.com/sorbet/sorbet).


Updates `sorbet-static-and-runtime` from 0.5.11842 to 0.5.11845
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

Updates `sorbet-runtime` from 0.5.11842 to 0.5.11845
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

Updates `sorbet` from 0.5.11842 to 0.5.11845
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

Updates `sorbet-static` from 0.5.11842 to 0.5.11845
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

---
updated-dependencies:
- dependency-name: sorbet-static-and-runtime
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: sorbet
- dependency-name: sorbet-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: sorbet
- dependency-name: sorbet
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: sorbet
- dependency-name: sorbet-static
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: sorbet
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-21 18:36:18 +00:00