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