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

persistence

Package Overview
Dependencies
Maintainers
5
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

persistence - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

9

lib/persistence.js

@@ -234,4 +234,9 @@ var logging = require('minilog')('persistence'),

if (err) {
logging.error({ error: err.toString() });
if (/READONLY/.test(err.toString())) {
if (!(err instanceof Error)) {
err = new Error(err);
}
logging.error(err);
if (/READONLY/.test(String(err))) {
throw new Error(err);

@@ -238,0 +243,0 @@ }

{
"name": "persistence",
"version": "1.0.4",
"version": "1.0.5",
"description": "An abstraction library for redis and sentinel connection management",

@@ -21,2 +21,3 @@ "main": "lib/index.js",

"mocha": "*",
"proxyquire": "^1.7.3",
"simple_sentinel": "*"

@@ -23,0 +24,0 @@ },

@@ -81,5 +81,8 @@ var assert = require('assert'),

});
after(function() {
after(function(done) {
this.timeout(10000);
SentinelHelper.stop(helper_config);
setTimeout(function () {
done()
}, 200)
});

@@ -86,0 +89,0 @@

@@ -1,5 +0,6 @@

var assert = require('assert'),
SentinelHelper = require('simple_sentinel'),
Persistence = require('../lib/persistence.js'),
client;
var assert = require('assert');
var SentinelHelper = require('simple_sentinel');
var Persistence = require('../lib/persistence.js');
var client;
var proxyquire = require('proxyquire');

@@ -47,2 +48,18 @@ describe('given a connected persistence', function() {

});
it('should log an Error object', function () {
var logged
var spy = function () {
return {
error: function (x) {
logged = x
}
}
}
var Persistence = proxyquire('../lib/persistence', {'minilog': spy})
Persistence.handler('x');
assert(logged instanceof Error);
Persistence.handler(new Error('x'));
assert(logged instanceof Error);
})
});

@@ -49,0 +66,0 @@

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