90ca983200
fix(detect): wire up ports package for OpenBSD detection
...
The ports package was fully implemented but detect_openbsd.go still
returned nil candidates with a stale TODO. Wire up ports.New() so
OpenBSD systems can auto-detect their package manager.
Also adds:
- Unit tests for GetCapabilities with mock managers (base + full)
- Unit tests for Locker mutual exclusion
- Edge case tests for ports parser (empty input, whitespace, fallback)
- Minor dep updates (charmbracelet/ultraviolet, charmbracelet/x)
2026-03-05 09:03:38 +00:00
copilot-swe-agent[bot]
73d546235e
detect: replace sync.Once with atomic.Pointer for race-safe caching and Reset()
...
Co-authored-by: taigrr <8261498+taigrr@users.noreply.github.com >
2026-02-28 06:51:41 +00:00
copilot-swe-agent[bot]
68ec5cb659
detect: cache Default() result with sync.Once, add Reset()
...
Co-authored-by: taigrr <8261498+taigrr@users.noreply.github.com >
2026-02-28 06:18:45 +00:00
b12f956e45
test: exhaustive integration tests with codecov
...
- Root package unit tests: Targets, TargetNames, ApplyOptions, error sentinels
- Every provider integration test now covers:
- All Manager interface methods (positive + negative cases)
- GetCapabilities verification (assert expected interfaces)
- VersionQuerier: LatestVersion, ListUpgrades, UpgradeAvailable, VersionCmp
- Holder: Hold, ListHeld, Unhold (apt, dnf)
- Cleaner: Autoremove, Clean
- FileOwner: FileList, Owner (+ not-found cases)
- RepoManager: ListRepos (apt, dnf, flatpak)
- KeyManager: ListKeys (apt, dnf)
- Grouper: GroupList, GroupInfo (pacman, dnf)
- NameNormalizer: NormalizeName, ParseArch table tests (apt, dpkg, dnf, rpm)
- Containertest matrix: 5 distros (debian, alpine, arch, fedora39, fedora-latest)
- CI: coverage profiles uploaded per-job, merged in codecov job
- Added .gitignore for coverage files
2026-02-26 02:50:48 +00:00
b443269594
feat: add integration tests and GitHub Actions CI
...
Add integration test files for all providers (apt, dpkg, pacman, apk,
dnf, rpm, flatpak, snap, pkg, detect) behind the 'integration' build
tag. Tests exercise real package operations: update, search, info,
install, verify, list, remove, and capability interfaces.
Add GitHub Actions workflow running unit tests on ubuntu-latest and
integration tests on Debian, Ubuntu, Fedora, Alpine, Arch Linux, and
Ubuntu+Flatpak containers/runners.
2026-02-26 01:42:19 +00:00
ca2fdd49ac
feat: implement detect package and snack CLI
...
- detect: auto-detection with Default(), All(), ByName()
- Platform-specific probing via build tags (linux, freebsd, openbsd)
- Linux probe order: apt, dnf, pacman, apk, flatpak, snap
- cmd/snack: full CLI with cobra + charmbracelet/fang
- Subcommands: install, remove, purge, upgrade, update, list, search,
info, which, hold, unhold, clean, detect, version
- Global flags: --manager, --sudo, --yes, --dry-run
- Capability type-assertions for FileOwner, Holder, Cleaner
- detect: basic compilation tests
2026-02-26 01:08:27 +00:00
08514a27e1
feat: initial project scaffold
...
- Common Manager interface, Package type, functional options
- Sentinel errors for common package manager failures
- Sub-package stubs for: pacman, aur, apk, apt, dpkg, dnf, rpm,
flatpak, snap, pkg (FreeBSD), ports (OpenBSD)
- detect/ package for auto-detection of system package manager
- 0BSD license
2026-02-25 20:01:51 +00:00