diff --git a/CHANGELOG.md b/CHANGELOG.md index f8809ae7af..e5bf8a0405 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ #### Changes +* Node: Fix binary variant for xinfogroups and lrem ([#2324](https://github.com/valkey-io/valkey-glide/pull/2324)) * Node: Fixed missing exports ([#2301](https://github.com/valkey-io/valkey-glide/pull/2301)) * Node: Use `options` struct for all optional arguments ([#2287](https://github.com/valkey-io/valkey-glide/pull/2287)) * Node: Added `invokeScript` API with routing for cluster client ([#2284](https://github.com/valkey-io/valkey-glide/pull/2284)) diff --git a/node/src/BaseClient.ts b/node/src/BaseClient.ts index 1c31078305..2bfb9a3bbd 100644 --- a/node/src/BaseClient.ts +++ b/node/src/BaseClient.ts @@ -5523,7 +5523,7 @@ export class BaseClient { * ``` */ public async xinfoGroups( - key: string, + key: GlideString, options?: DecoderOption, ): Promise[]> { return this.createWritePromise< diff --git a/node/src/Commands.ts b/node/src/Commands.ts index fea676c01a..811504301c 100644 --- a/node/src/Commands.ts +++ b/node/src/Commands.ts @@ -2694,7 +2694,7 @@ export function createXInfoStream( } /** @internal */ -export function createXInfoGroups(key: string): command_request.Command { +export function createXInfoGroups(key: GlideString): command_request.Command { return createCommand(RequestType.XInfoGroups, [key]); } diff --git a/node/src/Transaction.ts b/node/src/Transaction.ts index 4a3fe802d4..485d7f06d0 100644 --- a/node/src/Transaction.ts +++ b/node/src/Transaction.ts @@ -1252,7 +1252,7 @@ export class BaseTransaction> { * Command Response - the number of the removed elements. * If `key` does not exist, 0 is returned. */ - public lrem(key: GlideString, count: number, element: string): T { + public lrem(key: GlideString, count: number, element: GlideString): T { return this.addAndReturn(createLRem(key, count, element)); } @@ -2651,7 +2651,7 @@ export class BaseTransaction> { * attributes of a consumer group for the stream at `key`. * The response comes in format `GlideRecord[]`, see {@link GlideRecord}. */ - public xinfoGroups(key: string): T { + public xinfoGroups(key: GlideString): T { return this.addAndReturn(createXInfoGroups(key)); } diff --git a/node/tests/SharedTests.ts b/node/tests/SharedTests.ts index 04f589c0ae..eea277241a 100644 --- a/node/tests/SharedTests.ts +++ b/node/tests/SharedTests.ts @@ -10752,7 +10752,7 @@ export function runBaseTests(config: { ).toEqual("OK"); // one empty group exists - expect(await client.xinfoGroups(key)).toEqual( + expect(await client.xinfoGroups(Buffer.from(key))).toEqual( cluster.checkIfServerVersionLessThan("7.0.0") ? [ {