Releases: nats-io/nats.node
v1.4.8
- Fixed an issue where the inbound buffer was nullified whenever there was a disconnect or some sort of library initiated socket close. If the client code had a timer or interval that executed before the client started its reconnection sequence, the client code could get a null pointer exception. - See #336
v1.4.6
v1.4.2
- New option #309 added the
timeout
connection option, which allows the client to specify how long to wait from the initial TCP dial to the first PONG from the server. If the first PONG is not received within the specified time, the connection fails. - FIX #319 and #318 - Reworked
reconnectTimeWait
andmaxReconnects
to match other clients.maxReconnect
is now per server, andreconnectTimeWait
is based on server last connection. - FIX #321 on reconnect any
unsubscribe
requests are resent to the server. - FIX #323 - cleaned up pending buffer on disconnect. If the client disconnects from a connected session, pending messages are discarded as the buffer could contain partials. Also any pending flush callbacks will be called with a
DISCONNECT
error. After resetting the pending buffer, the client can subscribe and queue new messages, which will be delivered on the next reconnect. Intermediate failed dials do not reset the pending buffer or fail flush callbacks. - FIX #326 fixed subscription ids to start at 1
- Fixed an issue where if the client emitted an errror (when it failed to connect to a server), the TCP stream would be closed, but the client was not closed preventing the application from terminating.
- updated dependencies
v1.4.0
-
Added handling for TLS preflight OpenSSL checks, which are thrown instead of exposed as events. See #310. Thanks @labsvisual.
-
Fixed an issue where inbound message processing was aborted when a permissions error was encountered, but connection remained open. See #291.
-
Normalized official connection properties in tests and Readme.md. Added documentation on connection properties, and emitted events.
-
Fixed an issue affecting clients using JSON where if the payload was a number, the number would incorrectly be interpreted as a timeout parameter on request operations (#292)
-
Exposed missing connection options in typescript interface (#302)
-
Adopted standard-js for all nats-io javascript projects
-
Fixed samples to have copyright after the shebang
-
Added samples as commands, enabling use of via
npx node-[pub|sub|req|rep]
v1.3.0
v1.2.10
v1.2.8
Minor change for those that have been using typescript. This release normalized the overloads for publish and requestOne to match the parameter shifting that the library does. A recent change made some optional arguments required when they should have been optional.
FIX #261 TypeScript bindings (#262)
- removed a bad publish signature without a subject, but with callback
- clarified the publish with explicit arguments - really only optional argument given the three forms is the optional callback. Note the library does argument shifting so the exact forms are the expected.
- fixed requestOne signatures, to reflect that subject, timeout and callback are required.
v1.2.6
v1.2.4
Fixes related to timer leaks
- #255 - Fix ping timers when close was issued by the socket handler
- #256 - Fix request and subscription timers left active after a close.
Disconnect notification change
- Fix #257 - Disconnect notifications will only be fired for a connection that actually connected. Previously attempting but failing to connect resulted in a disconnect notification.
Minor enhancement
- Fix #242 better URL handling
Typescript definitions
- Fix #246 Typescript definitions were updated
ES6
- Library changed all
var
statements tolet
/const
, and also uses arrow functions, thus eliminating arcane practice ofvar that = this;
. This indirectly means that support for node 4.x is dropped (Node 4.x has been end-of-life for a year now).
Dependency updates
- Dependencies bumped to current versions
- Migrated from istanbul to nyc for coverage
- Included
package-lock.json
in the repository thus allowing for identical builds.
Better URL handling
v1.2.2 Fixes for url handling.