# What changed in keyv

> 45 changes in keyv 6 from its official release notes, upgrade guides and advisories: 21 breaking, 2 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/keyv/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## keyv 6

### Breaking changes

- AES-CBC is no longer accepted by the encryption packages. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- A namespaced clear fails rather than wiping a store it cannot list; provide keys() or iterator(), or clear without a namespace. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- Attaching an error listener makes failed calls return a fallback value; without one, failed calls reject. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- The namespace separator option is now namespaceSeparator; keyPrefixSeparator is gone. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- The namespace separator option is now namespaceSeparator; keySeparator is gone. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- The package accepts only AES-GCM, AES-CCM, and ChaCha20-Poly1305 with base64, base64url, or hex output; AES-CBC is removed. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- The package accepts only AES-GCM; AES-CBC is removed. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- The etcd store lease property is removed; the store ttl applies to each key from its own write. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- Several adapters store keys beginning with <namespace>: as given instead of treating them as already prefixed. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- Set this option to true to retain the prior behavior of affecting all entries when no namespace is set. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- Redis clear matches the namespace literally rather than as a glob pattern. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- Replacing the Redis client removes the old client's listeners. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- Redis iterator matches the namespace literally rather than as a glob pattern. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- Rejected memcache writes return false. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- Writes fail when an encryption adapter is set and serialization is off; serialization remains on by default. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- The Dynamo option is removed; use Keyv's ttl option for a default expiry. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- Setting storeSize keeps every entry and no longer emits clear. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- The option is removed; failed calls return a fallback value when an error listener is attached and reject when none is. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- Dynamo keys written without a TTL no longer expire; set Keyv's ttl option for a default expiry. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- Valkey clear removes only its own namespace, not namespaces that share its prefix. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- Valkey reads return undefined, never null. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)

### New APIs and options

- Redis createKeyv accepts cluster and sentinel options. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- Adapters that join the namespace and key accept namespaceSeparator, which defaults to ::. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)

### Performance

- Intervals over 24.8 days no longer run cleanup every millisecond. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)

### Behavior and default changes

- Keyv uses a namespace set on the storage adapter when Keyv itself has none. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- Memcache clear removes only the store's own entries; use noNamespaceAffectsAll on an unnamespaced store to flush the server. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- The Redis connection timeout covers the handshake, and timed-out connects close their sockets. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- Postgres deleteMany runs as one statement. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- GridFS reads the newest revision, and delete removes every revision. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- MySQL tables get a primary key on (namespace, id), and existing tables are migrated on connect. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- Promise-based stores without async methods now go through KeyvBridgeAdapter. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)

### Tooling

- A published agent skill upgrades a project from Keyv v4 or v5 to v6. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)

### Fixes and other changes

- The etcd value envelope uses Keyv's JSON serializer so BigInt values round-trip. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- The etcd value envelope uses Keyv's JSON serializer so Buffer values round-trip. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- Without a namespace, etcd clear only touches entries Keyv wrote without a namespace. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- The Redis helper stops reconnecting to a server that is down. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- Fractional TTLs no longer fail writes. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- Without a namespace, etcd iterator only touches entries Keyv wrote without a namespace. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- Keys memcached cannot store now work. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- Concurrent operations during the handshake share one connect instead of failing. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- Redis missing values are undefined. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- Etcd setMany reports failed writes as false. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- Postgres SQL NULL reads as undefined. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- The sqlite3 driver no longer hangs after a failed statement. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
- Valkey useSets works in cluster mode. (6.1.0) — [release notes](https://github.com/jaredwray/keyv/releases/tag/v6.1.0)
