Skip to content

v1.9.30

Choose a tag to compare

@pirate pirate released this 12 Apr 19:39
b2bf7f6

abx-pkg v1.9.30

✨ Highlights

  • Added abx-pkg run --script, which reads inline /// script metadata blocks so scripts can declare binary dependencies and tool.abx-pkg settings right at the top of the file.
  • Unified managed providers around shared install_root / bin_dir behavior, and made ABX_PKG_LIB_DIR resolve from the live environment so CLI --lib overrides behave consistently.
  • Added first-class --no-cache and --debug CLI controls, and tightened the shared binary lifecycle so load() / install() / update() / uninstall() all speak the same cache semantics.
  • Fixed several installer-resolution and recursion edge cases, while making the real Playwright and Puppeteer test paths much faster instead of faking them.

🧭 Quick Examples

abx-pkg --lib=/tmp/abx --no-cache install yt-dlp
abx-pkg --debug --binproviders=env,npm,playwright run --script node ./capture.js
#!/usr/bin/env -S abx-pkg run --script node

// /// script
// dependencies = [
//   {name = "playwright", binproviders = ["npm", "pnpm"]},
//   {name = "chromium", binproviders = ["playwright", "puppeteer", "apt"], min_version = "131.0.0"},
// ]
// [tool.abx-pkg]
// ABX_PKG_POSTINSTALL_SCRIPTS = true
// ///

🛠 What Changed

  • parse_script_metadata() and run --script now parse comment-prefix-agnostic /// script blocks, resolve declared dependencies before execution, merge [tool.abx-pkg] settings, and preserve child exit codes/stdout/stderr cleanly.
  • The provider constructor surface now consistently prefers install_root and bin_dir, while legacy provider-specific root aliases are still accepted through validation aliases.
  • abx_pkg_install_root_default() now reads ABX_PKG_LIB_DIR from the live environment instead of a module-import snapshot, so CLI --lib and runtime env overrides propagate correctly across providers.
  • Removed load_or_install from the public API / CLI in favor of install(), and promoted no_cache into the shared lifecycle surface for Binary and BinProvider.
  • Hardened installer resolution across providers: fixed detect_euid() recursion, fixed dry-run version probing, corrected Go PATH / env handling, restored Yarn Berry --force behavior for no_cache, and normalized installer-binary abspath handling.
  • Playwright and Puppeteer now share the cleaned install_root / bin_dir model, bootstrap their installer binaries more predictably, and reuse seeded real browser installs in tests to cut redundant downloads.
  • CI now provisions both Yarn classic and Yarn Berry explicitly, pins pnpm to 10.19.0, and uses workflow concurrency cancellation plus job timeouts to prevent stale runs from piling up.
  • README and generated docs were refreshed to match the new CLI, lifecycle, and managed-root behavior.

⚠️ Behavioral Changes

  • Use Binary.install() / abx-pkg install instead of load_or_install.
  • CLI logging now defaults to INFO; enable debug output explicitly with --debug or ABX_PKG_DEBUG=1.
  • --no-cache / ABX_PKG_NO_CACHE=1 now apply consistently across load(), install(), update(), uninstall(), and run.

🧪 Verification

  • uv run prek run --all-files passed on the release commit.
  • Focused real-provider coverage was exercised for Playwright, Puppeteer, Bun, pnpm, Yarn classic, Yarn Berry, and GoGet lifecycle paths.

Thanks to everyone pushing on the install-root cleanup, browser provider edge cases, and CLI ergonomics. 🛠️