unstale

npm / keyv

keyv

What changed in keyv 6, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-17.

21 breaking2 new APIs and options1 performance7 behavior and defaults1 tooling13 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.1.1 on npm

keyv 645 changes

Breaking changes 21

  • AES-CBC is no longer accepted by the encryption packages.

    6.1.0release notes

  • A namespaced clear fails rather than wiping a store it cannot list; provide keys() or iterator(), or clear without a namespace.

    6.1.0release notes

  • Attaching an error listener makes failed calls return a fallback value; without one, failed calls reject.

    6.1.0release notes

  • The namespace separator option is now namespaceSeparator; keyPrefixSeparator is gone.

    6.1.0release notes

  • The namespace separator option is now namespaceSeparator; keySeparator is gone.

    6.1.0release notes

  • The package accepts only AES-GCM, AES-CCM, and ChaCha20-Poly1305 with base64, base64url, or hex output; AES-CBC is removed.

    6.1.0release notes

  • The package accepts only AES-GCM; AES-CBC is removed.

    6.1.0release notes

  • The etcd store lease property is removed; the store ttl applies to each key from its own write.

    6.1.0release notes

  • Several adapters store keys beginning with <namespace>: as given instead of treating them as already prefixed.

    6.1.0release notes

  • Set this option to true to retain the prior behavior of affecting all entries when no namespace is set.

    6.1.0release notes

  • Redis clear matches the namespace literally rather than as a glob pattern.

    6.1.0release notes

  • Replacing the Redis client removes the old client's listeners.

    6.1.0release notes

  • Redis iterator matches the namespace literally rather than as a glob pattern.

    6.1.0release notes

  • Rejected memcache writes return false.

    6.1.0release notes

  • Writes fail when an encryption adapter is set and serialization is off; serialization remains on by default.

    6.1.0release notes

  • The Dynamo option is removed; use Keyv's ttl option for a default expiry.

    6.1.0release notes

  • Setting storeSize keeps every entry and no longer emits clear.

    6.1.0release notes

  • The option is removed; failed calls return a fallback value when an error listener is attached and reject when none is.

    6.1.0release notes

  • Dynamo keys written without a TTL no longer expire; set Keyv's ttl option for a default expiry.

    6.1.0release notes

  • Valkey clear removes only its own namespace, not namespaces that share its prefix.

    6.1.0release notes

  • Valkey reads return undefined, never null.

    6.1.0release notes

New APIs and options 2

  • Redis createKeyv accepts cluster and sentinel options.

    6.1.0release notes

  • Adapters that join the namespace and key accept namespaceSeparator, which defaults to ::.

    6.1.0release notes

Performance 1

  • Intervals over 24.8 days no longer run cleanup every millisecond.

    6.1.0release notes

Behavior and default changes 7

  • Keyv uses a namespace set on the storage adapter when Keyv itself has none.

    6.1.0release notes

  • Memcache clear removes only the store's own entries; use noNamespaceAffectsAll on an unnamespaced store to flush the server.

    6.1.0release notes

  • The Redis connection timeout covers the handshake, and timed-out connects close their sockets.

    6.1.0release notes

  • Postgres deleteMany runs as one statement.

    6.1.0release notes

  • GridFS reads the newest revision, and delete removes every revision.

    6.1.0release notes

  • MySQL tables get a primary key on (namespace, id), and existing tables are migrated on connect.

    6.1.0release notes

  • Promise-based stores without async methods now go through KeyvBridgeAdapter.

    6.1.0release notes

Tooling 1

  • A published agent skill upgrades a project from Keyv v4 or v5 to v6.

    6.1.0release notes

Fixes and other changes 13

  • The etcd value envelope uses Keyv's JSON serializer so BigInt values round-trip.

    6.1.0release notes

  • The etcd value envelope uses Keyv's JSON serializer so Buffer values round-trip.

    6.1.0release notes

  • Without a namespace, etcd clear only touches entries Keyv wrote without a namespace.

    6.1.0release notes

  • The Redis helper stops reconnecting to a server that is down.

    6.1.0release notes

  • Fractional TTLs no longer fail writes.

    6.1.0release notes

  • Without a namespace, etcd iterator only touches entries Keyv wrote without a namespace.

    6.1.0release notes

  • Keys memcached cannot store now work.

    6.1.0release notes

  • Concurrent operations during the handshake share one connect instead of failing.

    6.1.0release notes

  • Redis missing values are undefined.

    6.1.0release notes

  • Etcd setMany reports failed writes as false.

    6.1.0release notes

  • Postgres SQL NULL reads as undefined.

    6.1.0release notes

  • The sqlite3 driver no longer hangs after a failed statement.

    6.1.0release notes

  • Valkey useSets works in cluster mode.

    6.1.0release notes