Skip to content

handy-redis 2.0.0

Compare
Choose a tag to compare
@mmkal mmkal released this 12 Oct 22:03
· 92 commits to master since this release

npm package

Breaking changes:

  • command signatures updated, some are now more strict
  • anys have been replaced with unknowns
  • new commands added
  • execMulti is removed in favour of .multi().exec(), which is promisified
  • multi pipelines now keep track of types
  • .batch support added (fixes #45)
  • .script('LOAD') and other subcommands added (fixes #221)
  • addNodeRedisCommand exposed (fixes #176)
  • redis removed as a dependency. It must be added separately
  • deprecated functions/properties/interfaces (the old forms are preserved for backwards-compatibility, but update if possible):
    • clients should now be created with createNodeRedisClient rather than createHandyClient
    • WrappedNodeRedisClient is now preferred to IHandyRedis
    • client.nodeRedis preferred to client.redis
  • lots of internal tidyup of code-generation code

Basic usage is identical, aside from the recommended import name:

import { createNodeRedisClient } from 'handy-redis';

(async function() {
    const client = createNodeRedisClient();

    await client.set('foo', 'bar');
    const foo = await client.get('foo');
    console.log(foo); // 'bar'
})();

v1.8.3...v2.0.0