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

machinepack-redis

Package Overview
Dependencies
Maintainers
3
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

machinepack-redis - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

7

machines/cache-value.js

@@ -38,4 +38,7 @@ module.exports = {

extendedDescription: 'Must be JSON-serializable-- that is, a string, number, boolean, dictionary, array, or `null`. If a dictionary or array, must contain exclusively JSON-serializable contents.',
required: true,
example: '*'
type: 'json',
custom: (value)=>{
if (value === undefined) { throw new Error('Cannot cache `undefined`.'); }
return true;
},
},

@@ -42,0 +45,0 @@ //

{
"name": "machinepack-redis",
"version": "2.0.0",
"version": "2.0.1",
"description": "Structured Node.js bindings for Redis.",

@@ -5,0 +5,0 @@ "scripts": {

@@ -20,13 +20,13 @@ /**

var connection;
// The keys to use during tests. Prefixed with `machinepack-redis.` so that
// The keys to use during tests. Prefixed with `machinepack-redis.` so that
// there is no key name clash with any other possible existing keys
var keysUsed = [12345, 'machinepack-redis.test1', 'machinepack-redis.test2', 'machinepack-redis.test3', 'machinepack-redis.test4', 'machinepack-redis.test5', 'machinepack-redis.test6', 'machinepack-redis.test7', 'machinepack-redis.test8'];
// _ _
// | | (_)
// _ __ ___ ___ ___ _ __ _ __ ___ ___| |_ _ ___ _ __
//| '_ \ / _ \ / __/ _ \| '_ \| '_ \ / _ \/ __| __| |/ _ \| '_ \
// _ _
// | | (_)
// _ __ ___ ___ ___ _ __ _ __ ___ ___| |_ _ ___ _ __
//| '_ \ / _ \ / __/ _ \| '_ \| '_ \ / _ \/ __| __| |/ _ \| '_ \
//| | | | (_) | | (_| (_) | | | | | | | __/ (__| |_| | (_) | | | |
//|_| |_|\___/ \___\___/|_| |_|_| |_|\___|\___|\__|_|\___/|_| |_|
//
//
describe('with no connection', function (){

@@ -38,3 +38,3 @@ it('should fail', function (done){

value: 1
}).exec({
}).switch({
error: done,

@@ -70,3 +70,3 @@ badConnection: function (){

}
}).exec({
}).switch({
error: done,

@@ -78,3 +78,3 @@ success: function (report){

manager: manager
}).exec({
}).switch({
error: done,

@@ -198,3 +198,3 @@ success: function (report){

value: ''
}).exec({
}).switch({
error: function (err){

@@ -214,3 +214,3 @@ done();

value: ''
}).exec({
}).switch({
error: function (err){

@@ -234,3 +234,3 @@ done();

ttl: 1
}).exec({
}).switch({
error: function (err){

@@ -245,3 +245,3 @@ return done(new Error('Expecting `success` exit'));

key: keysUsed[1]
}).exec({
}).switch({
error: done,

@@ -260,3 +260,3 @@ badConnection: function (){

key: keysUsed[1]
}).exec({
}).switch({
error: done,

@@ -263,0 +263,0 @@ badConnection: function (){

@@ -37,3 +37,3 @@ /**

}
}).exec({
}).switch({
error: done,

@@ -46,3 +46,3 @@ success: function (report){

manager: manager
}).exec({
}).switch({
error: done,

@@ -88,3 +88,3 @@ success: function (report){

key: 'test1'
}).exec({
}).switch({
error: done,

@@ -119,3 +119,3 @@ notFound: function (){

key: 'test1'
}).exec({
}).switch({
error: done,

@@ -127,3 +127,3 @@ notFound: function (){

key: 'nonexistingkey'
}).exec({
}).switch({
error: done,

@@ -152,3 +152,3 @@ notFound: function (){

keys: 'somekeytodelete'
}).exec({
}).switch({
error: function (err){

@@ -171,3 +171,3 @@ return done();

keys: 1
}).exec({
}).switch({
error: function (err){

@@ -189,3 +189,3 @@ return done();

keys: {}
}).exec({
}).switch({
error: function (err){

@@ -192,0 +192,0 @@ return done();

@@ -36,3 +36,3 @@ /**

key: keysUsed[1]
}).exec({
}).switch({
error: done,

@@ -72,3 +72,3 @@ badConnection: function (){

}
}).exec({
}).switch({
error: done,

@@ -81,3 +81,3 @@ success: function (report){

manager: manager
}).exec({
}).switch({
error: done,

@@ -103,3 +103,3 @@ success: function (report){

value: 'whatever'
}).exec({
}).switch({
error: done,

@@ -120,3 +120,3 @@ success: function (){

key: keysUsed[1]
}).exec({
}).switch({
error: done,

@@ -139,3 +139,3 @@ notFound: function (){

ttl: 1
}).exec({
}).switch({
error: done,

@@ -148,3 +148,3 @@ success: function (){

key: keysUsed[0]
}).exec({
}).switch({
error: done,

@@ -151,0 +151,0 @@ notFound: function (){

@@ -24,3 +24,3 @@ /**

connectionString: 'redis://127.0.0.1:6379'
}).exec({
}).switch({
error: done,

@@ -32,3 +32,3 @@ success: function (result){

manager: manager
}).exec({
}).switch({
error: done,

@@ -52,3 +52,3 @@ success: function (){

}
}).exec({
}).switch({
error: done,

@@ -58,3 +58,3 @@ success: function (result){

manager: result.manager
}).exec({
}).switch({
error: done,

@@ -61,0 +61,0 @@ failed: function (){

@@ -28,3 +28,3 @@ /**

ttl: opts.ttl
}).exec({
}).switch({
error: done,

@@ -35,3 +35,3 @@ success: function (report){

key: opts.key
}).exec({
}).switch({
error: done,

@@ -38,0 +38,0 @@ success: function (report){

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