From 0daebd9b7298d3de37e3edf83bcfe034c03c028f Mon Sep 17 00:00:00 2001 From: Vincent Weevers Date: Mon, 27 May 2019 13:47:44 +0200 Subject: [PATCH] Replace haredis-tmp with tmp-redis --- package.json | 2 +- third-party/ioredis.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index eb022ee..81e19d0 100644 --- a/package.json +++ b/package.json @@ -25,12 +25,12 @@ "monotonic-timestamp": "0.0.9", "resolve": "~1.11.0", "subarg": "~1.0.0", + "tmp-redis": "~1.0.0", "uuid": "~3.3.2" }, "devDependencies": { "dependency-check": "^3.3.0", "hallmark": "^0.1.0", - "haredis-tmp": "github:vweevers/haredis-tmp#feat/windows-support", "level-community": "^3.0.0", "nyc": "^14.1.1", "standard": "^12.0.1", diff --git a/third-party/ioredis.js b/third-party/ioredis.js index b51171c..b5270e6 100644 --- a/third-party/ioredis.js +++ b/third-party/ioredis.js @@ -1,9 +1,9 @@ 'use strict' // Note: redis-server must be available in PATH -const tmpRedis = require('haredis-tmp') +const tmpRedis = require('tmp-redis') -module.exports = function inject (ioredis) { +module.exports = function inject (Redis) { return function (location, options, callback) { let redis let shutdown @@ -22,11 +22,11 @@ module.exports = function inject (ioredis) { open: function (options, callback) { wrapper.status = 'opening' - tmpRedis([port], { verbose: true }, function (err, path, shutdown_) { + tmpRedis(port, function (err, shutdown_) { if (err) return callback(err) shutdown = shutdown_ - redis = new ioredis({ + redis = new Redis({ port, retryStrategy: () => false, maxRetriesPerRequest: 0,