github TypedDevs/bashunit 0.50.0

3 hours ago

✨ Improvements

  • -u as the short form of --snapshot-update, the spelling jest and vitest both use (#1293)

🛠️ Changes

  • --seed <n> now implies --random-order. Replaying a failure with the seed the header printed used to select nothing, so the run came back in defined order and green. An order named explicitly still wins, as in RSpec (#1287)
  • Performance: cold start is about 9ms faster, roughly 15%. The colour palette cost one subshell fork per colour, and every invocation paid it — --version included (#1285)
  • Performance: a --parallel run writing a report is about 1.9x faster and uses 1.8x less CPU. Each result row cost fourteen base64 forks per test, so --log-junit cost several times more than running the tests (#1289)

🐛 Bug Fixes

  • --output json and --output junit are no longer corrupted by console text on stdout, which left the document unparseable. Four sources: an empty --parallel selection (#1295), the blank line after a tear_down_after_script (#1297), the duplicate-function abort, and a --parallel worker's stderr replay (#1299)
  • --parallel reports no longer count a file-level hook failure twice. JSON, JUnit, HTML and Markdown listed it as two failed tests while the console summary of the same run said one (#1301)
  • bashunit bench exits non-zero when a benchmark file fails to source or its set_up_before_script fails. It printed the error and exited 0, so the failure never reached CI, and a syntax error silently dropped every bench_ function after it (#1303)
  • --output tap escapes # in a test description, as --report-tap already did. A failing test titled ... # SKIP ... reached the consumer as a skip and left CI silently (#1309)
  • bashunit watch no longer takes an option's value as the path it polls: watch --tag slow tests/ polled a directory named slow. Options may now appear in any position (#1291)
  • The JUnit report escapes the file path; a name holding ", & or < closed the attribute early and the document stopped parsing (#1313)
  • The Cobertura report escapes XML metacharacters in a path, so GitLab, Azure and Jenkins render coverage instead of silently showing nothing (#1311)
  • GitHub Actions annotations encode : and , in their property values; a comma in a test title ended the title there and invented a property (#1307)
  • A ``` fence in a failure message no longer truncates the --report-md summary, which is appended to `$GITHUB_STEP_SUMMARY` (#1305)

🔒 Security

  • A test file's path is no longer evaluated as shell. The per-test EXIT trap interpolated the path into the trap string, and a trap body is re-evaluated when it fires, so a filename holding a command substitution executed it — reachable by any run over a tree whose filenames someone else controls, which is what CI does with a checked-out branch. The same mangling meant such a file's assertions never ran and it was reported risky instead of failing (#1315)

🗑️ Removed

  • bashunit learn, the interactive tutorial. Nobody used it, and it was broken for most of the nine months it shipped without anyone reporting it. Learning bashunit belongs in the docs at https://bashunit.com, not in a subsystem inside the runner — which is also 6% of the distributable. Calling it now says it was removed and points there (#1256, #1258)

👥 Contributors

Checksum

SHA256: 1df4d6358292fa972e3870cc6ad5946c06b3fdf162aa796fa108dc1641465b14

Full Changelog: 0.49.0...0.50.0

Don't miss a new bashunit release

NewReleases is sending notifications on new releases.