Skip to content

Releases: nats-io/nats.node

v1.4.8

25 Mar 15:35
Compare
Choose a tag to compare
  • 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

24 Mar 15:19
e35302e
Compare
Choose a tag to compare
  • Updated NUID dependency
  • Added a check on the inbound buffer to test if the buffer was null, in some cases this could evaluate and NPE. See #330
  • Updated dev dependencies

v1.4.2

26 Feb 14:40
Compare
Choose a tag to compare
  • 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 and maxReconnects to match other clients. maxReconnect is now per server, and reconnectTimeWait 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

28 Jan 13:40
d927004
Compare
Choose a tag to compare
  • 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

07 Jun 15:24
7ee8256
Compare
Choose a tag to compare
  • Adds support for draining connections and subscriptions

v1.2.10

10 Apr 23:16
e5f4558
Compare
Choose a tag to compare

FIX #263 Typescript definitions missing return type for requestOne

v1.2.8

08 Apr 22:53
85d5302
Compare
Choose a tag to compare

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

29 Mar 20:01
3d1b65b
Compare
Choose a tag to compare

Added noEcho connection property. Specifying this property with true on a server that supports the functionality, prevents a client from receiving messages it published.

v1.2.4

29 Mar 01:36
Compare
Choose a tag to compare

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 to let/const, and also uses arrow functions, thus eliminating arcane practice of var 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

14 Dec 04:29
Compare
Choose a tag to compare
v1.2.2

Fixes for url handling.