Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nats

Package Overview
Dependencies
Maintainers
3
Versions
195
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nats - npm Package Compare versions

Comparing version 0.8.10 to 1.0.0

6

index.d.ts

@@ -83,3 +83,7 @@ /*

json?: boolean,
preserveBuffers?: boolean
preserveBuffers?: boolean,
token?: string,
pingInterval?: number,
maxPingOut?: number,
useOldRequestStyle?: boolean
}

@@ -86,0 +90,0 @@

22

lib/nats.js

@@ -32,3 +32,3 @@ /*

*/
var VERSION = '0.8.10',
var VERSION = '1.0.0',

@@ -83,3 +83,3 @@ DEFAULT_PORT = 4222,

BAD_JSON = 'BAD_JSON',
BAD_JSON_MSG = 'Message should be a JSON object',
BAD_JSON_MSG = 'Message should be a non-circular JSON-serializable value',
BAD_MSG = 'BAD_MSG',

@@ -620,3 +620,3 @@ BAD_MSG_MSG = 'Message can\'t be a function',

this.stream.removeAllListeners();
this.stream.end();
this.stream.destroy();
}

@@ -674,3 +674,2 @@ // Create the stream

if (this.stream !== null) {
this.stream.end();
this.stream.destroy();

@@ -898,3 +897,2 @@ this.stream = null;

client.stream.removeAllListeners();
client.stream.end();
}

@@ -1176,5 +1174,10 @@ client.stream = tls.connect(tlsOpts, function() {

}
if (!msg) {
msg = EMPTY;
if (!this.options.json) {
msg = msg || EMPTY;
} else {
// undefined is not a valid JSON-serializable value, but null is
msg = msg === undefined ? null : msg;
}
if (!subject) {

@@ -1217,5 +1220,2 @@ if (opt_callback) {

if (this.options.json) {
if (typeof msg !== 'object') {
throw (new NatsError(BAD_JSON_MSG, BAD_JSON));
}
try {

@@ -1229,3 +1229,3 @@ str = JSON.stringify(msg);

} else {
var b = new Buffer(psub.length + msg.length + (2 * CR_LF_LEN) + msg.length.toString().length);
var b = Buffer.allocUnsafe(psub.length + msg.length + (2 * CR_LF_LEN) + msg.length.toString().length);
var len = b.write(psub + msg.length + CR_LF);

@@ -1232,0 +1232,0 @@ msg.copy(b, len);

{
"name": "nats",
"version": "0.8.10",
"version": "1.0.0",
"description": "Node.js client for NATS, a lightweight, high-performance cloud native messaging system",

@@ -41,6 +41,6 @@ "keywords": [

"engines": {
"node": ">= 0.10.x <10.0.0"
"node": ">= 4.5.0"
},
"dependencies": {
"nuid": "^0.6.14"
"nuid": "^1.0.0"
},

@@ -47,0 +47,0 @@ "devDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc