# @upstash/redis ## 1.41.0 ### Minor Changes - dbf1863: Support hybrid search: `s.hybrid()` declares a `HYBRID` field, and `query()` accepts the `$ann`, `$rrf` and `$standard` retrievers. `count()` and `aggregate()` accept `$rrf` and `$standard` without `$ann`. ### Patch Changes - 4d3f58e: Include TypeScript source and Redis SDK documentation in the npm package for offline reference and coding agents. Command JSDoc links each documented method to its bundled docs page and notes automatic JSON deserialization on commands that return stored values. ## 1.40.0 ### Minor Changes - 2254796: Default `responseEncoding` to `false`. The server now returns string values as plain JSON instead of base64, which cuts response sizes by up to 25%. Set `responseEncoding: "base64"` to keep the previous behavior. Behavior changes with the new default: - String values that start with a UTF-8 BOM keep it. Automatic deserialization still ignores the BOM, so a BOM-prefixed JSON value is parsed as before; other BOM-prefixed strings, and all strings with `automaticDeserialization: false`, are returned exactly, BOM included. - Invalid UTF-8 (binary data) is still replaced with `U+FFFD`, but the server now replaces each invalid byte, so the number of replacement characters can differ. Binary values were not preserved before either. - A nested `OK` status reply (e.g. a Lua script returning `{redis.call("SET", ...)}`) no longer sometimes decodes to `8`. - Error replies nested in arrays (e.g. Lua `pcall` results) are no longer garbled. Static aborted `signal` (all encodings): - `abort()` with no reason or with an `Error` returns `null`. With `responseEncoding: false` it used to return a serialized error object. - `abort(null)` returns `null` instead of `"Aborted"`. - With the new default, other reasons are returned as is: strings that look like base64 (e.g. `"abcd"`) are no longer garbled, and booleans and objects are no longer dropped. - Non-Latin-1 string reasons no longer throw a `TypeError` on Node. ## 1.39.0 ### Minor Changes - 6801501: Add array commands: `arset`, `armset`, `arget`, `armget`, `argetrange`, `arscan`, `argrep`, `ardel`, `ardelrange`, `arcount`, `arlen`, `arinsert`, `arring`, `arlastitems`, `arnext`, `arseek`, `arop` and `arinfo`, available on the client, in pipelines and in transactions. - 3f6e286: Support search indexes over Redis streams: `redis.search.createIndex({ dataType: "stream", stream: "events", schema })` indexes every entry of the stream as a document keyed by its entry ID. `describe()` reports `dataType: "stream"` with the stream key in `prefixes`. - 33658bc: Add vector index support: `redis.vector.createIndex()` / `redis.vector.index()` return a `VectorIndex` with `add`, `get`, `query`, `delete`, `count`, `info` and `drop`, backed by the new `VECTOR.CREATE`, `VECTOR.ADD`, `VECTOR.GET`, `VECTOR.QUERY`, `VECTOR.DEL`, `VECTOR.COUNT`, `VECTOR.INFO` and `VECTOR.DROP` commands. ## 1.38.4 ### Patch Changes - 7ac8182: Fix read-your-writes sending a stale `upstash-sync-token` A read issued straight after a write travelled with the token from _before_ that write, so the server was under no obligation to serve the write and `readYourWrites` silently did not hold. `HttpClient.request()` snapshotted the outgoing headers with `mergeHeaders(this.headers, ...)` and only afterwards wrote the freshest token into `this.headers`, so the token learned from response N first shipped with request N+2. The assignment now happens before the merge. This regressed in **1.34.5**. In 1.34.0–1.34.4 the request options held `headers: this.headers` by reference, so the late write was still picked up before `fetch`; 1.34.5 introduced per-request header merging, which turned that reference into a copy without moving the assignment. ## 1.38.3 ### Patch Changes - f020866: Send an `Upstash-Telemetry-Retry` header with the retry count on retried requests so retry rates are visible in server-side telemetry - 777dc30: Trim telemetry header values before deduplicating so whitespace around existing values does not defeat the dedup check ## 1.38.2 ### Patch Changes - c0f5ad7: Deduplicate telemetry header values so repeated `mergeTelemetry` calls no longer append the same sdk, platform or runtime tag multiple times ## 1.38.1 ### Patch Changes - bd7a19f: Add a quick tip about creating a database via https://upstash.com/start-redis to the warnings shown when the Redis url or token is missing. On Cloudflare, the warning shown when both the url and the token are missing now names both `wrangler secret put` commands instead of only one. ## 1.38.0 ### Minor Changes - c71f581: Separate read/write commands into separate pipelines in auto pipeline. As a result, mixed read/write `Promise.all` batches may now be split across multiple pipeline HTTP requests instead of a single request, and read-after-write ordering may no longer be preserved within those mixed batches. ## 1.37.0 ### Minor Changes - 6f2a831: Release redis search ### Patch Changes - 3980b45: Add monorepo structure