Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Are ZDIFF and ZDIFFSTORE supported? #1575

Closed
clarkewd opened this issue Mar 7, 2021 · 2 comments
Closed

Are ZDIFF and ZDIFFSTORE supported? #1575

clarkewd opened this issue Mar 7, 2021 · 2 comments

Comments

@clarkewd
Copy link

clarkewd commented Mar 7, 2021

Issue

When I try and use zdiff I get the error client.zdiff is not a function

From the redis documentation page it mentions this command is Available since 6.2.0 and I'm using 6.2.1


Environment

  • Node.js Version: 14
  • Redis Version: 6.2.1
  • Platform: node:14 (docker image)

And from package.lock:

  "redis": {
    "version": "3.0.2",
    "resolved": "https://registry.npmjs.org/redis/-/redis-3.0.2.tgz",
    "integrity": "sha512-PNhLCrjU6vKVuMOyFu7oSP296mwBkcE6lrAjruBYG5LgdSqtRBoVQIylrMyVZD/lkF24RSNNatzvYag6HRBHjQ==",
    "requires": {
      "denque": "^1.4.1",
      "redis-commands": "^1.5.0",
      "redis-errors": "^1.2.0",
      "redis-parser": "^3.0.0"
    }
  },
  "redis-commands": {
    "version": "1.6.0",
    "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.6.0.tgz",
    "integrity": "sha512-2jnZ0IkjZxvguITjFTrGiLyzQZcTvaw8DAaCXxZq/dsHXz7KfMQ3OUJy7Tz9vnRtZRVz6VRCPDvruvU8Ts44wQ=="
  },
  "redis-errors": {
    "version": "1.2.0",
    "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz",
    "integrity": "sha1-62LSrbFeTq9GEMBK/hUpOEJQq60="
  },
  "redis-parser": {
    "version": "3.0.0",
    "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz",
    "integrity": "sha1-tm2CjNyv5rS4pCin3vTGvKwxyLQ=",
    "requires": {
      "redis-errors": "^1.0.0"
    }
  },
@leibale
Copy link
Collaborator

leibale commented Mar 7, 2021

We're currently working on adding the missing features from Redis 6 to the module, but It'll take some time.
In the mean time you can use client.sendCommand as an workaround:

client.sendCommand('ZDIFF', ['a', 'b', 'c'], (err, result) => {
  // ...
});

@clarkewd
Copy link
Author

clarkewd commented Mar 7, 2021

Thank you!

@clarkewd clarkewd closed this as completed Mar 7, 2021
leibale added a commit that referenced this issue Mar 8, 2021
leibale added a commit that referenced this issue Mar 8, 2021
* upgrade workflow actions

* fix setup-node version

* change redis-64 version to 3.0.503

* fix "no password is set" for redis6,
fix tests to work with redis6,
add redis6 to workflows

* do not use assert.match (was added only at v13.6.0 & v12.16.0)

* fix errors.subscribeUnsubscribeOnly regex

* fix invaliodPassword typo

* send --save "" to redis-server in tests

* upgrade dependencies, set node minimum version to 10, use current LTS versions in tests and benchmark workflows

* change windows tests too

* revert mocha back to ^4.1.0

* fix for f552850 - revert mocha back to ^4.1.0

* fix some tests and upgrade mocha

* fix two more tests

* try to fix tests in windows

* upgrade denque and redis-commands
ref #1575

* replace `new Buffer` (deprecated) with `Buffer.from`

* Buffer.from(0) should be Buffer.alloc(0)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants