wangyusheng1985 opened a new pull request, #4061:
URL: https://github.com/apache/iggy/pull/4061

   ## Why
   
   The public Node.js `Client` hid the `EventEmitter` owned by its command 
stream, so applications could not observe connection lifecycle events with the 
standard Node.js `on` and `once` APIs.
   
   ## What
   
   Expose typed, chainable `on` and `once` methods for `connecting`, 
`connected`, and `error`. Forward transport lifecycle events through the pooled 
raw client and announce every connection attempt while avoiding duplicate 
notifications for shared attempts. Preserve existing error handling when no 
user error listener is registered.
   
   Add focused coverage for initial connections, one-time listeners, transport 
errors, and retries on the same socket. Document event names, timing, and error 
behavior in the Node SDK README.
   
   Closes #2396
   
   ## Testing
   
   - `node --import @swc-node/register/esm-register --test 
--test-name-pattern='emits connecting when an attempt retries on the same 
socket' src/client/client.connection.test.ts`
   
   Validation observed for this change:
   - `cd /workspace/repository/foreign/node && node --import 
@swc-node/register/esm-register --test --test-name-pattern='emits connecting 
when an attempt retries on the same socket' 
src/client/client.connection.test.ts`
   - `npm --prefix /workspace/repository/foreign/node run lint && npm --prefix 
/workspace/repository/foreign/node run build`
   - `npm --prefix /workspace/repository/foreign/node run test:unit`
   
   Fixes #2396
   
   <!-- repo-agent-case:85f0b177-e874-449c-9bea-f0cb9f0e94a8 -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to