Skip to content

feat: add typed GCRA command support and functional tests#2094

Open
PavelPashov wants to merge 1 commit intoredis:mainfrom
PavelPashov:feat/add-gcra
Open

feat: add typed GCRA command support and functional tests#2094
PavelPashov wants to merge 1 commit intoredis:mainfrom
PavelPashov:feat/add-gcra

Conversation

@PavelPashov
Copy link
Copy Markdown
Contributor

@PavelPashov PavelPashov commented Apr 7, 2026

Note

Low Risk
Low risk: changes are limited to adding new TypeScript command typings, a small dependency bump, and test-suite updates gated by Redis server version.

Overview
Adds typed support for Redis GCRA rate-limiting command (including NUM_REQUESTS variant) to RedisCommander and bumps @ioredis/commands to 1.6.0.

Introduces a shared isRedisVersionLowerThan helper and updates functional tests to run conditionally based on server version (unskipping hgetdel/hgetex/hsetex/xdelex and enabling xtrim policy tests), plus new functional coverage for gcra.

Reviewed by Cursor Bugbot for commit 84eeed7. Bugbot is set up for automated code reviews on this repo. Configure here.

gcra(
key: RedisKey,
maxBurst: number | string,
requestsPerPeriod: number | string,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was renamed

requestsPerPeriod: number | string,
period: number | string,
countToken: "NUM_REQUESTS",
count: number | string,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was also renamed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants