ioredis-mock

Emulates ioredis by performing all operations in-memory.

MIT License

Downloads
2.8M
Stars
326
Committers
91

Bot releases are hidden (Show)

ioredis-mock - v3.0.1

Published by stipsan about 7 years ago

  • Fixed: remove README and RunKit references to old import style
ioredis-mock - v3.0.0

Published by stipsan about 7 years ago

Breaking changes

Use module.exports to be in line with ioredis (#311 @rexxars)

ioredis uses commonjs exports, and now ioredis-mock does as well.

require('ioredis-mock').default no longer works, use require('ioredis-mock') instead.

Bug fixes

Error thrown in sismember() if key does not exist (#318 @theogravity)

ioredis-mock - v2.4.1

Published by stipsan about 7 years ago

  • Fixed: Allow ioredis 3 as peer dependency (#317 @aruberto)
ioredis-mock - v2.4.0

Published by stipsan over 7 years ago

Features

  • exec supports a callback argument. (#290)

Fixes

  • Don't modify objects passed to or returned from the internal datastore. (#281 @jeffkenney)
  • Fix hash get commands for missing hashes. (#284 @jeffkenney)
ioredis-mock - v2.3.0

Published by stipsan over 7 years ago

Added

  • Add event emitter inheritance. (#248 @xsellier)
  • Trigger connect & ready events on instantiation. (#280 @rexxars)

Changed

  • Prevent conversion of buffer arguments to strings. (#236 @dpikt)

Misc

  • updated all dependencies to latest stable versions (@greenkeeperio-bot)
ioredis-mock - v2.2.0

Published by stipsan almost 8 years ago

Added

  • buffer operation aliases. (#234 @dpikt)
  • yarn lockfile.

Changed

  • updated redis-commands dependency and updated the compat table with new commands.
ioredis-mock - v2.1.0

Published by stipsan about 8 years ago

Added

  • smove command. (#217)
  • sdiff command. (#216)
  • sunion command. (#215)
  • sinter command. (#214)

Changed

  • added compat table badge to readme. (#213)
ioredis-mock - v2.0.0

Published by stipsan about 8 years ago

Bumping the version to v2 as there are fixes in this release that are breaking changes.

Added

  • flushdb command.

Changed

  • Command arguments is now transformed to strings before being passed to the command itself helping the mock behave more like a real ioredis client.

Fixed

  • append updated to return an integer.
  • dbsize updated to return an integer.
  • decr updated to return an integer.
  • decrby updated to return an integer.
  • expire updated to return an integer.
  • expireat updated to return an integer.
  • hdel updated to return an integer.
  • hexists updated to return an integer.
  • hincrby updated to return an integer.
  • hlen updated to return an integer.
  • hset updated to return an integer.
  • hsetnx updated to return an integer.
  • hstrlen updated to return an integer.
  • incr updated to return an integer.
  • incrby updated to return an integer.
  • lpush updated to return an integer.
  • lpushx updated to return an integer.
  • mget required a single array argument, updated to use multiple arguments (single array support will be added later when ioredis Argument Transformers is properly implemented).
  • msetnx updated to return an integer.
  • persist updated to return an integer.
  • pexpire updated to return an integer.
  • pexpireat updated to return an integer.
  • pttl updated to return an integer.
  • renamenx updated to return an integer.
  • rpush updated to return an integer.
  • rpushx updated to return an integer.
  • scard updated to return an integer.
  • setnx updated to return an integer.
  • sismember updated to return an integer.
  • strlen updated to return an integer.
  • ttl updated to return an integer.

Deprecated

  • hmset no longer accepts passing an object with keys and values directly. This will be added later when ioredis Argument Transformers is properly implemented.
ioredis-mock - v1.15.0

Published by stipsan about 8 years ago

Added

  • type command (#207)

Fixed

  • sadd no longer allow duplicate values (#204 @kesla)
  • hset learned to create a new hash if not existing instead of throwing error (#207)
  • hset updated to return integer reply according to redis spec (#207)

Internal

  • set related commands (sadd, scard, etc) implemented using es6 Set instead of Array (#204 @kesla)
  • hset tests refactored (#207)
ioredis-mock - v1.14.0

Published by stipsan about 8 years ago

Features

  • added scard command (#201)
  • added discard command (#200)

Documentation

  • added CHANGELOG.md file
ioredis-mock - 1.11.0

Published by stipsan about 8 years ago

Features

  • added expire command (#155)
  • added ttl command (#157)

Documentation

  • cleaned up compat table (#158)

Tests

  • circleci now run parallel builds to distribute node v4 - v6 tests between containers, speeding things up a bit
ioredis-mock - v1.13.0

Published by stipsan about 8 years ago

Features

  • added mset command (#181)
  • added msetnx command (#182)
  • added dbsize command (#183)
  • added lpushx command (#184)
  • added incrbyfloat command (#185)
  • added rpushx command (#186)
  • added hincrbyfloat command (#187)
  • added lpop command (#189)
  • added rpop command (#190)
  • added lindex command (#191)
  • added srandmember command (#192)
  • added lset command (#193)
ioredis-mock - v1.12.0

Published by stipsan about 8 years ago

Features

  • added auth command (#160)
  • added bgrewriteaof command (#161)
  • added save command (#162)
  • added lastsave command (#163)
  • added bgsave command (#164)
  • added getrange command (#165)
  • added echo command (#166)
  • added randomkey command (#167)
  • added role command (#168)
  • added flushall command (#169)
  • added ping command (#170)
  • added persist command (#171)
  • added expireat command (#172)
  • added pttl command (#173)
  • added hkeys command (#174)
  • added setex command (#175)
  • added pexpireat command (#176)
  • added hlen command (#177)
  • added pexpire command (#178)
  • added psetex command (#179)
ioredis-mock - v1.10.0

Published by stipsan about 8 years ago

Features

  • added renamenx command (#152)
ioredis-mock - v1.9.0

Published by stipsan about 8 years ago

Features

  • added mget command (#134 @kesla)

Misc

  • updated all dependencies to latest versions (thanks, @greenkeeperio-bot!)
ioredis-mock - v1.8.0

Published by stipsan about 8 years ago

Features

  • added brpoplpush command (#106 @davemcorwin)
  • added llen command (#106 @davemcorwin)
  • added lpush command (#106 @davemcorwin)
  • added lrem command (#106 @davemcorwin)
  • added publish stub (#106 @davemcorwin)
  • added rpoplpush command (#106 @davemcorwin)
  • added rpush command (#106 @davemcorwin)

Fixes

  • hmset command supports objects (#106 @davemcorwin)
  • incr command sets default value '0' if not exists (#106 @davemcorwin)

Misc

  • updated all dependencies to latest versions (thanks, @greenkeeperio-bot!)
ioredis-mock - v1.7.0

Published by stipsan about 8 years ago

Features

  • added keys command (#92 @pivotal-csaa)

Misc

  • updated test and linting dependencies to latest versions (thanks, @greenkeeperio-bot!)
ioredis-mock - v1.6.0

Published by stipsan over 8 years ago

Features

  • added setnx command

Bugfixes

  • hsetnx would report '0' to signal the key was a no-op but in reality did change the existing value.
ioredis-mock - v1.5.0

Published by stipsan over 8 years ago

Features

  • added strlen command (#53)
  • added hdel command (#54)
  • added hexists command (#55)
  • added hincrby command (#56)
  • added hstrlen command (#57)

Documentation

  • Added a note about tonicdev to readme (#52)
ioredis-mock - v1.4.1

Published by stipsan over 8 years ago

Minor changes

  • updated istanbul devDependency