Skip to content

v8.0.0

Choose a tag to compare

@laat laat released this 12 Apr 18:30
· 49 commits to master since this release
5c13d89

Breaking

  • Replaced esbuild with oxc-transform for TypeScript type stripping. If you relied on esbuild as a transitive dependency, you'll need to install it separately.

Features

  • Wrap each code fence in a node:test test() block for better isolation and reporting (#138)
  • Support bare // throws and // rejects with no matcher (#134)
  • Support //=> rejects Error: message syntax for promise rejections
  • Support //=> Error: message and //=> Error: /regex/ assertion syntax
  • Support await expressions in error and value assertions
  • Resolve subpath imports via package.json exports map
  • Add --auto mode and --all mode for code block discovery
  • Pipe code via stdin instead of writing temp files
  • Handle spawn errors gracefully (#139)

Improvements

  • Consolidate all code transforms into a single AST-based pass using oxc-parser and esrap (#130)
  • Fix O(n²) line counting (#139)
  • Fix minor correctness issues in transform.js (#137)
  • Copy loc objects in stampLoc instead of sharing references (#135)
  • Short-circuit doHoist AST walk when both flags are set (#131)
  • Add JSDoc types, Prettier, and TypeScript checking (#133)
  • Set UTF-8 encoding on child process streams

Docs

  • Trimmed README to focus on key features, full docs at readme-assert.laat.dev
  • Added favicon
  • Added /readme-assertify skill for converting READMEs into testable ones