Commit Graph

9 Commits

Author SHA1 Message Date
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
e7018f3602 chore(deps): update all dependencies 2026-02-28 08:00:44 +00:00
dependabot[bot]
d85d256104 chore(deps): bump golang.org/x/crypto from 0.43.0 to 0.45.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.43.0 to 0.45.0.
- [Commits](https://github.com/golang/crypto/compare/v0.43.0...v0.45.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.45.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-26 02:08:05 +00:00
e46b2b4ce4 feat: add testcontainers-based local integration tests
Run with: go test -tags containertest -v -count=1 -timeout 10m .

Spins up Debian, Alpine, Arch, and Fedora containers locally via Docker,
copies the module source in, and runs the full integration test suite
in each. All four distros pass.

Requires Docker. Use build tag 'containertest' (separate from 'integration'
which runs directly on the host).
2026-02-26 02:06:02 +00:00
ae0709e2d4 fix: go mod tidy for testify transitive deps 2026-02-26 01:44:21 +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
d7755453ca feat: add CLI scaffold with cobra + fang 2026-02-25 20:09:38 +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