Skip to content

v1.9.23

Choose a tag to compare

@pirate pirate released this 02 Apr 16:38
9826e04

abx-pkg v1.9.23

Highlights

  • 🧪 Replaced the old single-file tests.py runner with a real pytest suite under tests/, with live lifecycle coverage across apt, brew, pip, npm, cargo, gem, goget, nix, docker, pyinfra, and ansible.
uv run pytest -m "not root_required and not docker_required"
  • 🧭 Standardized isolated install layout across providers with shared install_root / bin_dir aliases, while still supporting provider-specific knobs like pip_venv, npm_prefix, cargo_root, gem_home, gopath, nix_profile, and docker_shim_dir.
from pathlib import Path
from abx_pkg import PipProvider

provider = PipProvider(install_root=Path("/tmp/venv"))
print(provider.install_root, provider.bin_dir)
  • ⏱️ Centralized shared provider runtime behavior in BinProvider, including install_timeout, version_timeout, PATH propagation into subprocesses, deep-copy override handling, and safer cache-dir setup.
from abx_pkg import NpmProvider

provider = NpmProvider(install_timeout=120, version_timeout=10)
binary = provider.install("zx")

Provider Fixes

  • 🔒 Fixed security override precedence so explicit install_args can adjust effective security behavior before fail-closed checks run, especially for npm --ignore-scripts and --min-release-age=....
from abx_pkg import NpmProvider

provider = NpmProvider(min_release_age=36500).get_provider_with_overrides(
    overrides={"zx": {"install_args": ["zx", "--min-release-age=0"]}},
)
  • 🐳 Improved version detection for multiline banners by teaching SemVer.parse(...) to scan up to 5 lines. This fixes wrappers and tools whose version appears after a heading line, including Docker-backed command shims.
from abx_pkg import SemVer

SemVer.parse(
    "ShellCheck - shell script analysis tool\nversion: v0.11.0-65-gcd41f79"
)
# -> SemVer("0.11.0")
  • 🧰 Tightened provider-specific behavior across the built-ins:
    • apt / brew helper backends now use resolved install_args
    • cargo uninstall no longer reuses incompatible version-pinned install flags
    • nix uninstall preserves other entries in the same profile
    • goget is now the canonical provider name throughout the package and docs
    • Binary.abspaths is available as a backward-compatible read alias for loaded_abspaths

Docs And DX

  • 📚 Refreshed the README API reference with verified provider defaults, install roots, security controls, timeout behavior, override support, and direct source/test links.
  • 🛠️ Updated the development workflow docs to match the current toolchain and test layout.
uv sync --all-extras --all-groups
uv run prek run --all-files
uv run pytest -sx tests/