upstash / ratelimit-js

Rate limiting library for serverless runtimes
https://ratelimit-with-vercel-kv.vercel.app
MIT License
1.65k stars 33 forks source link

Add checkAtMost parameter to getMostAllowedBlocked #114

Closed CahidArda closed 1 month ago

CahidArda commented 1 month ago

see https://github.com/upstash/core-analytics/pull/38 for more details

should be merged after core-analytics PR is merged and core-analytics patch is released.

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ratelimit-with-vercel-kv ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 19, 2024 10:08am
spences10 commented 1 month ago

Is the v2 release a breaking change?

Couldn't see anything in the release notes saying so

CahidArda commented 1 month ago

We updated what the getRemaining method returns https://github.com/upstash/ratelimit-js/pull/113 This was bacwards incompatible. So we released 2.0.0.

Looking back now, I think releasing a major version for this was maybe not the best course of action. We could have kept it backwards compatible and added a new method.

At least it should be very easy to upgrade to 2.0.0 :D