tsed icon indicating copy to clipboard operation
tsed copied to clipboard

Improve ioredis exports to optimize bundle size

Open Romakita opened this issue 11 months ago • 5 comments

Context

To reduce bundle size and improve modularity, the IORedisStore should no longer be exported from the main index.ts of @tsed/ioredis. Instead, it should be exposed via a dedicated export path: @tsed/ioredis/cache.

Objective

Update the exports field of the @tsed/ioredis module so that:

  • Consumers must import IORedisStore from @tsed/ioredis/cache instead of the package root.

Deliverables

Subtask 1: Prepare for Transition in Ts.ED v8

  • Expose IORedisStore through the new export path: @tsed/ioredis/cache (TypeScript & JS).
  • Deprecate the export from the main index.ts but keep it available for backward compatibility.
  • Add deprecation warnings and update documentation to inform users about the new import path.

Subtask 2: Breaking Change in Ts.ED v9

  • Remove IORedisStore export from the package root (index.ts).
  • Ensure IORedisStore is only accessible via @tsed/ioredis/cache.
  • Update documentation and migration guides to reflect the breaking change.

Acceptance Criteria

  • [x] IORedisStore is accessible via @tsed/ioredis/cache in v8 (with deprecation notice).
  • [x] IORedisStore is no longer accessible via the package root in v9.

Romakita avatar May 16 '25 07:05 Romakita

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 19 '25 01:07 stale[bot]

Last task is to update documentation and prepare v9 migration note

Romakita avatar Aug 05 '25 05:08 Romakita

Resolved by #3131

Romakita avatar Aug 05 '25 05:08 Romakita

FYI @Romakita . It seems like ioredis is deprecated now in favor of @redis/client

https://redis.io/docs/latest/develop/clients/nodejs/migration/

AlexDede avatar Aug 12 '25 06:08 AlexDede

Yes but in this case, I prefer de release a package @tsed/redis instead doing a migration ;)

Romakita avatar Aug 12 '25 14:08 Romakita