Skip to content

v2.4.0

Choose a tag to compare

@bpacholek bpacholek released this 14 Jun 13:41
· 409 commits to main since this release

Minor release: a protocol-parser leniency feature, three robustness bugfixes, and a documentation/CI push that makes every README example a runnable, CI-verified script.

Added

  • [feature] The protocol parser now recognizes operation verbs case-insensitively and accepts any whitespace (space or tab) between a verb and its arguments, aligning with the NATS wire spec. Real servers always send upper-case verbs, so this only adds leniency; argument/payload bytes are preserved verbatim. Resolves the long-standing README TODO (now removed).

Fixed

  • [bugfix] JetStream createStream() no longer rejects an empty subjects list when a non-empty sources configuration is provided — a pure aggregate/sourcing stream legitimately has no subjects of its own (the client previously only exempted mirror).
  • [bugfix] A malformed async INFO frame can no longer throw out of the core processIncoming() read loop; the runtime INFO decode is contained (the bad update is skipped and surfaced via the error listener) so MSG frames parsed from the same chunk are still delivered. Handshake INFO is still validated strictly.
  • [bugfix] WebSocket transport: the frame decoder no longer re-slices the entire remaining receive buffer once per frame — a read carrying many coalesced frames is decoded in O(total bytes) instead of O(frames × bytes).

Docs & CI

  • Added an examples/ directory with one runnable, self-contained script per README example (42 files); every script now opens with a file-level intro docblock, and every README example heading links to its matching script ("Runnable example" pointer).
  • scripts/run-examples.sh runs them all against dockerized NATS and reports pass/skip/fail; CI now runs every example as a required, all-must-pass gate (a dedicated examples job, with EXAMPLES_STRICT=1 treating a skipped example as a failure). All 42 examples pass against the full stack.
  • Added TESTS.md — a catalogue of every unit, integration, and Behat test with a one-line description.

Full changelog: CHANGELOG.md · compare v2.3.0...v2.4.0.