We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using @redis/client with legacy mode, I can no longer access the v4 promise API. Calling set or get function under v4 gives me callback functions.
` const client = createClient({ legacyMode: true });
client.on('error', err => console.log('Redis Client Error', err));
// @ts-ignore await client.connect();
await client.v4.set('key', 'value', () => { console.log('callback') }); const value = await client.v4.get('key'); console.log('test value', value); client.v4.get('key', (err, val) => { console.log('callback get', err, val); }
// @ts-ignore await client.disconnect();`
18.11
7.0.5
@redis/client 1.5.4
macOS
No response
The text was updated successfully, but these errors were encountered:
I'm actually not sure why the tests didn't catch this, checking now... Sorry about that.
Sorry, something went wrong.
The tests only tested .v4.sendCommand... 🤦♂️ Ok, I found the issue, working on a fix (+ I'll add a test to make sure it won't happen again) now
.v4.sendCommand
fix redis#2398 - fix v4 interface in legacyMode
v4
legacyMode
ca9a567
fix #2398 - fix v4 interface in legacyMode (#2402)
7cb467a
[email protected]/@redis/[email protected] is on npm 🎉
[email protected]
@redis/[email protected]
Successfully merging a pull request may close this issue.
Description
Using @redis/client with legacy mode, I can no longer access the v4 promise API.
Calling set or get function under v4 gives me callback functions.
` const client = createClient({ legacyMode: true });
client.on('error', err => console.log('Redis Client Error', err));
// @ts-ignore
await client.connect();
await client.v4.set('key', 'value', () => { console.log('callback') });
const value = await client.v4.get('key');
console.log('test value', value);
client.v4.get('key', (err, val) => { console.log('callback get', err, val); }
// @ts-ignore
await client.disconnect();`
Node.js Version
18.11
Redis Server Version
7.0.5
Node Redis Version
@redis/client 1.5.4
Platform
macOS
Logs
No response
The text was updated successfully, but these errors were encountered: