Skip to content
New issue

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

Node: fix xinfogroups; fix lrem #2324

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#### Changes
* Node: Fix binary variant for xinfogroups and lrem ([#2324](https://github.com/valkey-io/valkey-glide/pull/2324))
* 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))
* Java: Expanded tests for converting non UTF-8 bytes to Strings ([#2286](https://github.com/valkey-io/valkey-glide/pull/2286))
Expand Down
2 changes: 1 addition & 1 deletion node/src/BaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5523,7 +5523,7 @@ export class BaseClient {
* ```
*/
public async xinfoGroups(
key: string,
key: GlideString,
options?: DecoderOption,
): Promise<Record<string, GlideString | number | null>[]> {
return this.createWritePromise<
Expand Down
2 changes: 1 addition & 1 deletion node/src/Commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}

Expand Down
4 changes: 2 additions & 2 deletions node/src/Transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,7 @@ export class BaseTransaction<T extends BaseTransaction<T>> {
* 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));
}

Expand Down Expand Up @@ -2651,7 +2651,7 @@ export class BaseTransaction<T extends BaseTransaction<T>> {
* attributes of a consumer group for the stream at `key`.
* The response comes in format `GlideRecord<GlideString | number | null>[]`, see {@link GlideRecord}.
*/
public xinfoGroups(key: string): T {
public xinfoGroups(key: GlideString): T {
return this.addAndReturn(createXInfoGroups(key));
}

Expand Down
2 changes: 1 addition & 1 deletion node/tests/SharedTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
? [
{
Expand Down
Loading