Skip to content

Releases: laat/readme-assert

v10.1.3

14 Apr 19:54
3c0b2fd

Choose a tag to compare

  • Move supportedArchitectures to pnpm-workspace.yaml (#146)
  • Update Claude Code skills with improved docs

v10.1.2

13 Apr 22:37
91b9a13

Choose a tag to compare

  • Fix bin entry being stripped during npm publish (removed ./ prefix)
  • Normalize repository URL

v10.1.1

13 Apr 22:32
ebdd46f

Choose a tag to compare

  • Convert source and tests to TypeScript (#145)
  • Add bin.js wrapper to fix pnpm install warnings
  • Add npm trusted publishers workflow for automated publishing

v10.1.0

13 Apr 16:11
1f4cb41

Choose a tag to compare

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.md covering all supported tools
  • Added docs/llms.txt for AI-friendly documentation
  • Added licence file

v10.0.0

13 Apr 15:31
31340d6

Choose a tag to compare

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()

v9.0.0

13 Apr 15:10
f827d90

Choose a tag to compare

Breaking changes

  • Dropped Node.js 20 support — now requires Node.js >=22.6.0
  • Removed oxc-transform dependency — TypeScript type stripping is now handled natively by Node.js via --input-type=module-typescript / commonjs-typescript

New

  • Added node-strip-types example showing --main pointing at a .ts entry point with no external TypeScript tooling
  • Documented TypeScript source usage with --main in CLI and import renaming docs

v8.1.0

13 Apr 14:31
1f948e5

Choose a tag to compare

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:group when an identifier is defined in another block
  • --import flag — support for --import to preload modules (e.g. happy-dom)
  • Happy-dom example added

Fixes

  • Fix type error in collectDefinedIdentifiers

v8.0.1

13 Apr 12:57
7aee504

Choose a tag to compare

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

12 Apr 18:30
5c13d89

Choose a tag to compare

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

v7.1.0

12 Apr 01:34
9488dbe

Choose a tag to compare

Features

  • Stream child stdout live so long-running blocks don't look stalled (#127). Each console.log now appears in your terminal as the block runs, instead of being buffered until it exits.
  • --auto mode detects -> and rejects (#122). Previously only =>, , and throws were picked up; now the auto-detect regex matches what commentToAssert actually understands.
  • /readme-test agent 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.json exports string + 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.log assertions (#121). The console.log(x) //=> value transform 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 --autop are now rejected with a friendly message and a --help hint, instead of being silently ignored.

Internal

  • Cleanups to examples and dead code, including a functional ts-node example that actually exercises the ts-node hook (#125).
  • Simplified the bails-when-no-tests-exists test shim and added direct coverage for the TypeScript path, the --require CJS downgrade, and unknown-flag rejection (#126).
  • Dropped stale v7 CI 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.