From fda4165f14c0bb7d8100fba7862f31d76fc8deab Mon Sep 17 00:00:00 2001 From: Andrew Carbonetto Date: Wed, 18 Sep 2024 16:15:14 -0700 Subject: [PATCH] Node: fix xinfogroups; fix lrem Signed-off-by: Andrew Carbonetto --- node/src/BaseClient.ts | 2 +- node/src/Commands.ts | 2 +- node/src/Transaction.ts | 4 ++-- node/tests/SharedTests.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) 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 75d37cd316..e05b4b6c7a 100644 --- a/node/tests/SharedTests.ts +++ b/node/tests/SharedTests.ts @@ -10757,7 +10757,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") ? [ {