@clickhouse/client 1.20.0
Bug Fixes
- (Node.js only) Fixed a race condition in
ResultSet.json()andResultSet.stream()onJSONEachRow(and other streamable) result sets where callingjson()on a fast/small response could throwStream has been already consumedif the underlying stream ended between internalreadableEndedchecks. The consumption guard has been hardened: the stream is now shielded through a singleconsume()path that marks the result set as consumed in the appropriate branches, after format validation, so a successfuljson()call no longer races against the stream finishing. (#603) kudos to @lord007tn and @Onyx2406