Releases: TypedDevs/bashunit
0.39.1
🐛 Bug Fixes
bashunit upgraderesolved the floatingv0Action tag as the latest version, breaking upgrades; it now only considers exact-version tags
👥 Contributors
Checksum
SHA256: 0cb0153ebcf7198371051332b8e8fce36c47b514eef9bb362148f404837c2e82
Full Changelog: 0.39.0...0.39.1
0.39.0
✨ Improvements
- GitHub Action
argsinput: when set, runsbashunit <args>after installing, so a workflow can install and run the suite in a single step - Floating major tag for the GitHub Action: the release process now force-moves
v0to each release, so workflows can pinTypedDevs/bashunit@v0to track the latest release within a major (#700) bashunit initnow scaffolds a.github/workflows/tests.ymlCI workflow using the official action (existing files are left untouched) (#702)--report-junit <file>flag as an alias of--log-junit, for naming parity with--report-html(#705)
🛠️ Changes
- The GitHub Action's
versioninput now defaults to the version pinned at the action ref instead oflatest, so pinning the action by SHA pins a visible bashunit version install.shnow verifies the release checksum by default (setBASHUNIT_VERIFY_CHECKSUM=falseto opt out); it soft-skips with a warning when a checksum asset is unavailable unless verification was explicitly requested (#703)--log-ghaannotations now include the failing test'sline(::error file=…,line=…), so they pin to the exact line in a pull request's "Files changed" tab (#704)
👥 Contributors
Checksum
SHA256: 37c228533b5e565147b4daaadfb2a1fe5227aa268de7dc41dd967fa85cab288f
Full Changelog: 0.38.0...0.39.0
0.38.0
✨ Improvements
- Official
TypedDevs/bashunitGitHub Action: composite install action, pinnable by commit SHA for immutable installs (version,directory,add-to-path,verify-checksuminputs;path,versionoutputs) (#695) install.shsha256 checksum verification viaBASHUNIT_VERIFY_CHECKSUM=true, validating the download against the releasechecksumasset (#695)
🐛 Bug Fixes
install.shfails loudly (non-zero exit, no stub binary) on a failed download and retries transient failures, instead of silently reporting success (#695)install.shcreates nested target directories (mkdir -p) (#695)
👥 Contributors
Checksum
SHA256: b1364d4874e61bc8cee4d9dea15844badebdbcc855d4d5b5439c9f4ae8b2204c
Full Changelog: 0.37.0...0.38.0
0.37.0
✨ Improvements
--profilereports the slowest tests (BASHUNIT_PROFILE_COUNT, default 10) (#678)- Readable snapshot diff when
gitis unavailable (#679) - Failure output shows the test
file:line(#680) .bashunitrcproject config file (#681)- Killed tests report the cause: timeout, SIGINT, SIGKILL/OOM, SIGTERM (#683)
🐛 Bug Fixes
--strictskips Bash 3.0's brokenpipefail(pipefailonly on Bash >= 3.1)bashunit watchforwards--filterand other flags correctly (#682)learnand coverage usemktemp -dfor temp directoriesparallel::cleanuprefuses torm -rfoutside*/bashunit/parallel/*
Internal
- Global-slot return pattern for hot-path helpers;
_BASHUNIT_SPY_*namespace (#674) - Windows acceptance CI: matrix shards now cover every test file (
bashunit_test.sh,coverage_*,install,mockwere silently skipped) and job labels show only the shard name
⚡ Performance
- Faster runtime-error detection: single
caseglob (#668) - Cache coverage-enabled flag in hot path (#664)
- Parallel runner uses
wait -non Bash 4.3+ instead of polling (#667) - Hot-path result helpers return via global slots, dropping a fork per call (#662)
- Drop
grep/random_strforks ingenerate_idandnormalize_variable_name(#663)
👥 Contributors
Checksum
SHA256: 18f1e8354213001b80e37c722b8520ebe26ce10fce11cb20ee471ddc96a21b11
Full Changelog: 0.36.0...0.37.0
0.36.0
🐛 Bug Fixes
bashunit upgradeexits non-zero with a clear error when the download fails (no more false success message)
✨ Improvements
--show-outputdisplays captured test output on assertion failures (#637)- npm registry distribution:
npm install -g bashunit(#244) bashunit::env::supports_colorandbashunit::io::clear_screenhelpers (#247)- LCOV reports now include
FN,FNDA,FNFandFNHfunction records, consumed bygenhtml, Codecov and Coveralls - LCOV reports now include
BRDA,BRFandBRHbranch records forif/elif/elsechains andcasepatterns (seeadrs/adr-007-branch-coverage-mvp.md) BASHUNIT_COVERAGE_SHOW_FUNCTIONS=trueadds a per-function coverage block to the text reportBASHUNIT_COVERAGE_SHOW_UNCOVERED=trueadds an "Uncovered Lines" block to the text report, with consecutive line numbers compressed into ranges
🛠️ Changes
- Docs moved into their own npm workspace under
docs/(usecd docs && npm ciormake docs/install) - Pre-commit hook skips the test suite when no shell files are staged
- ANSI escapes route through
_BASHUNIT_COLOR_*constants (#247)
⚡ Performance
- Faster coverage report generation: single-pass file scan, native bash regex, cached file stats (#636)
Internal
bashunit::runner::run_testsplit into nine named helpers (no behavior change)release.shhandlesdocs/package.jsonas a first-class release file- Structural test guards root
package.jsonagainst regaining dependencies or scripts
👥 Contributors
Checksum
SHA256: 29bffc3d492296c859640f7425a66f7ae0549e667e5265e3e84859a828edbf64
Full Changelog: 0.35.0...0.36.0
0.35.0
✨ Improvements
bashunit::spyaccepts an optional exit code or custom implementation function (#600)- Assert functions accept an optional trailing label to override the failure title (#77)
--fail-on-riskyflag andBASHUNIT_FAIL_ON_RISKYenv var treat no-assertion tests as failures (#115)--log-gha <file>flag andBASHUNIT_LOG_GHAenv var emit GitHub Actions workflow commands so failed, risky and incomplete tests show up as inline PR annotations (#280)assert_execaccepts--stdin,--stdout-contains,--stdout-not-contains,--stderr-containsand--stderr-not-containsflags to test interactive prompt commands and substring output (#301)
🛠️ Changes
- Parallel test execution is now enabled on Alpine Linux (#370)
🐛 Bug Fixes
- Dim/faint labels now render as gray (SGR 90) so keywords like
ExpectedandTests:stay colored in GitHub Actions logs (#323) - Syntax error in a test file now fails the suite instead of passing silently (#220)
--stop-on-failurenow stops on runtime errors such ascommand not foundorillegal option(#383)- Spying on
echoorprintfno longer hangs via infinite recursion (#607) - LCOV and HTML coverage reports no longer produce empty output under
set -e(#618) clock::nowhandlesEPOCHREALTIMEvalues that use a comma decimal separator- Invalid
.env.examplecoverage threshold entry; CI now copies.env.exampleto.envso config parse errors are caught - Coverage no longer counts case patterns with trailing comments (e.g.
*thing) # note) or loop terminators with redirections/pipes (e.g.done < file,done <<<"$var",done | sort) as executable lines (#634) assert_trueandassert_falsenow report empty strings as assertion failures instead of trying to execute them
👥 Contributors
Checksum
SHA256: bfe9f69bda77034234a38f26182cc34e1f7648d846dab57a513a14cf91977544
Full Changelog: 0.34.1...0.35.0
0.34.1
✨ Improvements
- Add risky test detection for tests with zero assertions (shown as warning, does not fail)
🐛 Bug Fixes
- Fix
sourceof non-existent file inset_up()silently passing all tests (#611) - Fix
set_uprunning before strict mode — unbound variables in hooks now detected with--strict - Fix
sourcefailure intear_down(),set_up_before_script(), andtear_down_after_script()silently passing - Add missing runtime error patterns: ambiguous redirect, integer expression expected, too many arguments, value too great, not a valid identifier, unexpected EOF
👥 Contributors
Checksum
SHA256: b620423b0fb201ff1c8d2c04735061cdea4237be84007348218a7e8d8522d8d0
Full Changelog: 0.34.0...0.34.1
0.34.0
✨ Improvements
- Add
--watchmode andwatch [path]subcommand to re-run tests on file changes- Uses
inotifywaiton Linux orfswatchon macOS; clear install hint if unavailable
- Uses
- Add
--jobs Nflag to limit parallel test concurrency - Add
--tagand--exclude-tagCLI flags for filtering tests by# @tagannotations - Add TAP version 13 output format via
--output tapfor CI/CD integration - Add source context display in failure summaries showing relevant assertion lines
- Add date comparison assertions:
assert_date_equals,assert_date_before,assert_date_after,assert_date_within_range,assert_date_within_delta- Auto-detects epoch seconds, ISO 8601, space-separated datetime, and timezone offsets
- Add
assert_have_been_called_nth_withfor verifying spy arguments on the Nth invocation - Add
assert_string_matches_formatandassert_string_not_matches_formatwith format placeholders (%d,%s,%f,%i,%x,%e,%%) - Add JSON assertions:
assert_json_key_exists,assert_json_contains,assert_json_equals(requiresjq) - Add duration assertions:
assert_duration,assert_duration_less_than,assert_duration_greater_than
🛠️ Changes
- Split Windows CI test jobs into parallel chunks to avoid timeouts
- Optimize clock: prioritize EPOCHREALTIME over subprocess-based fallbacks
- Cache function discovery to avoid duplicate pipeline per test file
- Reduce subshells in test execution hot path
- Batch coverage recording with in-memory buffering
- Cache
unameresult at source time to eliminate repeated subprocess forks - Replace
bcandawksubprocesses with native bash arithmetic in clock and duration formatting - Cache
base64 -wflag support at load time instead of detecting per test - Use direct variable access for assertion state instead of getter subshells in runner hot path
🐛 Bug Fixes
- Fix misleading error message for
assert_not_sameandassert_not_equalson failure (#604) - Mocking
mktempno longer breaks spy creation (#602) - JUnit XML report now conforms to the standard schema
- Remove non-standard attributes from
<testsuite>and<testcase> - Add
errors="0"attribute and<failure>/<skipped>child elements per spec skippedcount now includes both skipped and incomplete tests- Convert
timevalues from milliseconds to seconds (float) - Strip ANSI escape sequences and invalid XML control characters from failure messages
- Include actual failure messages in
<failure>body
- Remove non-standard attributes from
Tests
- Add unit tests for
env.sh,math.sh,colors.sh,test_title.sh,console_header.sh, anddoc.sh
👥 Contributors
Checksum
SHA256: dfb53a905b49fe791ac6b63b5cc2109287694346e4300b591ff11c0b08e7898f
Full Changelog: 0.33.0...0.34.0
0.33.0
🛠️ Changes
- Lower minimum Bash version requirement from 3.2 to 3.0
- Improve parallel test execution performance (30-40% faster on large test suites)
✨ Improvements
- Display test output (stdout/stderr) on failure for runtime errors
- Enabled by default; disable with
--no-output-on-failureorBASHUNIT_SHOW_OUTPUT_ON_FAILURE=false
- Enabled by default; disable with
- Add
--no-progressflag to suppress real-time progress display (Issue #503)- Also available via
BASHUNIT_NO_PROGRESS=trueenvironment variable
- Also available via
- Support
# bashunit: no-parallel-testsdirective to opt out of test-level parallelism
🐛 Bug Fixes
- Data providers now work without the
functionkeyword on test functions (Issue #586) - Install tests now pass in sandboxed/no-network environments (Issue #582)
- Parallel test execution now works correctly in strict mode (
bash -e -o pipefail)
👥 Contributors
Checksum
SHA256: e81c5c262d2e7296598b823c7d7fda1b54a818f5324cee1d65cc3b074a194ed0
Full Changelog: 0.32.0...0.33.0
0.32.0
🛠️ Changes
- Hook output now displays with right-aligned timing and bullet prefix (
● set_up_before_script 2.03s)
✨ Improvements
- Better code coverage HTML report
- Auto-discover coverage paths from test file names when
BASHUNIT_COVERAGE_PATHSis not settests/unit/assert_test.shautomatically trackssrc/assert.sh- Removes the need for manual
--coverage-pathsconfiguration in most cases
--coverage-report-htmlnow defaults tocoverage/htmlwhen no directory is specified
🐛 Bug Fixes
- Coverage now excludes control flow keywords (
then,else,fi,do,done,esac,;;, case patterns) from line tracking - Coverage HTML report now correctly handles namespaced functions with colons (e.g.,
bashunit::assert::equals) - Coverage data no longer lost when running
coverage_test.shalongside other tests
👥 Contributors
Checksum
SHA256: c0609ee93bc60c60e171cd7a95479f1e900df974f559e874acbbc3e7b925d6a9
Full Changelog: 0.31.0...0.32.0