Skip to content

v1.1.3

Choose a tag to compare

@github-actions github-actions released this 18 Feb 12:57
· 67 commits to main since this release

Performance

  • Atomic Redis Lua scripts — combine ban check + hit + violation tracking in a single EVALSHA round-trip
    • HIT_SCRIPT: atomic INCR + PTTL + PEXPIRE (1 round-trip, down from 1-2)
    • HIT_WITH_BAN_SCRIPT: atomic ban check + hit + violation + auto-ban (1 round-trip, down from 3-4)
  • EVALSHA with NOSCRIPT recovery — scripts loaded once via SCRIPT LOAD, called by SHA hash. Auto-reload on Redis restart or script eviction
  • Eliminates race conditions between separate ban check and hit calls

Added

  • HitWithBanResult interface on HitLimitStore — stores can declare atomic hit+ban support
  • hitWithBan optional method on store interface — enables single round-trip path
  • Dual-path limiter: atomic path (stores with hitWithBan) vs fallback path (separate calls)

Internal

  • Limiter detects hitWithBan on store and uses atomic path automatically
  • Custom stores without hitWithBan continue to work via fallback path
  • Legacy methods (isBanned, ban, recordViolation) preserved for backward compatibility
  • Zero breaking changes — all existing code works identically

Tests

  • Added 12 new Redis Lua script tests per package (both Node.js and Bun):
    • Atomic hit counting, violation tracking, ban triggering
    • Already-banned detection, key independence, resetAt correctness
    • Legacy method round-trips, reset clearing all keys
    • Concurrent atomicity: parallel hits → sequential counts

Docs

  • Full landing page overhaul with scroll animations, animated counters, install banner
  • Navigation redesign with runtime tabs (Node.js / Bun)
  • Benchmark fair-play disclaimers across all docs, READMEs, and benchmark pages
  • Package READMEs overhauled with accurate v1.1.3 benchmark data

Packages

Package Version
@joint-ops/hitlimit 1.1.3
@joint-ops/hitlimit-bun 1.1.3
@joint-ops/hitlimit-types 1.1.3

Author: @tanv33

Full Changelog: v1.1.2...v1.1.3