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

nodecaf-redis

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodecaf-redis - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

6

CHANGELOG.md

@@ -8,2 +8,7 @@ # Nodecaf Redis Changelog

## [v0.0.3] - 2021-07-14
### Fixed
- bug running `SUBSCRIBE` even when failed to connect
## [v0.0.2] - 2021-07-14

@@ -19,1 +24,2 @@

[v0.0.2]: https://gitlab.com/nodecaf/redis/-/tags/v0.0.2
[v0.0.3]: https://gitlab.com/nodecaf/redis/-/tags/v0.0.3

22

lib/main.js

@@ -6,11 +6,13 @@

return new Promise( (done, fail) => {
const end = () => fail(new Error('Redis connection aborted'));
client.once('error', fail);
const end = err => {
fail(err || new Error('Redis connection aborted'));
};
client.once('error', end);
client.once('end', end);
client.once('connect', () => {
client.off('error', fail);
client.once('ready', () => {
client.off('error', end);
client.off('end', end);
done();
});
})
});
}

@@ -21,11 +23,12 @@

let promises = [];
const promises = [];
conf['retry_strategy'] = () => new Error('Redis connection failed');
let client = redis.createClient(conf);
const client = redis.createClient(conf);
promises.push(initClient(client));
let subClient;
if(subChannel && onMessage){
var subClient = redis.createClient(conf);
subClient = redis.createClient(conf);
promises.push(initClient(subClient));

@@ -35,3 +38,2 @@

subClient.on('message', onMessage);
subClient.subscribe(subChannel);
}

@@ -46,3 +48,5 @@

subChannel && onMessage && subClient.subscribe(subChannel);
return client;
}
{
"name": "nodecaf-redis",
"version": "0.0.2",
"version": "0.0.3",
"description": "A conveninent interface around node redis to work within a nodecaf app.",

@@ -5,0 +5,0 @@ "main": "lib/main.js",

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