chore(deps): update dependency mongodb to v6
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| mongodb | 4.17.2 -> 6.20.0 |
||||
| mongodb | ^5.1.0 -> ^6.0.0 |
Release Notes
mongodb/node-mongodb-native (mongodb)
v6.20.0
Features
- NODE-6883: allow rawData option on time series collections (#​4642) (0fa3cd4)
- NODE-7125: add db and client properties to collection and database objects (#​4640) (3469f86)
- NODE-7134: allow hint with unacknowledged writes for delete, update and findAndModify commands (#​4647) (82d6ce6)
- NODE-7139: remove pre-4.2 logic and deprecate dead code (#​4657) (14303bc)
- NODE-7140: deprecate driver info options (#​4654) (b813c85)
-
NODE-7157: deprecate
retryWritesinCommandOperationOptions(#​4661) (620972d)
Bug Fixes
-
NODE-4763: cache
resumeTokeninChangeStream.tryNext()(#​4636) (8331a93) - NODE-6858: treat MongoServerSelectionError as a resumable error for Change Streams (#​4653) (c6d64e7)
- NODE-7138: prevent duplicate metadata from being appended to handshake metadata (#​4651) (05c230c)
v6.19.0
Features
- NODE-4179: allow secureContext in KMS TLS options (#​4578) (0ea6eaa)
- NODE-6472: findOne and find no longer keep open cursors (#​4580) (be7f808)
- NODE-7020: remove ping on connect (#​4607) (3d296b7)
- NODE-7059, NODE-7008: add support for text queries for QE string fields (#​4597) (e4492f3)
v6.18.0
Features
- NODE-5055: Add databaseName property to command monitoring events (#​4586) (3faf0c9)
- NODE-6865: deprecate transaction getters (#​4567) (da46aea)
- NODE-6991: deprecate unintentionally public client metadata types (#​4566) (ca6554b)
- NODE-7009: add client metadata on demand (#​4574) (b9636ee)
- NODE-7053: deprecate noResponse option (#​4589) (1115319)
Bug Fixes
- NODE-4845: allocate sessions lazily in cursors (#​4575) (5761703)
- NODE-6589: background task does not prune idle connections when minPoolSize=0 (#​4569) (7cbb641)
-
NODE-6955: add missing
wallTimeproperty TS change stream event interfaces (#​4541) (f153c6f)
v6.17.0
Features
- NODE-6245: add keepAliveInitialDelay config (#​4510) (d6c0eb3)
- NODE-6290: add sort support to updateOne and replaceOne (#​4515) (28857b7)
- NODE-6882: eagerly close checked out connections when client is closed (#​4499) (64fdb3e)
- NODE-6884: remove support for 4.0 (#​4534) (6fe6ccc)
- NODE-6952: support configuring DEK cache expiration (#​4538) (c529f07)
- NODE-6963: use BSON 6.10.4 (#​4549) (aee490a)
Bug Fixes
- NODE-6638: throw if all atomic updates are undefined (#​4519) (9625b2d)
- NODE-6864: socket errors are not always converted to MongoNetworkErrors (#​4473) (2d86095)
- NODE-6962: OIDC machine workflows use OIDCCallbacks internally (#​4546) (bd6030f)
v6.16.0
Features
-
NODE-6494: add support for
hinton distinct commands (#​4487) (40d0e87) - NODE-6515: deprecate driver support for server 4.0 (#​4517) (4c1a8a7)
Bug Fixes
- NODE-6630: read all messages in buffer when chunk arrives (#​4512) (8c86e30)
- NODE-6878: documents.clear() throws a TypeError after cursor is rewound (#​4488) (a1fffeb)
v6.15.0
Features
Bug Fixes
v6.14.2
Bug Fixes
v6.14.1
Bug Fixes
v6.14.0
Features
-
NODE-6676: add support for
nsTypein change stream create events (#​4431) (7800067) - NODE-6773: add support for $lookup with automatic encryption (#​4427) (965b21a)
Bug Fixes
- NODE-6765: FindOneAndUpdateOptions supports aggregation expressions (#​4423) (421ddeb)
- NODE-6792: use isUint8Array from driver's utils instead of util/types (#​4436) (dfe1fba)
-
NODE-6794: revert
@aws-sdk/credential-providerspeer compatibility change (#​4437) (488c407)
v6.13.1
Bug Fixes
- NODE-6407: use conversationId returned from server in saslContinue (#​4368) (fbefa6b)
- NODE-6613: Update error messages when primaries go stale (#​4397) (6528c8d)
- NODE-6690: Remove extraneous Document in replaceOne return type (#​4383) (6c81d4e)
- NODE-6763: pass WriteConcernOptions instead on WriteConcernSettings (#​4421) (26f15d7)
- NODE-6777: update BSON to 6.10.3 (#​4428) (db5b9e0)
v6.13.0
Features
- NODE-5672: support standardized logging (#​4387) (d1b2453)
- NODE-6258: add signal support to find and aggregate (#​4364) (73def18)
- NODE-6451: retry SRV and TXT lookup for DNS timeout errors (#​4375) (fd902d3)
- NODE-6633: MongoClient.close closes active cursors (#​4372) (654069f)
Bug Fixes
- NODE-5225: concurrent MongoClient.close() calls each attempt to close the client (#​4376) (9419af7)
- NODE-6340: OIDC reauth uses caches speculative auth result (#​4379) (8b2b7fd)
Performance Improvements
- NODE-6452: Optimize CommandStartedEvent and CommandSucceededEvent constructors (#​4371) (41b066b)
- NODE-6616: shortcircuit logging ejson.stringify (#​4377) (c1bcf0d)
v6.12.0
Features
- NODE-6593: add support for [email protected] (#​4346) (ea8a33f)
- NODE-6605: add error message when invalidating primary (#​4340) (37613f1)
Bug Fixes
- NODE-6583: upgrade to BSON v6.10.1 to remove internal unbounded type cache (#​4338) (249c279)
- NODE-6600: set object mode correctly for message chunking in SizedMessageTransform (#​4345) (5558573)
- NODE-6602: only wrap errors from SOCKS in network errors (#​4347) (ed83f36)
v6.11.0
Features
- NODE-5682: set maxTimeMS on commands and preempt I/O (#​4174) (e4e6a5e)
- NODE-5844: add iscryptd to ServerDescription (#​4239) (c39d443)
- NODE-6069: OIDC k8s machine workflow (#​4270) (82c931c)
- NODE-6090: Implement CSOT logic for connection checkout and server selection (bd8a9f4)
- NODE-6231: Add CSOT behaviour for retryable reads and writes (#​4186) (2ffd5eb)
- NODE-6274: add CSOT support to bulkWrite (#​4250) (c5a9ae5)
- NODE-6275: Add CSOT support to GridFS (#​4246) (3cb8187)
- NODE-6304: add CSOT support for non-tailable cursors (#​4195) (131f6ed)
- NODE-6305: Add CSOT support to tailable cursors (#​4218) (2398fc6)
- NODE-6312: add error transformation for server timeouts (#​4192) (c2c0cb9)
- NODE-6313: add CSOT support to sessions and transactions (#​4199) (5f1102f)
- NODE-6387: Add CSOT support to change streams (#​4256) (4588ff2)
- NODE-6389: add support for timeoutMS in StateMachine.execute() (#​4243) (c55f965)
- NODE-6390: Add timeoutMS support to auto encryption (#​4265) (55e08e7)
- NODE-6391: Add timeoutMS support to explicit encryption (#​4269) (f745b99)
- NODE-6392: add timeoutMS support to ClientEncryption helpers part 1 (#​4281) (e86f11e)
- NODE-6403: add CSOT support to client bulk write (#​4261) (365d63b)
- NODE-6421: add support for timeoutMS to explain helpers (#​4268) (5b2629b)
- NODE-6446: deprecate legacy timeout options (#​4279) (c28608b)
- NODE-6551: update bson to 6.10.0 (#​4329) (adb15fe)
Bug Fixes
- NODE-6374: MongoOperationTimeoutError inherits MongoRuntimeError (#​4237) (9fb896a)
- NODE-6412: read stale response from previously timed out connection (#​4273) (fd8f3bd)
- NODE-6454: use timeoutcontext for state machine execute() cursor options (#​4291) (5dd8ee5)
- NODE-6469: pool is cleared before connection checkin on error (#​4296) (06a2e2c)
- NODE-6523: deleteMany in gridfs passes timeoutMS to predicate, not options (#​4319) (1965ed5)
Performance Improvements
v6.10.0
Features
- NODE-5682: set maxTimeMS on commands and preempt I/O (#​4174) (e4e6a5e)
- NODE-5844: add iscryptd to ServerDescription (#​4239) (c39d443)
- NODE-6069: OIDC k8s machine workflow (#​4270) (82c931c)
- NODE-6090: Implement CSOT logic for connection checkout and server selection (bd8a9f4)
- NODE-6231: Add CSOT behaviour for retryable reads and writes (#​4186) (2ffd5eb)
- NODE-6274: add CSOT support to bulkWrite (#​4250) (c5a9ae5)
- NODE-6275: Add CSOT support to GridFS (#​4246) (3cb8187)
- NODE-6304: add CSOT support for non-tailable cursors (#​4195) (131f6ed)
- NODE-6305: Add CSOT support to tailable cursors (#​4218) (2398fc6)
- NODE-6312: add error transformation for server timeouts (#​4192) (c2c0cb9)
- NODE-6313: add CSOT support to sessions and transactions (#​4199) (5f1102f)
- NODE-6387: Add CSOT support to change streams (#​4256) (4588ff2)
- NODE-6389: add support for timeoutMS in StateMachine.execute() (#​4243) (c55f965)
- NODE-6390: Add timeoutMS support to auto encryption (#​4265) (55e08e7)
- NODE-6391: Add timeoutMS support to explicit encryption (#​4269) (f745b99)
- NODE-6392: add timeoutMS support to ClientEncryption helpers part 1 (#​4281) (e86f11e)
- NODE-6403: add CSOT support to client bulk write (#​4261) (365d63b)
- NODE-6421: add support for timeoutMS to explain helpers (#​4268) (5b2629b)
- NODE-6446: deprecate legacy timeout options (#​4279) (c28608b)
- NODE-6551: update bson to 6.10.0 (#​4329) (adb15fe)
Bug Fixes
- NODE-6374: MongoOperationTimeoutError inherits MongoRuntimeError (#​4237) (9fb896a)
- NODE-6412: read stale response from previously timed out connection (#​4273) (fd8f3bd)
- NODE-6454: use timeoutcontext for state machine execute() cursor options (#​4291) (5dd8ee5)
- NODE-6469: pool is cleared before connection checkin on error (#​4296) (06a2e2c)
- NODE-6523: deleteMany in gridfs passes timeoutMS to predicate, not options (#​4319) (1965ed5)
Performance Improvements
v6.9.0
Features
- NODE-5459: add durations to connection pool events (#​4166) (7295695)
- NODE-5614: add support for explicit resource management (#​4177) (b3f3987)
- NODE-5754: allow auto select family options (#​4185) (54efb7d)
- NODE-5908: support range v2 (#​4141) (de253a7)
-
NODE-6225: add property ownership check before referencing
mongocryptdSpawnPathandmongocryptdSpawnArgs(#​4151) (f48f8d3) - NODE-6244: Bump max supported wire version and server version (#​4163) (45bc098)
- NODE-6252: insertMany and bulkWrite permit readonly arrays (#​4175) (4b219d3)
- NODE-6278: deprecate 3.6 servers (#​4178) (35d8840)
- NODE-6309: Mark range API as stable (#​4190) (f53e9d9)
- NODE-6327: new client bulk write types and builders (#​4205) (6d65ae7)
-
NODE-6365: pass through
allowPartialTrustChainTLS flag (#​4228) (d6c147d)
Bug Fixes
-
NODE-5720: on pre-4.4 sharded servers, the node driver uses
error.writeConcern.codeto determine retryability (#​4155) (b26c328) - NODE-6241: allow Binary as local kms provider key for auto encryption (#​4165) (d85f827)
- NODE-6259: replace dynamically assigned length property with a static getter (#​4173) (320dde0)
- NODE-6276: preserve top level error code MongoWriteConcernError (#​4183) (e902584)
- NODE-6284: make sparsity and trimFactor optional (#​4189) (8622545)
- NODE-6355: respect utf8 validation options when iterating cursors (#​4214) (8bfe187)
- NODE-6362: cache cursor deserialization options across deserialize calls (#​4221) (833eaa4)
- NODE-6367: enable mixed use of iteration APIs (#​4231) (08912c8)
Performance Improvements
v6.8.2
The MongoDB Node.js team is pleased to announce version 6.8.2 of the mongodb package!
Release Notes
Fixed mixed use of cursor.next() and cursor[Symbol.asyncIterator]
In 6.8.0, we inadvertently prevented the use of cursor.next() along with using for await syntax to iterate cursors. If your code made use of the following pattern and the call to cursor.next retrieved all your documents in the first batch, then the for-await loop would never be entered. This issue is now fixed.
const firstDoc = await cursor.next();
for await (const doc of cursor) {
// process doc
// ...
}
Bug Fixes
Documentation
We invite you to try the mongodb library immediately, and report any issues to the NODE project.
v6.8.1
The MongoDB Node.js team is pleased to announce version 6.8.1 of the mongodb package!
Release Notes
Fixed enableUtf8Validation option
Starting in v6.8.0 we inadvertently removed the ability to disable UTF-8 validation when deserializing BSON. Validation is normally a good thing, but it was always meant to be configurable and the recent Node.js runtime issues (v22.7.0) make this option indispensable for avoiding errors from mistakenly generated invalid UTF-8 bytes.
Bug Fixes
Documentation
We invite you to try the mongodb library immediately, and report any issues to the NODE project.
v6.8.0
Features
- NODE-5718: add ReadConcernMajorityNotAvailableYet to retryable errors (#​4154) (4f32dec)
- NODE-5801: allow multiple providers providers per type (#​4137) (4d209ce)
- NODE-5853: support delegated KMIP data key option (#​4129) (aa429f8)
- NODE-6136: parse cursor responses on demand (#​4112) (3ed6a2a)
- NODE-6157: add signature to github releases (#​4119) (f38c5fe)
Bug Fixes
- NODE-5801: use more specific key typing for multiple KMS provider support (#​4146) (465ffd9)
- NODE-6085: add TS support for KMIP data key options (#​4128) (f790cc1)
-
NODE-6241: allow
Binaryas local KMS provider key (#​4160) (fb724eb) - NODE-6242: close becomes true after calling close when documents still remain (#​4161) (e3d70c3)
v6.7.0
Features
Bug Fixes
v6.6.2
Bug Fixes
v6.6.1
Bug Fixes
v6.6.0
Features
- NODE-3639: add a general stage to the aggregation pipeline builder (#​4079) (8fca1aa)
- NODE-5678: add options parsing support for timeoutMS and defaultTimeoutMS (#​4068) (ddd1e81)
-
NODE-5762: include
causeand package name for allMongoMissingDependencyErrors (#​4067) (62ea94b) -
NODE-5825: add
minRoundTripTimetoServerDescriptionand changeroundTripTimeto a moving average (#​4059) (0e3d6ea) -
NODE-5919: support new
typeoption in create search index helpers (#​4060) (3598c23) - NODE-6020: upgrade BSON to ^6.5.0 (#​4035) (8ab2055)
Bug Fixes
- NODE-3681: Typescript error in Collection.findOneAndModify UpdateFilter $currentDate (#​4047) (a8670a7)
- NODE-5530: make topology descriptions JSON stringifiable (#​4070) (3a0e011)
- NODE-5745: ignore Read/Write Concern in Atlas Search Index Helpers (#​4042) (67d7bab)
- NODE-5925: driver throws error when non-read operation in a transaction has a ReadPreferenceMode other than 'primary' (#​4075) (39fc198)
-
NODE-5971: attach
vto createIndexes command whenversionis specified (#​4043) (1879a04) - NODE-5999: Change TopologyDescription.error type to MongoError (#​4028) (30432e8)
-
NODE-6019: indexExists always returns false when
fullis set totrue(#​4034) (0ebc1ac) - NODE-6029: update types for collection listing indexes (#​4072) (232bf3c)
- NODE-6051: only provide expected allowed keys to libmongocrypt after fetching aws kms credentials (#​4057) (c604e74)
- NODE-6066: ClusterTime.signature can be undefined (#​4069) (ce55ca9)
Performance Improvements
v6.5.0
Features
- NODE-3639: add a general stage to the aggregation pipeline builder (#​4079) (8fca1aa)
- NODE-5678: add options parsing support for timeoutMS and defaultTimeoutMS (#​4068) (ddd1e81)
-
NODE-5762: include
causeand package name for allMongoMissingDependencyErrors (#​4067) (62ea94b) -
NODE-5825: add
minRoundTripTimetoServerDescriptionand changeroundTripTimeto a moving average (#​4059) (0e3d6ea) -
NODE-5919: support new
typeoption in create search index helpers (#​4060) (3598c23) - NODE-6020: upgrade BSON to ^6.5.0 (#​4035) (8ab2055)
Bug Fixes
- NODE-3681: Typescript error in Collection.findOneAndModify UpdateFilter $currentDate (#​4047) (a8670a7)
- NODE-5530: make topology descriptions JSON stringifiable (#​4070) (3a0e011)
- NODE-5745: ignore Read/Write Concern in Atlas Search Index Helpers (#​4042) (67d7bab)
- NODE-5925: driver throws error when non-read operation in a transaction has a ReadPreferenceMode other than 'primary' (#​4075) (39fc198)
-
NODE-5971: attach
vto createIndexes command whenversionis specified (#​4043) (1879a04) - NODE-5999: Change TopologyDescription.error type to MongoError (#​4028) (30432e8)
-
NODE-6019: indexExists always returns false when
fullis set totrue(#​4034) (0ebc1ac) - NODE-6029: update types for collection listing indexes (#​4072) (232bf3c)
- NODE-6051: only provide expected allowed keys to libmongocrypt after fetching aws kms credentials (#​4057) (c604e74)
- NODE-6066: ClusterTime.signature can be undefined (#​4069) (ce55ca9)
Performance Improvements
- NODE-6127: move error construction into setTimeout callback ([#​4094](https://redirect.github.com/mongodb/node-mongodb-native/issues/40