Update brew extension - #30598
Conversation
- fix: use the ambient Preferences.Search type; keep shipped changelog spacing - docs: changelog entry and README section for install statistics - feat: surface statistics in the sidebar, and regroup the display actions - feat: read Homebrew install analytics, and rank search results by them - chore: upgrade to @raycast/api 2.x and patch brace-expansion advisory
|
Thank you for your contribution! 🎉 🔔 @nhojb @Aayush9029 @mathieudutour @urwrstkn8mare @ashokbaruaakas @MillerApps @pernielsentikaer @jfkisafk @vpukhanov @j3lte @alexander-cato @ViGeng @ridemountainpig @clins1994 @alexibuild you might want to have a look. You can use this guide to learn how to check out the Pull Request locally in order to test it. 📋 Quick checkout commandsBRANCH="ext/brew"
FORK_URL="https://github.com/chrismessina/extensions.git"
EXTENSION_NAME="brew"
REPO_NAME="extensions"
git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run devWe're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 15 business days. |
Greptile SummaryAdds Homebrew install analytics, popularity-based search ordering, richer package metadata, and improved installed/outdated package presentation. It also introduces atomic cache downloads and updates the Raycast API and supporting dependencies.
Confidence Score: 5/5The PR appears safe to merge based on the available follow-up review context. No blocking failure remains. Important Files Changed
Reviews (17): Last reviewed commit: "feat: group pinned formulae in Show Outd..." | Re-trigger Greptile |
- fix: order versions instead of comparing them, and leave cask policy to brew - refactor: define package metadata once, render it in both namespaces - fix: one icon vocabulary for install state, across all three views - fix: detect an available update in Search, and stop the version row lying
|
@nhojb since your first pass, my latest batch adds: outdated formulae detection so that available upgrades are called out in the metadata, changed from red to yellow the update icon, condensed the sidebar metadata renderer (which killed three duplicated formatters and
|
|
@greptile could you take another look? |






Description
Adds Homebrew's install analytics to the extension. The detail sidebar shows a package's install counts and any deprecation warning, and Search gains an optional "Sort by Popularity" that orders results by installs over the last 30 days.
With sidebar hidden and stats accessory, sorted by popularity
Two data sources, deliberately. The per-package endpoint (~5KB) carries the 30/90/365-day counts plus the deprecation flags, and is fetched only for the selected row — Raycast constructs the detail element for every row in the list, so the fetch is gated on selection. The bulk 30-day rankings (~2.6MB, cached on disk) are only downloaded when the popularity sort is enabled, because ranking has to order the whole matching set before the search truncates it to 100 results; otherwise "most popular" would mean "most popular of the first hundred alphabetically".
The new toggle sidebar and show description actions
With sidebar and description visible
With sidebar visible and description hidden
This also moves the extension to
@raycast/api2.x. That needed no source changes — nothing here used the aliases v2 deprecates.Changes
@raycast/api2.x, and to abrace-expansionrelease without GHSA-rgw5-rvv9-x895.Notes for review
src/utils/brew/analyticsParse.check.tsis a self-check for the parsing that has no types to protect it — comma-formatted counts, per-invocation buckets, disabled-outranks-deprecated. It is not imported by any command and is not bundled. Run it with:npx esbuild src/utils/brew/analyticsParse.check.ts --bundle --platform=node --outfile=/tmp/check.js && node /tmp/check.jsLast-Modifiedcheck on each launch, so the 2.6MB is paid once per Homebrew republish rather than once per launch.Checklist
npm run buildand tested this distribution build in Raycastnpm run lintandnpx tsc --noEmit— both cleanCHANGELOG.mdper the changelog conventions