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

socketcluster-client

Package Overview
Dependencies
Maintainers
1
Versions
236
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

socketcluster-client - npm Package Compare versions

Comparing version 18.0.0 to 18.0.1

8

lib/clientsocket.js

@@ -157,4 +157,4 @@ const StreamDemux = require('stream-demux');

let protocolOptionError = new InvalidArgumentsError(
'The "protocol" option does not affect socketcluster-client - ' +
'If you want to utilize SSL/TLS, use "secure" option instead'
'The protocol option does not affect socketcluster-client - ' +
'If you want to utilize SSL/TLS, use the secure option instead'
);

@@ -656,3 +656,3 @@ this._onError(protocolOptionError);

delete eventObject.callback;
let errorMessage = `Event "${eventObject.event}" was aborted due to a bad connection`;
let errorMessage = `Event ${eventObject.event} was aborted due to a bad connection`;
let error = new BadConnectionError(errorMessage, failureType);

@@ -775,3 +775,3 @@

delete eventObject.callback;
let error = new TimeoutError(`Event response for "${eventObject.event}" timed out`);
let error = new TimeoutError(`Event response for ${eventObject.event} event timed out`);
callback.call(eventObject, error, eventObject);

@@ -778,0 +778,0 @@ }

@@ -21,3 +21,3 @@ const AGClientSocket = require('./clientsocket');

'The host option should include both' +
' the hostname and the port number in the format "hostname:port"'
' the hostname and the port number in the hostname:port format'
);

@@ -29,3 +29,3 @@ }

'The host option should already include' +
' the hostname and the port number in the format "hostname:port"' +
' the hostname and the port number in the hostname:port format' +
' - Because of this, you should never use host and hostname options together'

@@ -38,3 +38,3 @@ );

'The host option should already include' +
' the hostname and the port number in the format "hostname:port"' +
' the hostname and the port number in the hostname:port format' +
' - Because of this, you should never use host and port options together'

@@ -41,0 +41,0 @@ );

@@ -232,3 +232,3 @@ const AGRequest = require('ag-request');

let errorMessage = `Event "${eventObject.event}" was aborted due to a bad connection`;
let errorMessage = `Event ${eventObject.event} was aborted due to a bad connection`;
let badConnectionError = new BadConnectionError(errorMessage, failureType);

@@ -399,3 +399,3 @@

delete eventObject.callback;
let error = new TimeoutError(`Event response for "${eventObject.event}" timed out`);
let error = new TimeoutError(`Event response for ${eventObject.event} event timed out`);
callback.call(eventObject, error, eventObject);

@@ -402,0 +402,0 @@ }

{
"name": "socketcluster-client",
"description": "SocketCluster JavaScript client",
"version": "18.0.0",
"version": "18.0.1",
"homepage": "https://socketcluster.io/",

@@ -52,4 +52,4 @@ "contributors": [

"rollup": "^3.28.1",
"socketcluster-server": "^17.4.1"
"socketcluster-server": "^18.0.1"
}
}

@@ -943,3 +943,3 @@ const assert = require('assert');

describe('Order of events', function () {
describe('Events', function () {
it('Should trigger unsubscribe event on channel before disconnect event', async function () {

@@ -1227,2 +1227,19 @@ client = socketClusterClient.create(clientOptions);

});
it('Should support event listener timeout using once(timeout) method', async function () {
client = socketClusterClient.create(clientOptions);
let event;
let error;
try {
// Since the authStateChange event will not trigger, this should timeout.
event = await client.listener('authStateChange').once(100);
} catch (err) {
error = err;
}
assert.notEqual(error, null);
assert.equal(error.name, 'TimeoutError');
});
});

@@ -1229,0 +1246,0 @@

Sorry, the diff of this file is too big to display

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