Summary
Add a Base-native helper that lets downstream scripts require a minimum base-bash-libs version at runtime.
Rationale
The library already exposes BASE_BASH_LIBS_VERSION; consumers also need a small, documented way to fail clearly when a script depends on newer public APIs. This borrows the concept of explicit minimum-version checks from external Bash stdlib designs without copying their implementation.
Proposed Scope
- Add a public helper in
lib/bash/std/lib_std.sh, such as base_bash_libs_require_version <minimum_version>.
- Compare semantic-ish dotted versions without depending on external commands.
- Emit a clear fatal error when the loaded library is too old.
- Document the helper in the std README and top-level usage examples.
- Add focused BATS coverage for equal, newer, older, and invalid version inputs.
Acceptance Criteria
- Downstream scripts can check a minimum supported
base-bash-libs version after sourcing lib_std.sh.
- Invalid or unsupported version strings fail clearly.
./tests/validate.sh passes.
Notes
Concept source: comparison with srcshelton/stdlib.sh; write fresh Base-style code under this repo's standards.
Summary
Add a Base-native helper that lets downstream scripts require a minimum
base-bash-libsversion at runtime.Rationale
The library already exposes
BASE_BASH_LIBS_VERSION; consumers also need a small, documented way to fail clearly when a script depends on newer public APIs. This borrows the concept of explicit minimum-version checks from external Bash stdlib designs without copying their implementation.Proposed Scope
lib/bash/std/lib_std.sh, such asbase_bash_libs_require_version <minimum_version>.Acceptance Criteria
base-bash-libsversion after sourcinglib_std.sh../tests/validate.shpasses.Notes
Concept source: comparison with
srcshelton/stdlib.sh; write fresh Base-style code under this repo's standards.