Releases: jdesboeufs/connect-mongo
Releases · jdesboeufs/connect-mongo
v6.0.0
v6.0.0
- Breaking: Requires Node.js 20.8+ (aligns with MongoDB driver 5–7 support).
- Compatibility: Supported/tested matrix: Node 20/22/24 + MongoDB driver 5.x–7.x + MongoDB server 4.4–8.0 (peer range remains
>=5.0.0). - Added: Optional
timestampsflag to recordcreatedAt/updatedAton session documents for auditing while keeping the default schema unchanged. - Added: Pluggable
cryptoAdapterinterface with helperscreateWebCryptoAdapter(AES-GCM via Web Crypto API) andcreateKrupteinAdapter; legacycryptooptions are auto-wrapped and mutually exclusive withcryptoAdapterto avoid ambiguity. - Fixed:
store.clear()now usesdeleteMany({})instead ofcollection.drop(), preserving TTL indexes and treatingNamespaceNotFoundas success so clears are idempotent. - Fixed: Decryption failures in
get()now short-circuit after the first callback, preventing double-callback regressions when the crypto secret is wrong. - Packaging: npm package now ships dual ESM/CJS bundles via
tsdown, with an explicit exports map and cleaned type declarations (.d.mts/.d.cts). - Types:
MongoStoreand option hooks are strongly typed to avoidanyleaks.