Skip to content

Commit

Permalink
Replace haredis-tmp with tmp-redis
Browse files Browse the repository at this point in the history
  • Loading branch information
vweevers committed May 27, 2019
1 parent b35b56b commit 0daebd9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions third-party/ioredis.js
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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,
Expand Down

0 comments on commit 0daebd9

Please sign in to comment.