Skip to content

Releases: animir/node-rate-limiter-flexible

Redis custom Lua script support

28 Apr 13:44
Compare
Choose a tag to compare

👍

Prisma support

15 Feb 18:44
c795d68
Compare
Choose a tag to compare

What's Changed

  1. Add RateLimiterPrisma. Read about it on Wiki. Prisma supports PostgreSQL, MySQL, SQLite, MongoDB and many other databases. Thank you @animir

  2. Test environment and github actions got a number of improvements. Thank you @mroderick

  3. BREAKING CHANGES: we dropped support for Node.js 14 and all previous versions.

Full Changelog: v4.0.1...v5.0.0

Fix RateLimiterMongo TypeError

26 Jan 08:57
Compare
Choose a tag to compare

RateLimiterMongo TypeError: Cannot read properties of null (reading 'value') error was fixed. See #251 for reference.

Thanks to @o-ali

DynamoDB support

16 Dec 16:17
Compare
Choose a tag to compare

Thanks to @Daniel-97 rate-limiter-flexible supports DynamoDB now!
Usage example can be found here.

BREAKING CHANGES: we dropped support for Node.js 12 and previous versions.

🐯

Fix RateLimiterUnion.consume return type

08 Dec 19:54
Compare
Choose a tag to compare

Fix memory storage being not accurate with expired keys

08 Dec 18:54
Compare
Choose a tag to compare
  • fix memory storage consuming points when msBeforeNext is negative (key is expired). Thank you @animir

PostgreSQL quote table name and support for schema name option

20 Oct 08:39
Compare
Choose a tag to compare
  • use quotation for table name in RateLimiterPostgres queries. Thanks to @komachi
  • add optional schemaName to RateLimiterPostgres limiter. Thanks to @paulsc54
  • special thanks to @roggervalf who configured Github Actions for tests

🍯

Support of ioredis v4+ and redis v4+

29 Aug 10:41
Compare
Choose a tag to compare

I have really great news!
rate-limiter-flexible supports ioredis v4+ and redis v4+ now.
We have been waiting for this moment for years.

Thanks to @roggervalf. And one big thank you from me personally

Since this is major release, there are

BREAKING CHANGES:

  1. rate-limiter-flexible works with ioredis package of any version (tested versions 2, 3, 4 and 5) by default now.
  • If you want it to work with the redis package version 4 or later, you should set useRedisPackage flag.
  • If you created redis client with legacyMode: true, you should remove it.
  • If you use redis of version 3 or lower, you should stick to rate-limiter-flexible version 2. Or try the experimental useRedis3AndLowerPackage option.
  1. deprecated options started with lowercased inmemory prefix are removed. You can use inMemoryBlockOnConsumed and
    inMemoryBlockDuration instead.
  2. deprecated redis option for RateLimiterRedis was removed. (Most likely you never heard about it, since it was deprecated years ago). You should use storeClient option instead.

TS type for the new option rejectIfRedisNotReady

24 Oct 12:52
Compare
Choose a tag to compare

Thank you @dmozgovoi for the quick improvement.

Redis limiter new option `rejectIfRedisNotReady`

21 Oct 16:36
Compare
Choose a tag to compare

In some cases especially with insuranceLimiter set it is important to reject requests quickly based on Redis client status being not ready. Thanks @dmozgovoi