You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(shared): dispatch redis TTL and Lua calls on the detected client
`setWithTTL` tried the ioredis positional form and fell back to the
options form only if the first call threw. node-redis does not throw on it:
it accepts `set(key, value, 'PX', ms)`, ignores the trailing arguments, and
stores the key with no expiry. The fallback therefore never ran, and every
caller of this helper silently lost its TTL on node-redis — including the
oauth2 authorization-code, PAR and device-code stores, where the whole point
of the write is that it expires quickly.
`incr-store` had the same problem in its `eval` call. That one at least
failed loudly, because Redis rejects a script invoked with no keys.
Adds `detectDialect` and `evalScript` to the shared redis helpers so there is
one answer to "which convention does this client want", and routes both call
sites through it. `incr` now also reports a driver failure through the
binding package's `wrap`, so callers get their own error class and a `code`
to branch on instead of a bare driver reply.
The fake clients in the unit suites now declare which driver they imitate
(ioredis exposes `status`), since that is what the code keys on, and the
shared suite asserts both argument forms rather than just one.
0 commit comments