brew_dart 0.3.0
brew_dart: ^0.3.0 copied to clipboard
Programmatic access to Homebrew on macOS and Linux. Strongly-typed freezed models, JSON v2 parsing, streaming output, batch operations, and a Brew facade.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.3.0 - 2026-04-02 #
Fixed #
- pub.dev static analysis: committed generated
*.freezed.dartand*.g.dartfiles so pub.dev's analyzer can resolve types without runningbuild_runner. Updated.gitignoreto only exclude generated files underexample/, notlib/.
Changed #
pubspec.yamldescription shortened to 154 characters (within the 60–180 pub point limit) to achieve a perfect 160/160 pub points score.analysis_options.yamlupdated to usepackage:lints/recommended.yaml(waspackage:lints/core.yaml).
Docs #
- Added Flutter example app screenshot (
doc/flutter_example_01.png) to README.
0.2.0 - 2026-04-01 #
Changed #
- CI coverage threshold raised from 30% to 60% now that auto-generated files are excluded from measurement.
Fixed #
- Coverage reporting:
codecov.ymladded to instruct Codecov to ignore*.g.dartand*.freezed.dartfiles; CI pipeline now strips those files fromlcov.infovia a post-processing step before uploading, removing ~1,900 lines of boilerplate from the headline number.
Tests #
- Test count increased from 140 → 256 (+116 tests); hand-written-code coverage reaches 99%.
FakeBrewCliextended withwhenRunThrows()to exercise exception-catch branches without spawning a real process.- New test groups covering previously untested paths:
Brewfacade:upgradeAll,uninstallAll, parallelinstallAll,upgradeStream,updateStream,listInstalledfiltering, error-throw paths for every Phase 1–6 method,isInstalledexception branches, default constructor,cligetter,search/install/uninstall/cleanup/upgrade/bundle/bundleCheckflag variants.BrewCli:run()success/stderr/extraEnv,runJson()success,stream()stdout, stderr, and non-zero exit.ServicesParser:_parseFallbackpath, multi-token file path,none/unknownstatus values.JsonV2Parser: outdated casks,installed_versionsas legacy string, missingcurrent_versionfallback, null/absent versions.BrewfileParser: Ruby:symbol,true/falsebooleans, quoted string option values,whalebrewentry type.SearchParser:==> Formulaeheader branch,_Section.nonepre-header lines, unknown section header handling.DoctorParser:Error:severity, mixed warning + error output.BrewApiClient:installAnalyticsfallback toformulaekey, string-valued counts, 90-day range, empty items;CaskDetailwithdepends_on/auto_updates.- New file
test/models/additional_models_test.dart:BundleResult/BundleCheckResulttoString();fromJsonround-trips forBrewConfig,BrewfileEntry,Brewfile,MissingDependency,Diagnostic,DoctorReport,OutdatedPackage,BrewService.
0.1.0 #
Added #
- CLI runner (
BrewCli) withrun,runJson, andstreammethods wrappingProcess.run/Process.start. - Environment defaults -- every invocation sets
HOMEBREW_NO_COLOR,HOMEBREW_NO_EMOJI,HOMEBREW_NO_AUTO_UPDATE,HOMEBREW_NO_ANALYTICS,HOMEBREW_NO_ENV_HINTS. - Strongly-typed models using
freezed:Formula,FormulaVersions,InstalledVersion,RuntimeDependencyCaskTapBrewService,ServiceStatusBrewConfigDoctorReport,Diagnostic,DiagnosticSeverityOutdatedPackageInstalledPackage,PackageInfoSearchResultInstallResult,UninstallResult,UpgradeResult,CleanupResult,UpdateResult,BatchResultBrewfile,BrewfileEntry,BundleResult,BundleCheckResultMissingDependency
- Parsers:
JsonV2Parserforbrew info --json=v2,brew outdated --json=v2SearchParserforbrew searchtext outputListParserforbrew listtext outputServicesParserforbrew services listtabular outputDoctorParserforbrew doctordiagnosticsConfigParserforbrew configkey-value outputBrewfileParserfor Brewfile Ruby DSL
- Unified
Brewfacade with methods for:- Detection & environment:
isInstalled,version,config,doctor,prefix,cellarPath - Query & info:
info,infoMultiple,installed,outdated,search - Package management:
install,installAll,installStream,uninstall,uninstallAll,cleanup,upgrade,upgradeAll,upgradeStream - List:
listNames,listInstalled,isPackageInstalled - Dependencies:
deps,uses,missing - Taps:
taps,tap,untap - System:
update,updateStream,link,unlink,pin,unpin,pinned - Services:
services,startService,stopService,restartService - Brewfile:
readBrewfile,bundleDump,bundle,bundleCheck
- Detection & environment:
- Exception hierarchy:
BrewException,BrewNotInstalledException,BrewCommandException,PackageNotFoundException,InstallFailedException,DependencyConflictException,CommandTimeoutException. - Optional HTTP API client (
BrewApiClient) for formulae.brew.sh catalog browsing, importable separately viapackage:brew_dart/remote.dart. UsesHttpGetFntypedef to avoid adding an HTTP dependency.