Skip to content

Releases: basefoundry/base-bash-libs

base-bash-libs v1.4.0

Choose a tag to compare

@codeforester codeforester released this 25 Jul 23:18
2c5ef2c

Added

  • Added hierarchical log-category gates and log_is_enabled, allowing callers
    to control reusable-component diagnostics independently from terminal and
    persistent-sink verbosity.

Changed

  • Assigned reusable-library records to base_bash_libs.<module> categories and
    defaulted the parent library gate to INFO, allowing application DEBUG output
    without implicitly enabling library DEBUG diagnostics.
  • Added an optional BASE_CLI_PRIMARY_LOG diagnostic sink. Bash logging keeps
    terminal verbosity unchanged while persisting the DEBUG-level stream to the
    shared run primary log.
  • Include the local numeric timezone offset in default structured log
    timestamps and an explicit UTC marker when LOG_UTC=1, keeping Bash log
    formatting aligned with Base's Python CLI logs.

Security

  • Stopped emitting the caller's unredacted argument vector when wrapper
    diagnostics are enabled, preventing sensitive option and positional values
    from entering terminal or persistent logs.
  • Hardened the primary diagnostic sink to reject unusable and non-regular
    targets, normalize new and existing log files to mode 0600, suppress
    best-effort write errors, and report only eligible sinks through
    log_is_enabled.

Deprecated

  • Deprecated the Bash-only VERBOSE level, log_verbose* helpers, and
    --verbose-wrapper. Their 1.x behavior remains unchanged, with removal no
    earlier than the next major release; DEBUG is the most detailed level for
    new code.

base-bash-libs v1.3.0

Choose a tag to compare

@codeforester codeforester released this 16 Jul 17:59
5e52e79

Fixed

  • Hardened arg_parse option specifications against duplicate, empty, and
    unreachable tokens, and added repeatable value options with ordered,
    caller-owned indexed-array outputs.

  • Hardened file-section marker validation, preserved symlink targets during
    atomic updates, and treated option-like target paths literally.

  • Made GitHub API failure capture safe under set -e, accepted canonical SSH
    GitHub remotes, and separated submodule diagnostics from pull logs while
    unregistering eagerly removed Git temp files.

  • Added canonical git_* names for generic branch, worktree, default-branch,
    and remote helpers.

  • Made fallback timeouts terminate descendant processes when a command is
    launched in its own process group.

  • Isolated pre-existing EXIT trap control flow so return or exit cannot skip
    registered cleanup hooks and paths.

  • Normalized decimal integer inputs before arithmetic validation and rejected
    inverted argument or range bounds.

  • Stopped wrapper-option filtering at the -- argument terminator and kept
    launcher runtime-filter state local to each script invocation.

  • Preserved caller OPTIND, maintained batch prepend order in add_to_path, and
    treated option-like paths literally in safe_touch.

  • Hardened named-output helpers across std, string, list, arg, git, and GitHub
    libraries against caller variable names that collide with helper internals.

  • Rejected readonly caller-owned output variables before helper side effects.

  • Aligned standards and stdlib documentation with the current sourceable
    library surface and standalone checkout path.

  • Added public associative-array assertions and moved arg_parse caller-owned
    map validation onto the public assertion API.

  • Added cleanup path unregister support and used it for eager temp cleanup.

  • Made gh_run report failed GitHub CLI commands even when callers enable
    set -e, and preserved argument boundaries in GitHub command failure logs.

  • Documented and tested str_split trailing-separator behavior.

  • Hardened GitHub helper pass-by-name outputs against internal variable
    shadowing, added a non-optional gh_infer_repo_from_origin error message,
    and deduplicated worktree parsing loops.

  • Kept gh_list_remote_branches from leaking its internal SHA loop variable
    into caller scope.

  • Routed gh_api_with_retry retry sleeps through the stdlib sleep helper so
    shell sleep aliases or functions cannot shadow retry delays.

  • Made arg_parse publish output arrays only after a parse succeeds, leaving
    caller-owned outputs unchanged on late parse failures.

  • Kept the warning-level ShellCheck profile clean for file section marker-count
    validation.

  • Reused shared marker validation inside update_file_section.

Removed

  • Removed the temporary generic gh_* branch, worktree, upstream, merge,
    default-branch, and remote helper names after Base migrated to git_*.

v1.2.0

Choose a tag to compare

@codeforester codeforester released this 05 Jul 03:33
41c3bba

Added

  • Added lib/bash/gh/lib_gh.sh with generic GitHub CLI availability, authentication diagnostics, failure reporting, and checked command execution helpers.

Fixed

  • Hardened std_run --timeout retry internals so timeout discovery is cached per call, fallback setup failures return a generic error, and fallback timer cleanup cannot remove the timeout marker before it is observed.
  • Clarified update_file_section logging when appending a new managed section.

Removed

  • Removed early compatibility aliases run, std_run_with_timeout, and str_in_array; use std_run, std_run --timeout, and list_contains instead.

v1.1.0

Choose a tag to compare

@codeforester codeforester released this 03 Jul 17:09
6ce8af0

Corrective 1.x release for the latest base-bash-libs code line. This release
supersedes the accidental v2.0.0 publication while preserving all launcher and
library changes.

Added

  • Added the base-bash launcher for standalone scripts that want the
    base-bash-libs stdlib preloaded from a shebang.
  • Added std_run --timeout, --max-attempts, and --retry-delay execution
    policy options for timeout-only, retry-only, and timeout-plus-retry command
    execution.

Changed

  • Changed string case and trim helpers to mutate named variables in place
    instead of requiring command substitution.
  • Added public assert_variable_name validation for helpers that accept Bash
    variable names.
  • Deprecated std_run_with_timeout in documentation for new code; it remains as
    a compatibility wrapper around std_run --timeout.
  • Changed cleanup path registration to require absolute paths so exit cleanup
    cannot drift after a script changes directory.
  • Changed the Bash timeout fallback to kill TERM-ignoring commands after a short
    grace period.
  • Changed list and string array helpers to require caller-declared indexed arrays
    instead of silently coercing scalar variables.

base-bash-libs v1.0.0

Choose a tag to compare

@codeforester codeforester released this 21 Jun 20:57
437575b

Added

  • Added lib/bash/str/lib_str.sh with string case, trim, predicate, split, join, and membership helpers.
  • Added a documented stdlib-loaded marker for companion-library dependency guards.
  • Added stdlib cleanup hook and cleanup path registration backed by a shared EXIT trap.
  • Added portable stdlib temporary file and directory helpers with default exit cleanup.
  • Added stdlib command path and function introspection helpers.
  • Added std_run_with_timeout for bounded command execution with macOS/Linux fallback behavior.

Fixed

  • Made the Tests workflow run on main pushes after the default-branch migration.

base-bash-libs v0.2.1

Choose a tag to compare

@codeforester codeforester released this 18 Jun 23:12
2f97fd5

Changed

  • Changed the project license from AGPL-3.0-or-later to Apache-2.0 for broader generic library adoption.
  • Refreshed the top-level README with version/license/install/release metadata and direct links to each library README.
  • Added NOTICE attribution for the Apache-2.0 distribution.
  • Added validation that keeps the README version strip aligned with the repo-root VERSION file.

Validation

  • ./tests/validate.sh
  • GitHub Actions Tests workflow
  • git diff --check

base-bash-libs v0.2.0

Choose a tag to compare

@codeforester codeforester released this 18 Jun 21:49
5191de7

Added

  • Added std_run as the preferred command-runner API while retaining run as a compatibility wrapper.
  • Added readonly BASE_BASH_LIBS_VERSION, sourced from the package VERSION file when lib_std.sh loads.
  • Added optional --fetch support to check_script_up_to_date.
  • Added Linux and supported-Bash GitHub Actions validation coverage.
  • Added PTY-backed coverage for wait_for_enter.
  • Added non-Homebrew installation documentation.

Changed

  • Preserved target file modes when update_file_section appends or replaces managed sections.
  • Hardened update_file_section marker ordering and edge-case behavior.
  • Validated variable-name arguments consistently across stdlib and git helpers.
  • Respected NO_COLOR and composed structured log records before one final stderr write.
  • Made safe_mkdir, git_get_current_branch, and git pull retry behavior more explicit.

Fixed

  • Failed cleanly when lib_std.sh is sourced by unsupported Bash versions.
  • Returned nonzero from set_log_level for invalid input without changing existing logger levels.
  • Added explicit dependency guards for companion libraries sourced without the stdlib.

base-bash-libs v0.1.0

Choose a tag to compare

@codeforester codeforester released this 17 Jun 19:14
e6e976c

Added

  • Initialized the repository with the Base-managed repo baseline.
  • Added the standalone Bash std, file, and git libraries copied from Base, including BATS coverage, ShellCheck validation, and a standalone usage example.