Releases: laat/readme-assert
Releases · laat/readme-assert
v10.1.3
v10.1.2
v10.1.1
v10.1.0
New features
- Test descriptions from code block tags now appear in test output
should add numbers→✔ README.md:13 — add numbers (0.3ms)- Works with
test,should, and grouped variants
New examples and docs
- Added integration examples for tsx, SWC, esbuild, and nock
- Added
docs/integrations.mdcovering all supported tools - Added
docs/llms.txtfor AI-friendly documentation - Added licence file
v10.0.0
Breaking changes
- Assertion comments now generate type-aware assert calls instead of always using
deepEqual- Primitives (numbers, strings, booleans, null, undefined) use
assert.strictEqual() - Objects, arrays, and other complex expressions use
assert.deepStrictEqual()
- Primitives (numbers, strings, booleans, null, undefined) use
v9.0.0
Breaking changes
- Dropped Node.js 20 support — now requires Node.js >=22.6.0
- Removed
oxc-transformdependency — TypeScript type stripping is now handled natively by Node.js via--input-type=module-typescript/commonjs-typescript
New
- Added
node-strip-typesexample showing--mainpointing at a.tsentry point with no external TypeScript tooling - Documented TypeScript source usage with
--mainin CLI and import renaming docs
v8.1.0
What's new
- Merged test output — per-block test runner summaries are consolidated into a single summary via a custom
--test-reporter - Run all blocks — all units now run even when earlier ones fail
- ReferenceError hints — suggests
test:groupwhen an identifier is defined in another block --importflag — support for--importto preload modules (e.g. happy-dom)- Happy-dom example added
Fixes
- Fix type error in
collectDefinedIdentifiers
v8.0.1
What's Changed
- Rename docs index page to "Getting started"
- Bump the all-dependencies group with 4 updates (#141)
- Bump the all-actions group with 6 updates (#140)
- Add dependabot with grouped dependency updates
- Update author URL and add homepage
- Test own README as part of the test suite
Full Changelog: v8.0.0...v8.0.1
v8.0.0
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:testtest()block for better isolation and reporting (#138) - Support bare
// throwsand// rejectswith no matcher (#134) - Support
//=> rejects Error: messagesyntax for promise rejections - Support
//=> Error: messageand//=> Error: /regex/assertion syntax - Support
awaitexpressions in error and value assertions - Resolve subpath imports via
package.jsonexports map - Add
--automode and--allmode 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
stampLocinstead of sharing references (#135) - Short-circuit
doHoistAST 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-assertifyskill for converting READMEs into testable ones
v7.1.0
Features
- Stream child stdout live so long-running blocks don't look stalled (#127). Each
console.lognow appears in your terminal as the block runs, instead of being buffered until it exits. --automode detects->andrejects(#122). Previously only=>,→, andthrowswere picked up; now the auto-detect regex matches whatcommentToAssertactually understands./readme-testagent skill (#128). A portable skill file you can drop into~/.claude/skills/(or any compatible agent) — Claude runs readme-assert, reads the failing line, and proposes targeted fixes. See https://readme-assert.laat.dev/skill/ for the installable copy.
Fixes
package.jsonexportsstring + conditional forms (#120)."exports": "./lib/main.js"and"exports": { "import": "./esm.js", "require": "./cjs.js" }shapes are now resolved correctly when rewriting imports; previously they silently fell through to./index.js.- Line numbers preserved through
console.logassertions (#121). Theconsole.log(x) //=> valuetransform no longer inserts a newline that shifted later lines, so error reporting now points at the right line in the README. - Clean error when a README has no test blocks (#123). The CLI now prints
No test code blocks found in <path>and exits 1 instead of leaking a Node stack trace. - Strict CLI argument parsing (#126). Unknown flags like
--autopare now rejected with a friendly message and a--helphint, instead of being silently ignored.
Internal
- Cleanups to examples and dead code, including a functional
ts-nodeexample that actually exercises the ts-node hook (#125). - Simplified the
bails-when-no-tests-existstest shim and added direct coverage for the TypeScript path, the--requireCJS downgrade, and unknown-flag rejection (#126). - Dropped stale
v7CI trigger (#124).
Compatibility
No breaking changes. The strict CLI argument parsing is the only user-visible behaviour change — if you were passing a typo'd flag that was silently ignored before, you'll now see an error.