animir/node-rate-limiter-flexible (rate-limiter-flexible)
### [`v5.0.3`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v5.0.3): Redis custom Lua script support
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/f672a5bed3e7f1f26bb4bfb678463b51ff688d63...v5.0.3)
- RateLimiterRedis supports for `customIncrTtlLuaScript` option now. You can set custom Lua script as a string. It will be executed instead of built-in Lua script that is called on every `upsert`. See this [rejected when consume more than maximum points and multiply delay](https://togithub.com/animir/node-rate-limiter-flexible/blob/master/test/RateLimiterRedis.ioredis.test.js#L62) test for example. Thanks to [@roggervalf](https://togithub.com/roggervalf)
- Readme language fixes. Thanks to [@DePasqualeOrg](https://togithub.com/DePasqualeOrg)
👍
### [`v5.0.2`](https://togithub.com/animir/node-rate-limiter-flexible/compare/694b687678e603911cdf6040f4c15a639500f794...f672a5bed3e7f1f26bb4bfb678463b51ff688d63)
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/694b687678e603911cdf6040f4c15a639500f794...f672a5bed3e7f1f26bb4bfb678463b51ff688d63)
### [`v5.0.1`](https://togithub.com/animir/node-rate-limiter-flexible/compare/v5.0.0...694b687678e603911cdf6040f4c15a639500f794)
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v5.0.0...694b687678e603911cdf6040f4c15a639500f794)
### [`v5.0.0`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v5.0.0): Prisma support
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v4.0.1...v5.0.0)
#### What's Changed
1. Add `RateLimiterPrisma`. Read about it on [Wiki](https://togithub.com/animir/node-rate-limiter-flexible/wiki/Prisma). Prisma supports [PostgreSQL](https://www.prisma.io/docs/orm/overview/databases/postgresql), [MySQL](https://www.prisma.io/docs/orm/overview/databases/mysql), [SQLite](https://www.prisma.io/docs/orm/overview/databases/sqlite), [MongoDB](https://www.prisma.io/docs/orm/overview/databases/mongodb) and many other databases. Thank you [@animir](https://togithub.com/animir)
2. Test environment and github actions got a number of improvements. Thank you [@mroderick](https://togithub.com/mroderick)
3. BREAKING CHANGES: we dropped support for `Node.js 14` and all previous versions.
**Full Changelog**: https://github.com/animir/node-rate-limiter-flexible/compare/v4.0.1...v5.0.0
### [`v4.0.1`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v4.0.1): Fix RateLimiterMongo TypeError
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v4.0.0...v4.0.1)
`RateLimiterMongo TypeError: Cannot read properties of null (reading 'value')` error was fixed. See [https://github.com/animir/node-rate-limiter-flexible/issues/251](https://togithub.com/animir/node-rate-limiter-flexible/issues/251) for reference.
Thanks to [@o-ali](https://togithub.com/o-ali)
### [`v4.0.0`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v4.0.0): DynamoDB support
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v3.0.6...v4.0.0)
Thanks to [@Daniel-97](https://togithub.com/Daniel-97) `rate-limiter-flexible` supports DynamoDB now!
Usage example can be found [here](https://togithub.com/animir/node-rate-limiter-flexible/wiki/DynamoDB).
BREAKING CHANGES: we dropped support for Node.js 12 and previous versions.
:tiger:
### [`v3.0.6`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v3.0.6): Fix RateLimiterUnion.consume return type
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v3.0.5...v3.0.6)
- RateLimiterUnion.consume return type fixed. Thanks to [@Omers-Frontegg](https://togithub.com/Omers-Frontegg)
### [`v3.0.5`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v3.0.5): Fix memory storage being not accurate with expired keys
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/564cfd79039cac9fe7f567793ed52213fddae9c4...v3.0.5)
- fix memory storage consuming points when msBeforeNext is negative (key is expired). Thank you [@animir](https://togithub.com/animir)
### [`v3.0.4`](https://togithub.com/animir/node-rate-limiter-flexible/compare/41f495989246582650d9cce738343e1fba00e860...564cfd79039cac9fe7f567793ed52213fddae9c4)
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/41f495989246582650d9cce738343e1fba00e860...564cfd79039cac9fe7f567793ed52213fddae9c4)
### [`v3.0.3`](https://togithub.com/animir/node-rate-limiter-flexible/compare/v3.0.2...41f495989246582650d9cce738343e1fba00e860)
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v3.0.2...41f495989246582650d9cce738343e1fba00e860)
### [`v3.0.2`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v3.0.2): PostgreSQL quote table name and support for schema name option
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/846b5a28987f28e0e13b5ec7965def4aa39a22ab...v3.0.2)
- use quotation for table name in RateLimiterPostgres queries. Thanks to [@komachi](https://togithub.com/komachi)
- add optional `schemaName` to RateLimiterPostgres limiter. Thanks to [@paulsc54](https://togithub.com/paulsc54)
- special thanks to [@roggervalf](https://togithub.com/roggervalf) who configured Github Actions for tests
:honey_pot:
### [`v3.0.1`](https://togithub.com/animir/node-rate-limiter-flexible/compare/v3.0.0...846b5a28987f28e0e13b5ec7965def4aa39a22ab)
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v3.0.0...846b5a28987f28e0e13b5ec7965def4aa39a22ab)
### [`v3.0.0`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v3.0.0): Support of ioredis v4+ and redis v4+
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/e4e3a442cf18a01f85bbefe4a062ed13c4639d74...v3.0.0)
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](https://togithub.com/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](https://togithub.com/animir/node-rate-limiter-flexible/wiki/Options#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](https://togithub.com/animir/node-rate-limiter-flexible/wiki/Options#useredis3andlowerpackage) option.
2. deprecated options started with lowercased `inmemory` prefix are removed. You can use [inMemoryBlockOnConsumed](https://togithub.com/animir/node-rate-limiter-flexible/wiki/Options#inmemoryblockonconsumed) and
[inMemoryBlockDuration](https://togithub.com/animir/node-rate-limiter-flexible/wiki/Options#inmemoryblockduration) instead.
3. 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.
### [`v2.4.2`](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.4.1...e4e3a442cf18a01f85bbefe4a062ed13c4639d74)
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.4.1...e4e3a442cf18a01f85bbefe4a062ed13c4639d74)
### [`v2.4.1`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v2.4.1): TS type for the new option rejectIfRedisNotReady
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.4.0...v2.4.1)
Thank you [@dmozgovoi](https://togithub.com/dmozgovoi) for the quick improvement.
### [`v2.4.0`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v2.4.0): Redis limiter new option `rejectIfRedisNotReady`
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.3.12...v2.4.0)
In some cases especially with [insuranceLimiter](https://togithub.com/animir/node-rate-limiter-flexible/wiki/Options#insurancelimiter) set it is important to reject requests quickly based on Redis client status being not `ready`. Thanks [@dmozgovoi](https://togithub.com/dmozgovoi)
### [`v2.3.12`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v2.3.12): RateLimiterUnion works with one limiter
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.3.11...v2.3.12)
Thank you [@svsool](https://togithub.com/svsool)
### [`v2.3.11`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v2.3.11): Fixes and improvements made since v2.3.4 release
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/37d9aa88ae436b9565aa344f6964062d19dd799c...v2.3.11)
- RateLimiterQueue `getTokensRemaining` with RateLimiterPostgres fixed. [https://github.com/animir/node-rate-limiter-flexible/issues/125](https://togithub.com/animir/node-rate-limiter-flexible/issues/125)
- clear timeout on key delete from memory storage. [https://github.com/animir/node-rate-limiter-flexible/pull/146](https://togithub.com/animir/node-rate-limiter-flexible/pull/146) Thank you [@jiddmeye](https://togithub.com/jiddmeye)
- `clearExpiredByTimeout` is added to TS types for MySQL and Postgres limiters. [https://github.com/animir/node-rate-limiter-flexible/issues/156](https://togithub.com/animir/node-rate-limiter-flexible/issues/156)
- fix negative remaining points in memory limiter. [https://github.com/animir/node-rate-limiter-flexible/issues/172](https://togithub.com/animir/node-rate-limiter-flexible/issues/172) Thank you [@MiniKraken-Team](https://togithub.com/MiniKraken-Team)
- added `browser` package.json settings to allow bundling. https://github.com/animir/node-rate-limiter-flexible/commit/6ce34b394a2b82e36ab959eb884e475b5dad5fcc Thank you [@achingbrain](https://togithub.com/achingbrain)
- use `nodejs.util.inspect.custom` for Symbol flexibility. https://github.com/animir/node-rate-limiter-flexible/commit/2c8bedb973c3931a068ba23b5207763ecc26f988 Thank you [@shlavik](https://togithub.com/shlavik)
- `inmemoryBlockOnConsumed` and `inmemoryBlockDuration` options are renamed to `inMemoryBlockOnConsumed` and `inMemoryBlockDuration`. Old options are still supported, but deprecated and will be removed in v3 major release. [https://github.com/animir/node-rate-limiter-flexible/issues/106](https://togithub.com/animir/node-rate-limiter-flexible/issues/106)
### [`v2.3.10`](https://togithub.com/animir/node-rate-limiter-flexible/compare/a1a80064822874e509b94731567aac2c265e0057...37d9aa88ae436b9565aa344f6964062d19dd799c)
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/a1a80064822874e509b94731567aac2c265e0057...37d9aa88ae436b9565aa344f6964062d19dd799c)
### [`v2.3.9`](https://togithub.com/animir/node-rate-limiter-flexible/compare/9b4414efdb3df669d422de5032ff86b76616e52e...a1a80064822874e509b94731567aac2c265e0057)
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/9b4414efdb3df669d422de5032ff86b76616e52e...a1a80064822874e509b94731567aac2c265e0057)
### [`v2.3.8`](https://togithub.com/animir/node-rate-limiter-flexible/compare/a072c192f8dd3bdb6ab009cac54e2b5b27c50457...9b4414efdb3df669d422de5032ff86b76616e52e)
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/a072c192f8dd3bdb6ab009cac54e2b5b27c50457...9b4414efdb3df669d422de5032ff86b76616e52e)
### [`v2.3.7`](https://togithub.com/animir/node-rate-limiter-flexible/compare/d1ed7f1d3c936e5c480b8555d371a57ac89d5404...a072c192f8dd3bdb6ab009cac54e2b5b27c50457)
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/d1ed7f1d3c936e5c480b8555d371a57ac89d5404...a072c192f8dd3bdb6ab009cac54e2b5b27c50457)
### [`v2.3.6`](https://togithub.com/animir/node-rate-limiter-flexible/compare/58f046c69dc04839723b746bea7327658b9f10be...d1ed7f1d3c936e5c480b8555d371a57ac89d5404)
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/58f046c69dc04839723b746bea7327658b9f10be...d1ed7f1d3c936e5c480b8555d371a57ac89d5404)
### [`v2.3.5`](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.3.4...58f046c69dc04839723b746bea7327658b9f10be)
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.3.4...58f046c69dc04839723b746bea7327658b9f10be)
### [`v2.3.4`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v2.3.4): MongoDB version detection fixes and misc
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/f3f237b321cbbab0833e0615f7762feb281e1da5...v2.3.4)
- MongoDB version detection is fixed for `mongoose` client. Thank you [@adrianvlupu](https://togithub.com/adrianvlupu)
- MongoDB version detection is fixed for 3.6.7+. Thank you [@pavittarx](https://togithub.com/pavittarx)
- Internal fix of `get` method. It incorrectly processed `undefined` result from a store. Thank you [@animir](https://togithub.com/animir)
- `.editorconfig` added. Thank you [@vinibeloni](https://togithub.com/vinibeloni)
- TypeScript type for `RateLimiterQueueError` added. Thank you [@adilhafeez](https://togithub.com/adilhafeez)
- TypeScript type for `deleteInMemoryBlockedAll` method is added. Thank you [@animir](https://togithub.com/animir)
### [`v2.3.3`](https://togithub.com/animir/node-rate-limiter-flexible/compare/cf5875362387e48d6c8153e3c282563a0a23bfdc...f3f237b321cbbab0833e0615f7762feb281e1da5)
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/cf5875362387e48d6c8153e3c282563a0a23bfdc...f3f237b321cbbab0833e0615f7762feb281e1da5)
### [`v2.3.2`](https://togithub.com/animir/node-rate-limiter-flexible/compare/ba2876f4f5a65fe8f3cebdafc3ae0e90db557774...cf5875362387e48d6c8153e3c282563a0a23bfdc)
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/ba2876f4f5a65fe8f3cebdafc3ae0e90db557774...cf5875362387e48d6c8153e3c282563a0a23bfdc)
### [`v2.3.1`](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.3.0...ba2876f4f5a65fe8f3cebdafc3ae0e90db557774)
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.3.0...ba2876f4f5a65fe8f3cebdafc3ae0e90db557774)
### [`v2.3.0`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v2.3.0): MongoDB client v4 fix, delete and new method to delete all inMemory Blocked keys
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/fcb6da92a57a039b644d715e6a8fb1a51b24415e...v2.3.0)
- replace `replaceOne` with `findOneAndUpdate` to fix a bug related to absent `ops` attribute in MongoDB client v4+. Thank you [@vdiez](https://togithub.com/vdiez)
- `delete` method on any store limiter deletes inMemoryBlocked key if it is there. Thank you [@evan361425](https://togithub.com/evan361425)
- new `deleteInMemoryBlockedAll` method added to clean up all blocked keys at once. Thank you [@evan361425](https://togithub.com/evan361425) again :-)
- [@evan361425](https://togithub.com/evan361425) also added tests to cover new lines 🥇
### [`v2.2.4`](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.2.3...fcb6da92a57a039b644d715e6a8fb1a51b24415e)
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.2.3...fcb6da92a57a039b644d715e6a8fb1a51b24415e)
### [`v2.2.3`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v2.2.3): Support for mongodb client v4
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/5df3115478afab20eb3cc22d875157c8d0467326...v2.2.3)
- Missing get/set Typescript types added and documentation improved. Thanks [@rijkvanzanten](https://togithub.com/rijkvanzanten)
- mongodb client v4 support. Thank you [@backflip](https://togithub.com/backflip)
### [`v2.2.2`](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.2.1...5df3115478afab20eb3cc22d875157c8d0467326)
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.2.1...5df3115478afab20eb3cc22d875157c8d0467326)
### [`v2.2.1`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v2.2.1): PostgreSQL limiter supports TypeORM + fixes
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/9a51140554941e8509d0b2d223a26a2741a8a0a9...v2.2.1)
- TypeORM Support for RateLimitPostgres, thank you [@seromenho](https://togithub.com/seromenho)
- Readme links fixed, thanks [@mriedem](https://togithub.com/mriedem)
- RateLimiterQueue TS types fixed
- Fix postgres consumed points increment on block, issue [https://github.com/animir/node-rate-limiter-flexible/issues/95](https://togithub.com/animir/node-rate-limiter-flexible/issues/95)
### [`v2.1.16`](https://togithub.com/animir/node-rate-limiter-flexible/compare/7562419b0b1e509c9c24cf03eb1eaa1243f7b0fc...9a51140554941e8509d0b2d223a26a2741a8a0a9)
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/7562419b0b1e509c9c24cf03eb1eaa1243f7b0fc...9a51140554941e8509d0b2d223a26a2741a8a0a9)
### [`v2.1.15`](https://togithub.com/animir/node-rate-limiter-flexible/compare/89e09e04974330a651ce45997c0c985cede4a14f...7562419b0b1e509c9c24cf03eb1eaa1243f7b0fc)
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/89e09e04974330a651ce45997c0c985cede4a14f...7562419b0b1e509c9c24cf03eb1eaa1243f7b0fc)
### [`v2.1.14`](https://togithub.com/animir/node-rate-limiter-flexible/compare/06b3d07478dee9c608c5aa687e64a1eea673f332...89e09e04974330a651ce45997c0c985cede4a14f)
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/06b3d07478dee9c608c5aa687e64a1eea673f332...89e09e04974330a651ce45997c0c985cede4a14f)
### [`v2.1.13`](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.1.10...06b3d07478dee9c608c5aa687e64a1eea673f332)
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.1.10...06b3d07478dee9c608c5aa687e64a1eea673f332)
### [`v2.1.10`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v2.1.10): BurstyRateLimiter and RateLimiterQueue improved + RateLimiterMemory works in browser
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/7e730f1fb7a361d005584701d66d9706182d9876...v2.1.10)
- RateLimiterQueue support of tokens removed by key. (single bucket for every key)
- Add RateLimiterQueue missing methods types. Thank you [@bmenant](https://togithub.com/bmenant)
- RateLimiterPostgres fixed for node-postgres@8.0.0 update. Thank you [@matomesc](https://togithub.com/matomesc)
- [tableCreated](https://togithub.com/animir/node-rate-limiter-flexible/wiki/Options#tablecreated) option for MySQL and PostgreSQL to skip checks for limiter tables.
- BurstyRateLimiter compatible with RateLimiterQueue now. Thanks a lot to [@matomesc](https://togithub.com/matomesc) for a big help on this.
- RateLimiterMemory limiter works in browser now. Thanks a bunch to [@cha0s](https://togithub.com/cha0s). Also, thank you for test scripts improvements.
### [`v2.1.9`](https://togithub.com/animir/node-rate-limiter-flexible/compare/5d367ddd50f3f27c0a3d2fccba57faad3a6b074a...7e730f1fb7a361d005584701d66d9706182d9876)
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/5d367ddd50f3f27c0a3d2fccba57faad3a6b074a...7e730f1fb7a361d005584701d66d9706182d9876)
### [`v2.1.7`](https://togithub.com/animir/node-rate-limiter-flexible/compare/c7bc579a71b41111498671b7fc3561a31d1d2930...5d367ddd50f3f27c0a3d2fccba57faad3a6b074a)
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/c7bc579a71b41111498671b7fc3561a31d1d2930...5d367ddd50f3f27c0a3d2fccba57faad3a6b074a)
### [`v2.1.6`](https://togithub.com/animir/node-rate-limiter-flexible/compare/a2d00ab0c6393f9e8289f75cc8a68855e7f0ba58...c7bc579a71b41111498671b7fc3561a31d1d2930)
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/a2d00ab0c6393f9e8289f75cc8a68855e7f0ba58...c7bc579a71b41111498671b7fc3561a31d1d2930)
### [`v2.1.5`](https://togithub.com/animir/node-rate-limiter-flexible/compare/46647d36765b9485d6e4bface6d9c43a3c33dd26...a2d00ab0c6393f9e8289f75cc8a68855e7f0ba58)
[Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/46647d36765b9485d6e4bface6d9c43a3c33dd26...a2d00ab0c6393f9e8289f75cc8a68855e7f0ba58)
Configuration
📅 Schedule: Branch creation - "after 11am before 3pm on saturday" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, check this box
This PR contains the following updates:
^2.0.0 \|\| ^3.0.0 \|\| ^4.0.0
->^2.0.0 \|\| ^3.0.0 \|\| ^4.0.0 \|\| ^5.0.0
Release Notes
animir/node-rate-limiter-flexible (rate-limiter-flexible)
### [`v5.0.3`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v5.0.3): Redis custom Lua script support [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/f672a5bed3e7f1f26bb4bfb678463b51ff688d63...v5.0.3) - RateLimiterRedis supports for `customIncrTtlLuaScript` option now. You can set custom Lua script as a string. It will be executed instead of built-in Lua script that is called on every `upsert`. See this [rejected when consume more than maximum points and multiply delay](https://togithub.com/animir/node-rate-limiter-flexible/blob/master/test/RateLimiterRedis.ioredis.test.js#L62) test for example. Thanks to [@roggervalf](https://togithub.com/roggervalf) - Readme language fixes. Thanks to [@DePasqualeOrg](https://togithub.com/DePasqualeOrg) 👍 ### [`v5.0.2`](https://togithub.com/animir/node-rate-limiter-flexible/compare/694b687678e603911cdf6040f4c15a639500f794...f672a5bed3e7f1f26bb4bfb678463b51ff688d63) [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/694b687678e603911cdf6040f4c15a639500f794...f672a5bed3e7f1f26bb4bfb678463b51ff688d63) ### [`v5.0.1`](https://togithub.com/animir/node-rate-limiter-flexible/compare/v5.0.0...694b687678e603911cdf6040f4c15a639500f794) [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v5.0.0...694b687678e603911cdf6040f4c15a639500f794) ### [`v5.0.0`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v5.0.0): Prisma support [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v4.0.1...v5.0.0) #### What's Changed 1. Add `RateLimiterPrisma`. Read about it on [Wiki](https://togithub.com/animir/node-rate-limiter-flexible/wiki/Prisma). Prisma supports [PostgreSQL](https://www.prisma.io/docs/orm/overview/databases/postgresql), [MySQL](https://www.prisma.io/docs/orm/overview/databases/mysql), [SQLite](https://www.prisma.io/docs/orm/overview/databases/sqlite), [MongoDB](https://www.prisma.io/docs/orm/overview/databases/mongodb) and many other databases. Thank you [@animir](https://togithub.com/animir) 2. Test environment and github actions got a number of improvements. Thank you [@mroderick](https://togithub.com/mroderick) 3. BREAKING CHANGES: we dropped support for `Node.js 14` and all previous versions. **Full Changelog**: https://github.com/animir/node-rate-limiter-flexible/compare/v4.0.1...v5.0.0 ### [`v4.0.1`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v4.0.1): Fix RateLimiterMongo TypeError [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v4.0.0...v4.0.1) `RateLimiterMongo TypeError: Cannot read properties of null (reading 'value')` error was fixed. See [https://github.com/animir/node-rate-limiter-flexible/issues/251](https://togithub.com/animir/node-rate-limiter-flexible/issues/251) for reference. Thanks to [@o-ali](https://togithub.com/o-ali) ### [`v4.0.0`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v4.0.0): DynamoDB support [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v3.0.6...v4.0.0) Thanks to [@Daniel-97](https://togithub.com/Daniel-97) `rate-limiter-flexible` supports DynamoDB now! Usage example can be found [here](https://togithub.com/animir/node-rate-limiter-flexible/wiki/DynamoDB). BREAKING CHANGES: we dropped support for Node.js 12 and previous versions. :tiger: ### [`v3.0.6`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v3.0.6): Fix RateLimiterUnion.consume return type [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v3.0.5...v3.0.6) - RateLimiterUnion.consume return type fixed. Thanks to [@Omers-Frontegg](https://togithub.com/Omers-Frontegg) ### [`v3.0.5`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v3.0.5): Fix memory storage being not accurate with expired keys [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/564cfd79039cac9fe7f567793ed52213fddae9c4...v3.0.5) - fix memory storage consuming points when msBeforeNext is negative (key is expired). Thank you [@animir](https://togithub.com/animir) ### [`v3.0.4`](https://togithub.com/animir/node-rate-limiter-flexible/compare/41f495989246582650d9cce738343e1fba00e860...564cfd79039cac9fe7f567793ed52213fddae9c4) [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/41f495989246582650d9cce738343e1fba00e860...564cfd79039cac9fe7f567793ed52213fddae9c4) ### [`v3.0.3`](https://togithub.com/animir/node-rate-limiter-flexible/compare/v3.0.2...41f495989246582650d9cce738343e1fba00e860) [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v3.0.2...41f495989246582650d9cce738343e1fba00e860) ### [`v3.0.2`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v3.0.2): PostgreSQL quote table name and support for schema name option [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/846b5a28987f28e0e13b5ec7965def4aa39a22ab...v3.0.2) - use quotation for table name in RateLimiterPostgres queries. Thanks to [@komachi](https://togithub.com/komachi) - add optional `schemaName` to RateLimiterPostgres limiter. Thanks to [@paulsc54](https://togithub.com/paulsc54) - special thanks to [@roggervalf](https://togithub.com/roggervalf) who configured Github Actions for tests :honey_pot: ### [`v3.0.1`](https://togithub.com/animir/node-rate-limiter-flexible/compare/v3.0.0...846b5a28987f28e0e13b5ec7965def4aa39a22ab) [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v3.0.0...846b5a28987f28e0e13b5ec7965def4aa39a22ab) ### [`v3.0.0`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v3.0.0): Support of ioredis v4+ and redis v4+ [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/e4e3a442cf18a01f85bbefe4a062ed13c4639d74...v3.0.0) 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](https://togithub.com/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](https://togithub.com/animir/node-rate-limiter-flexible/wiki/Options#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](https://togithub.com/animir/node-rate-limiter-flexible/wiki/Options#useredis3andlowerpackage) option. 2. deprecated options started with lowercased `inmemory` prefix are removed. You can use [inMemoryBlockOnConsumed](https://togithub.com/animir/node-rate-limiter-flexible/wiki/Options#inmemoryblockonconsumed) and [inMemoryBlockDuration](https://togithub.com/animir/node-rate-limiter-flexible/wiki/Options#inmemoryblockduration) instead. 3. 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. ### [`v2.4.2`](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.4.1...e4e3a442cf18a01f85bbefe4a062ed13c4639d74) [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.4.1...e4e3a442cf18a01f85bbefe4a062ed13c4639d74) ### [`v2.4.1`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v2.4.1): TS type for the new option rejectIfRedisNotReady [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.4.0...v2.4.1) Thank you [@dmozgovoi](https://togithub.com/dmozgovoi) for the quick improvement. ### [`v2.4.0`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v2.4.0): Redis limiter new option `rejectIfRedisNotReady` [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.3.12...v2.4.0) In some cases especially with [insuranceLimiter](https://togithub.com/animir/node-rate-limiter-flexible/wiki/Options#insurancelimiter) set it is important to reject requests quickly based on Redis client status being not `ready`. Thanks [@dmozgovoi](https://togithub.com/dmozgovoi) ### [`v2.3.12`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v2.3.12): RateLimiterUnion works with one limiter [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.3.11...v2.3.12) Thank you [@svsool](https://togithub.com/svsool) ### [`v2.3.11`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v2.3.11): Fixes and improvements made since v2.3.4 release [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/37d9aa88ae436b9565aa344f6964062d19dd799c...v2.3.11) - RateLimiterQueue `getTokensRemaining` with RateLimiterPostgres fixed. [https://github.com/animir/node-rate-limiter-flexible/issues/125](https://togithub.com/animir/node-rate-limiter-flexible/issues/125) - clear timeout on key delete from memory storage. [https://github.com/animir/node-rate-limiter-flexible/pull/146](https://togithub.com/animir/node-rate-limiter-flexible/pull/146) Thank you [@jiddmeye](https://togithub.com/jiddmeye) - `clearExpiredByTimeout` is added to TS types for MySQL and Postgres limiters. [https://github.com/animir/node-rate-limiter-flexible/issues/156](https://togithub.com/animir/node-rate-limiter-flexible/issues/156) - fix negative remaining points in memory limiter. [https://github.com/animir/node-rate-limiter-flexible/issues/172](https://togithub.com/animir/node-rate-limiter-flexible/issues/172) Thank you [@MiniKraken-Team](https://togithub.com/MiniKraken-Team) - added `browser` package.json settings to allow bundling. https://github.com/animir/node-rate-limiter-flexible/commit/6ce34b394a2b82e36ab959eb884e475b5dad5fcc Thank you [@achingbrain](https://togithub.com/achingbrain) - use `nodejs.util.inspect.custom` for Symbol flexibility. https://github.com/animir/node-rate-limiter-flexible/commit/2c8bedb973c3931a068ba23b5207763ecc26f988 Thank you [@shlavik](https://togithub.com/shlavik) - `inmemoryBlockOnConsumed` and `inmemoryBlockDuration` options are renamed to `inMemoryBlockOnConsumed` and `inMemoryBlockDuration`. Old options are still supported, but deprecated and will be removed in v3 major release. [https://github.com/animir/node-rate-limiter-flexible/issues/106](https://togithub.com/animir/node-rate-limiter-flexible/issues/106) ### [`v2.3.10`](https://togithub.com/animir/node-rate-limiter-flexible/compare/a1a80064822874e509b94731567aac2c265e0057...37d9aa88ae436b9565aa344f6964062d19dd799c) [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/a1a80064822874e509b94731567aac2c265e0057...37d9aa88ae436b9565aa344f6964062d19dd799c) ### [`v2.3.9`](https://togithub.com/animir/node-rate-limiter-flexible/compare/9b4414efdb3df669d422de5032ff86b76616e52e...a1a80064822874e509b94731567aac2c265e0057) [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/9b4414efdb3df669d422de5032ff86b76616e52e...a1a80064822874e509b94731567aac2c265e0057) ### [`v2.3.8`](https://togithub.com/animir/node-rate-limiter-flexible/compare/a072c192f8dd3bdb6ab009cac54e2b5b27c50457...9b4414efdb3df669d422de5032ff86b76616e52e) [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/a072c192f8dd3bdb6ab009cac54e2b5b27c50457...9b4414efdb3df669d422de5032ff86b76616e52e) ### [`v2.3.7`](https://togithub.com/animir/node-rate-limiter-flexible/compare/d1ed7f1d3c936e5c480b8555d371a57ac89d5404...a072c192f8dd3bdb6ab009cac54e2b5b27c50457) [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/d1ed7f1d3c936e5c480b8555d371a57ac89d5404...a072c192f8dd3bdb6ab009cac54e2b5b27c50457) ### [`v2.3.6`](https://togithub.com/animir/node-rate-limiter-flexible/compare/58f046c69dc04839723b746bea7327658b9f10be...d1ed7f1d3c936e5c480b8555d371a57ac89d5404) [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/58f046c69dc04839723b746bea7327658b9f10be...d1ed7f1d3c936e5c480b8555d371a57ac89d5404) ### [`v2.3.5`](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.3.4...58f046c69dc04839723b746bea7327658b9f10be) [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.3.4...58f046c69dc04839723b746bea7327658b9f10be) ### [`v2.3.4`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v2.3.4): MongoDB version detection fixes and misc [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/f3f237b321cbbab0833e0615f7762feb281e1da5...v2.3.4) - MongoDB version detection is fixed for `mongoose` client. Thank you [@adrianvlupu](https://togithub.com/adrianvlupu) - MongoDB version detection is fixed for 3.6.7+. Thank you [@pavittarx](https://togithub.com/pavittarx) - Internal fix of `get` method. It incorrectly processed `undefined` result from a store. Thank you [@animir](https://togithub.com/animir) - `.editorconfig` added. Thank you [@vinibeloni](https://togithub.com/vinibeloni) - TypeScript type for `RateLimiterQueueError` added. Thank you [@adilhafeez](https://togithub.com/adilhafeez) - TypeScript type for `deleteInMemoryBlockedAll` method is added. Thank you [@animir](https://togithub.com/animir) ### [`v2.3.3`](https://togithub.com/animir/node-rate-limiter-flexible/compare/cf5875362387e48d6c8153e3c282563a0a23bfdc...f3f237b321cbbab0833e0615f7762feb281e1da5) [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/cf5875362387e48d6c8153e3c282563a0a23bfdc...f3f237b321cbbab0833e0615f7762feb281e1da5) ### [`v2.3.2`](https://togithub.com/animir/node-rate-limiter-flexible/compare/ba2876f4f5a65fe8f3cebdafc3ae0e90db557774...cf5875362387e48d6c8153e3c282563a0a23bfdc) [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/ba2876f4f5a65fe8f3cebdafc3ae0e90db557774...cf5875362387e48d6c8153e3c282563a0a23bfdc) ### [`v2.3.1`](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.3.0...ba2876f4f5a65fe8f3cebdafc3ae0e90db557774) [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.3.0...ba2876f4f5a65fe8f3cebdafc3ae0e90db557774) ### [`v2.3.0`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v2.3.0): MongoDB client v4 fix, delete and new method to delete all inMemory Blocked keys [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/fcb6da92a57a039b644d715e6a8fb1a51b24415e...v2.3.0) - replace `replaceOne` with `findOneAndUpdate` to fix a bug related to absent `ops` attribute in MongoDB client v4+. Thank you [@vdiez](https://togithub.com/vdiez) - `delete` method on any store limiter deletes inMemoryBlocked key if it is there. Thank you [@evan361425](https://togithub.com/evan361425) - new `deleteInMemoryBlockedAll` method added to clean up all blocked keys at once. Thank you [@evan361425](https://togithub.com/evan361425) again :-) - [@evan361425](https://togithub.com/evan361425) also added tests to cover new lines 🥇 ### [`v2.2.4`](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.2.3...fcb6da92a57a039b644d715e6a8fb1a51b24415e) [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.2.3...fcb6da92a57a039b644d715e6a8fb1a51b24415e) ### [`v2.2.3`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v2.2.3): Support for mongodb client v4 [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/5df3115478afab20eb3cc22d875157c8d0467326...v2.2.3) - Missing get/set Typescript types added and documentation improved. Thanks [@rijkvanzanten](https://togithub.com/rijkvanzanten) - mongodb client v4 support. Thank you [@backflip](https://togithub.com/backflip) ### [`v2.2.2`](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.2.1...5df3115478afab20eb3cc22d875157c8d0467326) [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.2.1...5df3115478afab20eb3cc22d875157c8d0467326) ### [`v2.2.1`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v2.2.1): PostgreSQL limiter supports TypeORM + fixes [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/9a51140554941e8509d0b2d223a26a2741a8a0a9...v2.2.1) - TypeORM Support for RateLimitPostgres, thank you [@seromenho](https://togithub.com/seromenho) - Readme links fixed, thanks [@mriedem](https://togithub.com/mriedem) - RateLimiterQueue TS types fixed - Fix postgres consumed points increment on block, issue [https://github.com/animir/node-rate-limiter-flexible/issues/95](https://togithub.com/animir/node-rate-limiter-flexible/issues/95) ### [`v2.1.16`](https://togithub.com/animir/node-rate-limiter-flexible/compare/7562419b0b1e509c9c24cf03eb1eaa1243f7b0fc...9a51140554941e8509d0b2d223a26a2741a8a0a9) [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/7562419b0b1e509c9c24cf03eb1eaa1243f7b0fc...9a51140554941e8509d0b2d223a26a2741a8a0a9) ### [`v2.1.15`](https://togithub.com/animir/node-rate-limiter-flexible/compare/89e09e04974330a651ce45997c0c985cede4a14f...7562419b0b1e509c9c24cf03eb1eaa1243f7b0fc) [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/89e09e04974330a651ce45997c0c985cede4a14f...7562419b0b1e509c9c24cf03eb1eaa1243f7b0fc) ### [`v2.1.14`](https://togithub.com/animir/node-rate-limiter-flexible/compare/06b3d07478dee9c608c5aa687e64a1eea673f332...89e09e04974330a651ce45997c0c985cede4a14f) [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/06b3d07478dee9c608c5aa687e64a1eea673f332...89e09e04974330a651ce45997c0c985cede4a14f) ### [`v2.1.13`](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.1.10...06b3d07478dee9c608c5aa687e64a1eea673f332) [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/v2.1.10...06b3d07478dee9c608c5aa687e64a1eea673f332) ### [`v2.1.10`](https://togithub.com/animir/node-rate-limiter-flexible/releases/tag/v2.1.10): BurstyRateLimiter and RateLimiterQueue improved + RateLimiterMemory works in browser [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/7e730f1fb7a361d005584701d66d9706182d9876...v2.1.10) - RateLimiterQueue support of tokens removed by key. (single bucket for every key) - Add RateLimiterQueue missing methods types. Thank you [@bmenant](https://togithub.com/bmenant) - RateLimiterPostgres fixed for node-postgres@8.0.0 update. Thank you [@matomesc](https://togithub.com/matomesc) - [tableCreated](https://togithub.com/animir/node-rate-limiter-flexible/wiki/Options#tablecreated) option for MySQL and PostgreSQL to skip checks for limiter tables. - BurstyRateLimiter compatible with RateLimiterQueue now. Thanks a lot to [@matomesc](https://togithub.com/matomesc) for a big help on this. - RateLimiterMemory limiter works in browser now. Thanks a bunch to [@cha0s](https://togithub.com/cha0s). Also, thank you for test scripts improvements. ### [`v2.1.9`](https://togithub.com/animir/node-rate-limiter-flexible/compare/5d367ddd50f3f27c0a3d2fccba57faad3a6b074a...7e730f1fb7a361d005584701d66d9706182d9876) [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/5d367ddd50f3f27c0a3d2fccba57faad3a6b074a...7e730f1fb7a361d005584701d66d9706182d9876) ### [`v2.1.7`](https://togithub.com/animir/node-rate-limiter-flexible/compare/c7bc579a71b41111498671b7fc3561a31d1d2930...5d367ddd50f3f27c0a3d2fccba57faad3a6b074a) [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/c7bc579a71b41111498671b7fc3561a31d1d2930...5d367ddd50f3f27c0a3d2fccba57faad3a6b074a) ### [`v2.1.6`](https://togithub.com/animir/node-rate-limiter-flexible/compare/a2d00ab0c6393f9e8289f75cc8a68855e7f0ba58...c7bc579a71b41111498671b7fc3561a31d1d2930) [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/a2d00ab0c6393f9e8289f75cc8a68855e7f0ba58...c7bc579a71b41111498671b7fc3561a31d1d2930) ### [`v2.1.5`](https://togithub.com/animir/node-rate-limiter-flexible/compare/46647d36765b9485d6e4bface6d9c43a3c33dd26...a2d00ab0c6393f9e8289f75cc8a68855e7f0ba58) [Compare Source](https://togithub.com/animir/node-rate-limiter-flexible/compare/46647d36765b9485d6e4bface6d9c43a3c33dd26...a2d00ab0c6393f9e8289f75cc8a68855e7f0ba58)Configuration
📅 Schedule: Branch creation - "after 11am before 3pm on saturday" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.