Tags: upstash/redis-js
Tags
fix: improve error message for when env is missing in cloudflare
Fix: zremrangebyscore should accept string | number for min/max scores ( #1396) * Fix: zremrangebyscore should accept string | number for min/max scores The zremrangebyscore command had incorrect TypeScript type definitions that only accepted number for min and max parameters, but the Redis protocol and Upstash REST API accept string values like '-inf' and '+inf'. This change aligns zremrangebyscore with the existing zcount command, which already uses number | string for score range parameters. Changes: - Updated min parameter type from 'number' to 'number | string' - Updated max parameter type from 'number' to 'number | string' Fixes #1395 * fix: narrow down allowed strings in zremrangebyscore * fix: add more tests --------- Co-authored-by: CahidArda <[email protected]>
fix: catch json parse errors (#1392) * fix: catch json parse errors * fix: throw upstash error outside the try catch * fix: fix tests and http error handling * fix: revert lock files * fix: fix tests * fix: fix tests * fix: switch from toInclude to toHaveProperty * fix: fix lpop, rpop and subscribe tests * fix: zscan returns string as cursor * fix: fix test inside test flaw * fix: simplify UpstashJSONParseError options --------- Co-authored-by: CahidArda <[email protected]>
DX-2161: fall back to returning the message string if message is not … …parsable (#1391) * fix: fall back to returning the message string if message is not parsable when the message was a string, we tried to parse which got an error. Also, test durations were too short and we were getting the subscribe event instead of the message event * fix: publish message as string instead of JSON stringified format
PreviousNext