134 Commits

Author SHA1 Message Date
b86a793e1c Merge pull request #45 from gogrlx/dependabot/go_modules/github.com/go-git/go-git/v5-5.17.1
chore(deps): bump github.com/go-git/go-git/v5 from 5.17.0 to 5.17.1
2026-04-01 02:31:21 -04:00
dependabot[bot]
adb8de7bee chore(deps): bump github.com/go-git/go-git/v5 from 5.17.0 to 5.17.1
Bumps [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) from 5.17.0 to 5.17.1.
- [Release notes](https://github.com/go-git/go-git/releases)
- [Commits](https://github.com/go-git/go-git/compare/v5.17.0...v5.17.1)

---
updated-dependencies:
- dependency-name: github.com/go-git/go-git/v5
  dependency-version: 5.17.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-30 17:16:13 +00:00
4ea7c3f93b build(release): add Homebrew tap, install script, fix deprecations
- Replace deprecated brews with homebrew_casks
- Replace deprecated nfpms.builds with nfpms.ids
- Remove deprecated snapshot.name_template
- Create gogrlx/homebrew-tap repo for Homebrew distribution
- Add install.sh for curl-pipe-sh installation
- Users can now: brew install gogrlx/tap/snack
v0.4.2
2026-03-25 19:08:06 +00:00
5863cea51e chore(deps): update all dependencies v0.4.1 2026-03-10 17:55:30 +00:00
a171459a66 fix(flatpak): remove duplicate stubs in flatpak_other.go
Functions latestVersion, listUpgrades, upgradeAvailable, versionCmp
were declared in both flatpak_other.go and capabilities_other.go,
causing build failures on non-Linux platforms.
2026-03-10 17:54:14 +00:00
84e4f8e2ff feat(aur): rewrite with go-git, RPC batch queries, functional options
- Replace shell git clone with go-git for cloning/pulling PKGBUILDs
- Add rpcInfoMulti for batch AUR queries (single HTTP request)
- Add functional options: WithBuildDir, WithMakepkgFlags
- Implement proper remove/purge via pacman -R/-Rns
- Fix temp directory leak: buildPackage returns cleanup path
- Remove NameNormalizer (AUR names are plain identifiers)
- Update README capability matrix
- Remove duplicate platform stubs (flatpak, ports)
v0.4.0
2026-03-10 17:41:03 +00:00
1a51a40e4e Merge branch 'cd/aur-implementation': AUR rewrite with go-git, RPC batch queries, functional options
# Conflicts:
#	flatpak/capabilities.go
#	ports/capabilities.go
#	ports/capabilities_openbsd.go
#	ports/ports_test.go
#	snap/capabilities.go
#	snap/snap_linux.go
#	snap/snap_other.go
2026-03-10 17:35:15 +00:00
6db6e993f0 Merge pull request #43 from gogrlx/cd/update-deps-go1.26.1
chore: update Go to 1.26.1, fix formatting, add parse tests
2026-03-08 14:28:48 -04:00
1410e4888c chore: update Go to 1.26.1, fix goimports formatting, add tests
- Update go.mod from Go 1.26.0 to 1.26.1
- Update dependencies: golang.org/x/sync, golang.org/x/sys,
  charmbracelet/x/exp/charmtone, mattn/go-runewidth
- Fix goimports formatting in 10 files
- Add apk/normalize_test.go: tests for normalizeName and
  parseArchNormalize with all known arch suffixes
- Add rpm/parse_test.go: tests for parseList, parseInfo,
  parseArchSuffix, and normalizeName (all at 100% coverage)
- All tests pass with -race, staticcheck and go vet clean
2026-03-08 12:47:30 +00:00
e8b0454851 Merge pull request #41 from gogrlx/cd/fix-ci-failures
Cd/fix ci failures
v0.3.0
2026-03-05 23:23:25 -05:00
2422655c1d Merge pull request #42 from gogrlx/cd/fix-readme-capabilities
docs: fix README capability matrix
2026-03-05 23:23:10 -05:00
4a9a2b1980 docs: fix capability matrix for dnf, flatpak, pkg
- dnf: add Hold and KeyMgmt (both implemented)
- flatpak: remove DryRun (not implemented)
- pkg: remove Hold, RepoMgmt, DryRun (not implemented)
2026-03-06 04:22:35 +00:00
1da329dfb5 docs: fix capability matrix — snap supports Clean 2026-03-06 04:22:35 +00:00
f53534ce6f docs: fix capability matrix for dnf, flatpak, pkg
- dnf: add Hold and KeyMgmt (both implemented)
- flatpak: remove DryRun (not implemented)
- pkg: remove Hold, RepoMgmt, DryRun (not implemented)
2026-03-06 04:21:51 +00:00
d30c9fec0e docs: fix capability matrix — snap supports Clean 2026-03-06 04:20:10 +00:00
98bfc56960 Merge pull request #40 from gogrlx/cd/fix-ci-failures
fix(ci): update integration tests for NameNormalizer, fix lint and Windows CI
2026-03-05 23:15:28 -05:00
c913d96de3 fix(ci): update integration tests for NameNormalizer, fix lint and Windows CI
- Update apk/pacman/snap/flatpak integration tests to assert
  NameNormalize=true (all managers now implement NameNormalizer)
- Update flatpak integration test to assert VersionQuery=true
- Remove unused aur functions: rpcInfoMulti, getAURBuildDir
- Wire AUR.Clean to call clean() for consistency
- Fix Windows CI: add shell:bash to avoid PowerShell arg splitting
  on -coverprofile=coverage-windows.out
2026-03-06 04:13:39 +00:00
ffbe0e12ba Merge branch 'cd/add-winget': add winget support for Windows 2026-03-06 03:40:39 +00:00
6237a5f23a Merge branch 'cd/fix-flatpak-build': fix ports/detect build issues 2026-03-06 03:40:37 +00:00
ac15ab5a49 feat(winget): add integration tests, CI, and README updates
- Add winget_integration_test.go for Windows integration testing
- Add Windows CI job (windows-latest) for unit + detect tests
- Add cross-compile CI matrix (windows, darwin, freebsd, openbsd)
- Update README with winget in supported managers and capability matrix
- Include Windows coverage in codecov upload
2026-03-06 03:40:13 +00:00
9e9fb1a822 ci: add Windows runner and cross-compile jobs for winget
- New 'windows' job runs unit tests on windows-latest with coverage
- New 'cross-compile' matrix job builds for windows/darwin/freebsd/openbsd
- Integration test file for winget (gated behind integration build tag)
- Windows coverage included in codecov upload
2026-03-06 03:29:47 +00:00
aed2ee8b86 feat(winget): add Windows Package Manager support
Implements the full snack.Manager interface for winget:
- Install/Remove/Purge/Upgrade via winget CLI
- Search/List/Info/IsInstalled/Version queries
- Source (repository) management via RepoManager
- Version querying via VersionQuerier
- Targeted package upgrades via PackageUpgrader
- Name normalization via NameNormalizer

All commands use --disable-interactivity, --accept-source-agreements,
and --accept-package-agreements for non-interactive operation.

Parser handles winget's fixed-width tabular output by detecting column
positions from the header/separator lines. Includes VT100 escape
sequence stripping and progress line filtering.

Windows-only via build tags; other platforms return
ErrUnsupportedPlatform. Registered in detect_windows.go as the
default Windows package manager.
2026-03-06 03:26:47 +00:00
84f9cbc9cf fix(ports,detect): remove duplicate funcs and fix windows build
ports/capabilities_openbsd.go duplicated autoremove, clean, fileList,
and owner already defined in ports_openbsd.go, breaking OpenBSD builds.

detect/detect_other.go build tag didn't exclude windows, conflicting
with detect_windows.go declarations.
2026-03-06 03:19:49 +00:00
151c657398 fix(flatpak): restore VersionQuerier functions lost in refactor
The capabilities_linux.go deletion moved VersionQuerier methods
(latestVersion, listUpgrades, upgradeAvailable, versionCmp) to
capabilities.go as receiver methods, but their platform implementations
were not added to flatpak_linux.go, causing build failure on Linux.

Also removes accidentally committed .DS_Store, .crush/, and AGENTS.md.
2026-03-06 03:15:43 +00:00
934c6610c5 feat: add Homebrew provider, implement NameNormalizer across all managers
- Add brew package for Homebrew support on macOS and Linux
- Implement NameNormalizer interface (NormalizeName, ParseArch) for all providers
- Add darwin platform detection with Homebrew as default
- Consolidate capabilities by removing separate *_linux.go/*_other.go files
- Update tests for new capability expectations
- Add comprehensive tests for AUR and brew providers
- Update README with capability matrix and modern Target API usage

💘 Generated with Crush

Assisted-by: AWS Claude Opus 4.5 via Crush <crush@charm.land>
2026-03-05 20:40:32 -05:00
724ecc866e fix(ci): update snap test caps, install Flatseal in flatpak CI
- snap integration test asserted Clean=false, but snap now implements
  Cleaner — updated to assert True
- flatpak CI job now installs Flatseal before running integration tests
  so Version/List tests have a known installed package
2026-03-06 01:14:20 +00:00
77bdcfef3a feat(ci): add goreleaser config and release workflow v0.2.0 2026-03-06 01:07:39 +00:00
80ea10dcff fix(detect): add stub for unsupported platforms (darwin, windows, etc.)
detect package failed to compile on non-Linux/FreeBSD/OpenBSD because
candidates() and allManagers() had no fallback. Added detect_other.go
with empty implementations.
2026-03-06 01:07:35 +00:00
85e06ffc44 docs: rewrite README with current API, capabilities table, CLI docs
- Fix usage examples to use snack.Targets() and snack.Target
- Replace construction emoji status with actual extras per provider
- Document all interfaces including PackageUpgrader and DryRunner
- Add Options section documenting all functional options
- Add full CLI command reference with examples
- Remove implementation priority (everything is implemented)
2026-03-06 01:07:35 +00:00
1fa7de6d66 feat: add PackageUpgrade to Capabilities, exhaustive detect + CLI tests
- Add PackageUpgrade field to Capabilities struct and GetCapabilities
- Add PackageUpgrade to all 11 provider capability tests
- Add pkg-upgrade to CLI detect command output
- Expand detect tests: ByName for all managers, concurrent Reset,
  HasBinary, candidates/allManagers coverage
- Add cmd/snack unit tests: targets, opts, getManager, version
- 838 tests passing, 0 failures
2026-03-06 01:07:35 +00:00
60b68060e7 test(dpkg,apk): exhaustive tests for dpkg extras, fix apk parseInfoNameVersion panic
- dpkg: add normalize_test.go with NormalizeName/ParseArch table tests
- dpkg: add capabilities, DryRunner, interface compliance, parse edge cases
- apk: fix parseInfoNameVersion panic on empty input
- apk: add empty/whitespace test cases for parseInfoNameVersion

807 tests passing, 0 failures.
2026-03-06 01:07:35 +00:00
c34b7a467c test: exhaustive unit tests for all provider-specific interfaces
Add 740 total tests (up from ~200) covering:
- Compile-time interface compliance for all providers
- GetCapabilities assertions for every provider
- Parse function edge cases: empty, malformed, single-entry, multi-entry
- apt: extract inline parse logic into testable functions (parsePolicyCandidate,
  parseUpgradeSimulation, parseHoldList, parseOwner, parseSourcesLine)
- dnf/rpm: edge cases for both dnf4 and dnf5 parsers, normalize/parseArch
- pacman/aur: parseUpgrades, parseGroupPkgSet, capabilities
- apk: parseUpgradeSimulation, parseListLine, SupportsDryRun
- flatpak/snap: semverCmp, stripNonNumeric edge cases
- pkg/ports: all parse functions with thorough edge cases

Every provider now has:
- Interface compliance checks (what it implements AND what it doesn't)
- Capabilities test via snack.GetCapabilities()
- Parse function unit tests with table-driven edge cases
2026-03-06 01:07:35 +00:00
e38a787beb feat(ports): add VersionQuerier, Cleaner, FileOwner, PackageUpgrader 2026-03-06 01:07:35 +00:00
6ba3d75258 feat(snap): add Cleaner 2026-03-06 01:07:35 +00:00
4a711f0187 feat(flatpak): add VersionQuerier 2026-03-06 01:07:35 +00:00
0b4c596fad Merge pull request #39 from gogrlx/dependabot/go_modules/github.com/cloudflare/circl-1.6.3
chore(deps): bump github.com/cloudflare/circl from 1.6.1 to 1.6.3
2026-03-05 20:04:12 -05:00
dependabot[bot]
18fabed79a chore(deps): bump github.com/cloudflare/circl from 1.6.1 to 1.6.3
Bumps [github.com/cloudflare/circl](https://github.com/cloudflare/circl) from 1.6.1 to 1.6.3.
- [Release notes](https://github.com/cloudflare/circl/releases)
- [Commits](https://github.com/cloudflare/circl/compare/v1.6.1...v1.6.3)

---
updated-dependencies:
- dependency-name: github.com/cloudflare/circl
  dependency-version: 1.6.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-05 23:19:53 +00:00
b6b50491e2 feat(ports): add VersionQuerier, Cleaner, FileOwner, PackageUpgrader 2026-03-05 23:19:45 +00:00
a1d13e8a7d feat(snap): add Cleaner 2026-03-05 23:19:11 +00:00
c00133718e feat(flatpak): add VersionQuerier 2026-03-05 23:18:40 +00:00
e1d89fa485 Merge pull request #38 from gogrlx/cd/aur-implementation
feat(aur): implement native AUR client
2026-03-05 18:09:56 -05:00
b8714a4969 refactor(aur): use go-git instead of git CLI
Replace exec.Command git clone/pull with go-git's PlainCloneContext
and Worktree.Pull. Removes git binary dependency — only makepkg and
pacman are needed on the host now.
2026-03-05 22:58:26 +00:00
eb999ad391 feat(aur): implement native AUR client
Native Go implementation using the AUR RPC v5 API for search/info
queries and git+makepkg+pacman for building and installing packages.

Implements:
- Manager (full: Install, Remove, Purge, Upgrade, Update, List, Search,
  Info, IsInstalled, Version)
- VersionQuerier (LatestVersion, ListUpgrades, UpgradeAvailable, VersionCmp)
- Cleaner (Autoremove via pacman, Clean build dir)
- PackageUpgrader (UpgradePackages)

Key design decisions:
- No CLI wrapper (paru/yay) — uses AUR RPC API directly + git clone
- Packages are built with makepkg and installed via pacman -U
- Foreign packages (pacman -Qm) are treated as AUR packages for List
- Batch RPC queries (rpcInfoMulti) for efficient upgrade checks
- Configurable build directory and makepkg flags
- Not added to detect.Default() candidates (AUR supplements pacman,
  not replaces it) but available via detect.ByName("aur")
2026-03-05 22:50:35 +00:00
42c2e8ac05 ci: add goreleaser config and release workflow 2026-03-05 22:43:40 +00:00
34ce21618d Merge pull request #36 from gogrlx/cd/ci-improvements
ci: add staticcheck lint job and Go version matrix
2026-03-05 17:39:20 -05:00
342f10f38b ci: drop Go 1.25 from matrix (go.mod requires 1.26) 2026-03-05 22:37:56 +00:00
e9dc88f83a ci: add staticcheck lint job and Go version matrix for unit tests 2026-03-05 22:35:33 +00:00
597a4f9d72 Merge pull request #33 from gogrlx/cd/openbsd-detect-and-tests
fix(detect): wire up ports package for OpenBSD detection
2026-03-05 12:29:34 -05:00
8a9bba55cf Merge pull request #34 from gogrlx/cd/apt-test-coverage
fix(apt): fix extractURL multi-token options parsing and add unit tests
2026-03-05 12:26:45 -05:00
8075e74393 Merge pull request #35 from gogrlx/cd/pacman-test-coverage
test(pacman): add comprehensive unit tests for pure functions
2026-03-05 12:26:23 -05:00