Skip to content

fix: expose stack modules on pool type#3267

Merged
nkaradzhov merged 1 commit into
redis:masterfrom
raashish1601:codex/3149-pool-default-modules
May 12, 2026
Merged

fix: expose stack modules on pool type#3267
nkaradzhov merged 1 commit into
redis:masterfrom
raashish1601:codex/3149-pool-default-modules

Conversation

@raashish1601
Copy link
Copy Markdown
Contributor

@raashish1601 raashish1601 commented May 12, 2026

Summary

createClientPool() from the redis package already injects the default Redis Stack modules, but the package only re-exported RedisClientPoolType from @redis/client, whose default module set is empty. That meant code annotating a pool as RedisClientPoolType lost the json and ft namespaces.

This adds a redis package-level RedisClientPoolType alias with the same default module set as RedisClientType and createClientPool().

Fixes #3149.

Validation

  • npm run build
  • npx tsc --noEmit --module NodeNext --moduleResolution NodeNext --target ES2022 --lib ES2023 --strict --skipLibCheck --esModuleInterop .tmp-pool-type-test.ts
  • npm run lint

Note

Low Risk
Low risk type-only change that adjusts exported typings for RedisClientPoolType to match actual module injection behavior; no runtime logic changes.

Overview
Aligns the redis package’s pool typings with createClientPool() behavior by adding a package-level RedisClientPoolType alias whose default generic module set includes the Redis Stack modules (e.g. json, ft, ts, Bloom).

This prevents type annotations using RedisClientPoolType from losing the Stack module namespaces compared to the existing RedisClientType/createClientPool() defaults.

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

@nkaradzhov
Copy link
Copy Markdown
Collaborator

Thanks @raashish1601, looking good!

@nkaradzhov nkaradzhov merged commit 31b5632 into redis:master May 12, 2026
17 of 18 checks passed
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.

json/search module not working in pool connection mode.

2 participants