Releases: jdevera/jdvlib.sh
Releases · jdevera/jdvlib.sh
Release list
v0.2.0
What's new
- macOS 15 & 16 support —
sys::macos_code_namenow recognises Sequoia and Tahoe - Portable architecture detection —
sys::get_archusesuname -minstead of Debian-onlydpkg - Unknown flag warnings —
ansi::stylenow warns on stderr instead of silently ignoring bad flags - Colour value validation —
ansi::stylevalidates--color=Nand--rgb=R,G,Binputs
Bug fixes
user::group_exists— removed straygetentcall that broke macOS supportfs::is_in_remote_mount— fixed broken regex ([cifs|nfs]→(cifs|nfs)) and escaped literal paths in grepenv::dotenv_delete— replacedsed -iwith portablegrep -v+mvpattern (fixes macOS)sys::run_as— shell-escape arguments withprintf %qto preserve boundaries insu -c; useid -uninstead of$USERfmt::bytes— handle zero (returns"0 B") and negative values (returns error); fix awk code injection via-vvariable passingtext::filter_inside_markers— preserve leading whitespace (IFS= read)text::apply_in_place— clean up temp file on filter failureuser::is_in_group— replacegroupswithid -nGandgrep \bwithgrep -qxFfor cross-platform supportpve::is_lxc— handle NUL-delimited/proc/1/environcorrectly withtrsys::is_in_path— usegrep -qxFfor literal matching (dots no longer match any character)code::is_sourced— compare withrealpathso symlinks work correctlyfunc::list_functions_in_file— fix wrong function name in error message
Security hardening
env::dotenv_load— replaced blindsourcewith a line-by-line parser that validates assignment patterns beforeeval, rejecting arbitrary commandsenv::dotenv_save— quote values withprintf %qto preserve special characters- Variable name validation —
dotenv_delete,dotenv_save, andensure_is_setnow reject invalid names, preventing regex injection - Literal marker matching — all
text.shmarker functions use exact string comparison instead of regex, preventing metacharacter injection - Nameref collision prevention — prefixed internal locals with
__jdvlib_inargs::get_flag_valueand allenv.shfunctions
Platform guards
user::add_to_groupsanduser::createnow fail explicitly on macOS viasys::ensure_linuxfs::is_in_remote_mountgated to Linux (usesmountpointwhich is Linux-only)meta::for_each_library_modulereturns an error in compiled mode
Infrastructure
- Double-source guard —
meta::importtracks imported modules to prevent infinite recursion from circular imports - Deleted deprecated
text::replace_between_markers_legacy(hardcoded tmpfile bug) - Added
bcto Docker test image - Parallel test execution support
Full Changelog: v0.1.0...v0.2.0
v0.1.0
Breaking Changes
- Replaced vendored 118-function ansi module with minimal 5-function implementation (
ansi::style,ansi::cursor,ansi::display,ansi::term,ansi::isSupported) - Removed deprecated
compatmodule and all legacy function wrappers
New Features
ansi::stylesupports FORCE_COLOR and NO_COLOR environment variablesfunc::exists— check if a function is definedfunc::call_first_matching,func::call_first_of— call first matching callable from a listsys::run_first_of— run first available command from a listsys::is_docker_running/sys::ensure_docker_runningsys::macos_version/sys::macos_code_nameadded to README
Improvements
code::script_dirhandles repeated BASH_SOURCE entries- Compiler uses pure text processing instead of source() overrides
- Removed
__jdvlib_compilingflag (no longer needed) - Auto-detect install destination in Makefile based on user
Infrastructure
- Pre-commit hooks: shellcheck, shdoc-ng, trailing whitespace, end-of-file, merge conflicts
- Pre-push hook runs tests
- Automated GitHub release workflow on version tags
- GitHub Actions checkout bumped to v6
Documentation
- All modules documented with shdoc-ng annotations
- Compiled bundle includes
@name/@sectionblocks for shdoc-ng generation - Module descriptions sourced from
@section(replacedjdvlib:docblocks)
Full Changelog: 0.0.6...v0.1.0
0.0.6
MacOS versions and bytes conversions
Full Changelog: 0.0.4...0.0.5