Skip to content

Releases: animir/node-rate-limiter-flexible

RateLimiterUnion works with one limiter

13 Oct 12:06
Compare
Choose a tag to compare

Fixes and improvements made since v2.3.4 release

01 Oct 13:59
Compare
Choose a tag to compare
  • RateLimiterQueue getTokensRemaining with RateLimiterPostgres fixed. #125
  • clear timeout on key delete from memory storage. #146 Thank you @jiddmeye
  • clearExpiredByTimeout is added to TS types for MySQL and Postgres limiters. #156
  • fix negative remaining points in memory limiter. #172 Thank you @MiniKraken-Team
  • added browser package.json settings to allow bundling. 6ce34b3 Thank you @achingbrain
  • use nodejs.util.inspect.custom for Symbol flexibility. 2c8bedb Thank you @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. #106

MongoDB version detection fixes and misc

09 Nov 10:12
Compare
Choose a tag to compare
  • MongoDB version detection is fixed for mongoose client. Thank you @adrianvlupu
  • MongoDB version detection is fixed for 3.6.7+. Thank you @pavittarx
  • Internal fix of get method. It incorrectly processed undefined result from a store. Thank you @animir
  • .editorconfig added. Thank you @vinibeloni
  • TypeScript type for RateLimiterQueueError added. Thank you @adilhafeez
  • TypeScript type for deleteInMemoryBlockedAll method is added. Thank you @animir

MongoDB client v4 fix, delete and new method to delete all inMemory Blocked keys

28 Sep 12:32
Compare
Choose a tag to compare
  • replace replaceOne with findOneAndUpdate to fix a bug related to absent ops attribute in MongoDB client v4+. Thank you @vdiez
  • delete method on any store limiter deletes inMemoryBlocked key if it is there. Thank you @evan361425
  • new deleteInMemoryBlockedAll method added to clean up all blocked keys at once. Thank you @evan361425 again :-)
  • @evan361425 also added tests to cover new lines 🥇

Support for mongodb client v4

10 Jul 04:04
Compare
Choose a tag to compare
  • Missing get/set Typescript types added and documentation improved. Thanks @rijkvanzanten
  • mongodb client v4 support. Thank you @backflip

PostgreSQL limiter supports TypeORM + fixes

10 Jan 05:10
Compare
Choose a tag to compare
  • TypeORM Support for RateLimitPostgres, thank you @seromenho
  • Readme links fixed, thanks @mriedem
  • RateLimiterQueue TS types fixed
  • Fix postgres consumed points increment on block, issue #95

BurstyRateLimiter and RateLimiterQueue improved + RateLimiterMemory works in browser

02 Aug 03:13
Compare
Choose a tag to compare
  • RateLimiterQueue support of tokens removed by key. (single bucket for every key)
  • Add RateLimiterQueue missing methods types. Thank you @bmenant
  • RateLimiterPostgres fixed for [email protected] update. Thank you @matomesc
  • tableCreated option for MySQL and PostgreSQL to skip checks for limiter tables.
  • BurstyRateLimiter compatible with RateLimiterQueue now. Thanks a lot to @matomesc for a big help on this.
  • RateLimiterMemory limiter works in browser now. Thanks a bunch to @cha0s. Also, thank you for test scripts improvements.

In memory Block Strategy

15 Mar 06:51
Compare
Choose a tag to compare

Every time consume method executed, it returns msBeforeNext milliseconds. This can be used to block key in memory for exact msBeforeNext milliseconds until points are reset on store. Set inmemoryBlockOnConsumed option and omit inmemoryBlockDuration for this feature.

BurstyRateLimiter

15 Mar 02:59
Compare
Choose a tag to compare

Allow traffic bursts with BurstyRateLimiter

Redis Lua script + deprecated things removed

09 Feb 06:09
Compare
Choose a tag to compare

Changes

  • Redis uses Lua script for expiring atomic increments. It allowed to remove a hack, which made extra queries to Redis, when TTL is not set on key set.
  • RateLimiterCluster options type fixed.

BREAKING CHANGES:

  • isWhite and isBlack getters/setters and options support removed from RLWrapperBlackAndWhite. isWhiteListed and isBlackListed options should be used instead.
  • IRateLimiterResOptions interface type removed from lib/index.d.ts. IRateLimiterRes should be used.