shelfio / jest-mongodb

Jest preset for MongoDB in-memory server
MIT License
591 stars 83 forks source link

chore(deps): update dependency mongodb to v6.9.0 #464

Open renovate[bot] opened 4 months ago

renovate[bot] commented 4 months ago

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
mongodb 6.3.0 -> 6.9.0 age adoption passing confidence

Release Notes

mongodb/node-mongodb-native (mongodb) ### [`v6.9.0`](https://redirect.github.com/mongodb/node-mongodb-native/blob/HEAD/HISTORY.md#690-2024-09-12) [Compare Source](https://redirect.github.com/mongodb/node-mongodb-native/compare/v6.8.2...v6.9.0) ##### Features - **NODE-5459:** add durations to connection pool events ([#​4166](https://redirect.github.com/mongodb/node-mongodb-native/issues/4166)) ([7295695](https://redirect.github.com/mongodb/node-mongodb-native/commit/729569527e353a942200533f6150e748454c798d)) - **NODE-5614:** add support for explicit resource management ([#​4177](https://redirect.github.com/mongodb/node-mongodb-native/issues/4177)) ([b3f3987](https://redirect.github.com/mongodb/node-mongodb-native/commit/b3f3987041ddf0aae86044f3fdd1364eecd26d46)) - **NODE-5754:** allow auto select family options ([#​4185](https://redirect.github.com/mongodb/node-mongodb-native/issues/4185)) ([54efb7d](https://redirect.github.com/mongodb/node-mongodb-native/commit/54efb7d497f8efb9953f5d315267e299ed4cf5af)) - **NODE-5908:** support range v2 ([#​4141](https://redirect.github.com/mongodb/node-mongodb-native/issues/4141)) ([de253a7](https://redirect.github.com/mongodb/node-mongodb-native/commit/de253a749f1dd1194b6fbc30c36e88f906981bd3)) - **NODE-6225:** add property ownership check before referencing `mongocryptdSpawnPath` and `mongocryptdSpawnArgs` ([#​4151](https://redirect.github.com/mongodb/node-mongodb-native/issues/4151)) ([f48f8d3](https://redirect.github.com/mongodb/node-mongodb-native/commit/f48f8d36cf96c25ebf656e359e97b61dbfe7c4ed)) - **NODE-6244:** Bump max supported wire version and server version ([#​4163](https://redirect.github.com/mongodb/node-mongodb-native/issues/4163)) ([45bc098](https://redirect.github.com/mongodb/node-mongodb-native/commit/45bc0982f0f00e1811baf2a613989a808783b8b1)) - **NODE-6252:** insertMany and bulkWrite permit readonly arrays ([#​4175](https://redirect.github.com/mongodb/node-mongodb-native/issues/4175)) ([4b219d3](https://redirect.github.com/mongodb/node-mongodb-native/commit/4b219d361b6309dcec480c2bc7e54f548201c15b)) - **NODE-6278:** deprecate 3.6 servers ([#​4178](https://redirect.github.com/mongodb/node-mongodb-native/issues/4178)) ([35d8840](https://redirect.github.com/mongodb/node-mongodb-native/commit/35d88404aad343dfbff502fd350bb22a241fed2a)) - **NODE-6309:** Mark range API as stable ([#​4190](https://redirect.github.com/mongodb/node-mongodb-native/issues/4190)) ([f53e9d9](https://redirect.github.com/mongodb/node-mongodb-native/commit/f53e9d9cebdfaac5edd0e46ee46f1c2eb5b7f8ae)) - **NODE-6327:** new client bulk write types and builders ([#​4205](https://redirect.github.com/mongodb/node-mongodb-native/issues/4205)) ([6d65ae7](https://redirect.github.com/mongodb/node-mongodb-native/commit/6d65ae77835cf144b540a5a344e1f10bb1988bc5)) - **NODE-6365:** pass through `allowPartialTrustChain` TLS flag ([#​4228](https://redirect.github.com/mongodb/node-mongodb-native/issues/4228)) ([d6c147d](https://redirect.github.com/mongodb/node-mongodb-native/commit/d6c147d62a9aa96f0807e190190a06ed880df07f)) ##### Bug Fixes - **NODE-5720:** on pre-4.4 sharded servers, the node driver uses `error.writeConcern.code` to determine retryability ([#​4155](https://redirect.github.com/mongodb/node-mongodb-native/issues/4155)) ([b26c328](https://redirect.github.com/mongodb/node-mongodb-native/commit/b26c32800ecb2658a0d9c779bdb741aa06a629d0)) - **NODE-6241:** allow Binary as local kms provider key for auto encryption ([#​4165](https://redirect.github.com/mongodb/node-mongodb-native/issues/4165)) ([d85f827](https://redirect.github.com/mongodb/node-mongodb-native/commit/d85f827aca56603b5d7b64f853c190473be81b6f)) - **NODE-6259:** replace dynamically assigned length property with a static getter ([#​4173](https://redirect.github.com/mongodb/node-mongodb-native/issues/4173)) ([320dde0](https://redirect.github.com/mongodb/node-mongodb-native/commit/320dde04aa1547dd838e7c790bb3432e2ca2bc19)) - **NODE-6276:** preserve top level error code MongoWriteConcernError ([#​4183](https://redirect.github.com/mongodb/node-mongodb-native/issues/4183)) ([e902584](https://redirect.github.com/mongodb/node-mongodb-native/commit/e9025843e43bedb2326675184b6ce49b103e3c77)) - **NODE-6284:** make sparsity and trimFactor optional ([#​4189](https://redirect.github.com/mongodb/node-mongodb-native/issues/4189)) ([8622545](https://redirect.github.com/mongodb/node-mongodb-native/commit/8622545c18d321ae17184cd43207652e454170fc)) - **NODE-6355:** respect utf8 validation options when iterating cursors ([#​4214](https://redirect.github.com/mongodb/node-mongodb-native/issues/4214)) ([8bfe187](https://redirect.github.com/mongodb/node-mongodb-native/commit/8bfe18716197f58c025520da5d771b520e1b1350)) - **NODE-6362:** cache cursor deserialization options across deserialize calls ([#​4221](https://redirect.github.com/mongodb/node-mongodb-native/issues/4221)) ([833eaa4](https://redirect.github.com/mongodb/node-mongodb-native/commit/833eaa41c5f379268be46408282b0c97323ea1bc)) - **NODE-6367:** enable mixed use of iteration APIs ([#​4231](https://redirect.github.com/mongodb/node-mongodb-native/issues/4231)) ([08912c8](https://redirect.github.com/mongodb/node-mongodb-native/commit/08912c8a191937bdef921b4e9a4581b12ebf8b59)) ##### Performance Improvements - **NODE-5906:** optimize toArray to use batches ([#​4171](https://redirect.github.com/mongodb/node-mongodb-native/issues/4171)) ([5565d50](https://redirect.github.com/mongodb/node-mongodb-native/commit/5565d5008812f03e9ff86a7b6326447ac5916244)) ### [`v6.8.2`](https://redirect.github.com/mongodb/node-mongodb-native/releases/tag/v6.8.2) [Compare Source](https://redirect.github.com/mongodb/node-mongodb-native/compare/v6.8.1...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. ```ts const firstDoc = await cursor.next(); for await (const doc of cursor) { // process doc // ... } ``` ##### Bug Fixes - **NODE-6367:** enable mixed use of iteration APIs ([#​4234](https://redirect.github.com/mongodb/node-mongodb-native/issues/4234)) ([d63bf6f](https://redirect.github.com/mongodb/node-mongodb-native/commit/d63bf6fae303ec921335c363865e86c912286d6c)) #### Documentation - [Reference](https://docs.mongodb.com/drivers/node/current/) - [API](https://mongodb.github.io/node-mongodb-native/6.8/) - [Changelog](https://redirect.github.com/mongodb/node-mongodb-native/blob/v6.8.2/HISTORY.md) We invite you to try the `mongodb` library immediately, and report any issues to the [NODE project](https://jira.mongodb.org/projects/NODE). ### [`v6.8.1`](https://redirect.github.com/mongodb/node-mongodb-native/compare/v6.8.0...0c6dbada1512ed1b2f217ceb07d446ce5cbd27b7) [Compare Source](https://redirect.github.com/mongodb/node-mongodb-native/compare/v6.8.0...v6.8.1) ### [`v6.8.0`](https://redirect.github.com/mongodb/node-mongodb-native/blob/HEAD/HISTORY.md#680-2024-06-27) [Compare Source](https://redirect.github.com/mongodb/node-mongodb-native/compare/v6.7.0...v6.8.0) ##### Features - **NODE-5718:** add ReadConcernMajorityNotAvailableYet to retryable errors ([#​4154](https://redirect.github.com/mongodb/node-mongodb-native/issues/4154)) ([4f32dec](https://redirect.github.com/mongodb/node-mongodb-native/commit/4f32decc354b222a6fe824a668d0b7b9db930f5f)) - **NODE-5801:** allow multiple providers providers per type ([#​4137](https://redirect.github.com/mongodb/node-mongodb-native/issues/4137)) ([4d209ce](https://redirect.github.com/mongodb/node-mongodb-native/commit/4d209ce7aa92ac543f6b106d94a65508858ccf51)) - **NODE-5853:** support delegated KMIP data key option ([#​4129](https://redirect.github.com/mongodb/node-mongodb-native/issues/4129)) ([aa429f8](https://redirect.github.com/mongodb/node-mongodb-native/commit/aa429f8c471b6ac23d9ffc33c9d40e1dc116c75b)) - **NODE-6136:** parse cursor responses on demand ([#​4112](https://redirect.github.com/mongodb/node-mongodb-native/issues/4112)) ([3ed6a2a](https://redirect.github.com/mongodb/node-mongodb-native/commit/3ed6a2adf552159bc8526b096ace59f0d5800c96)) - **NODE-6157:** add signature to github releases ([#​4119](https://redirect.github.com/mongodb/node-mongodb-native/issues/4119)) ([f38c5fe](https://redirect.github.com/mongodb/node-mongodb-native/commit/f38c5fe3990f279194523c906dc646bbcc29cbe9)) ##### Bug Fixes - **NODE-5801:** use more specific key typing for multiple KMS provider support ([#​4146](https://redirect.github.com/mongodb/node-mongodb-native/issues/4146)) ([465ffd9](https://redirect.github.com/mongodb/node-mongodb-native/commit/465ffd97974b40e2bf2608907455c00c58c59cff)) - **NODE-6085:** add TS support for KMIP data key options ([#​4128](https://redirect.github.com/mongodb/node-mongodb-native/issues/4128)) ([f790cc1](https://redirect.github.com/mongodb/node-mongodb-native/commit/f790cc181d87049e0018e1e5e859f90ee8156c0d)) - **NODE-6241:** allow `Binary` as local KMS provider key ([#​4160](https://redirect.github.com/mongodb/node-mongodb-native/issues/4160)) ([fb724eb](https://redirect.github.com/mongodb/node-mongodb-native/commit/fb724eb6441408ad7f93c50d146a12c9b64d8333)) - **NODE-6242:** close becomes true after calling close when documents still remain ([#​4161](https://redirect.github.com/mongodb/node-mongodb-native/issues/4161)) ([e3d70c3](https://redirect.github.com/mongodb/node-mongodb-native/commit/e3d70c3d224e1cd0888d79516c1b509921ac560d)) ### [`v6.7.0`](https://redirect.github.com/mongodb/node-mongodb-native/blob/HEAD/HISTORY.md#670-2024-05-29) [Compare Source](https://redirect.github.com/mongodb/node-mongodb-native/compare/v6.6.2...v6.7.0) ##### Features - **NODE-5464:** OIDC machine and callback workflow ([#​3912](https://redirect.github.com/mongodb/node-mongodb-native/issues/3912)) ([2ba8434](https://redirect.github.com/mongodb/node-mongodb-native/commit/2ba8434d10aa02ddf281482cc02ef168c1b2965c)) ##### Bug Fixes - **NODE-6165:** useBigInt64 causes compareTopologyVersion to throw ([#​4109](https://redirect.github.com/mongodb/node-mongodb-native/issues/4109)) ([21b729b](https://redirect.github.com/mongodb/node-mongodb-native/commit/21b729b983e2ddbe1dd9cff31f996825a45ec4e0)) ### [`v6.6.2`](https://redirect.github.com/mongodb/node-mongodb-native/blob/HEAD/HISTORY.md#662-2024-05-15) [Compare Source](https://redirect.github.com/mongodb/node-mongodb-native/compare/v6.6.1...v6.6.2) ##### Bug Fixes - **NODE-6171:** RTT set to zero when serverMonitoringMode=stream ([#​4110](https://redirect.github.com/mongodb/node-mongodb-native/issues/4110)) ([7a7ec5b](https://redirect.github.com/mongodb/node-mongodb-native/commit/7a7ec5b95d0c38b377551c31d03130cd9f1882f6)) ### [`v6.6.1`](https://redirect.github.com/mongodb/node-mongodb-native/blob/HEAD/HISTORY.md#661-2024-05-06) [Compare Source](https://redirect.github.com/mongodb/node-mongodb-native/compare/v6.6.0...v6.6.1) ##### Bug Fixes - **NODE-6151:** MongoClient connect does not keep Node.js running ([#​4101](https://redirect.github.com/mongodb/node-mongodb-native/issues/4101)) ([7e0d9e6](https://redirect.github.com/mongodb/node-mongodb-native/commit/7e0d9e689859e20ad0fd7aae047fc349e24355c9)) ### [`v6.6.0`](https://redirect.github.com/mongodb/node-mongodb-native/releases/tag/v6.6.0) [Compare Source](https://redirect.github.com/mongodb/node-mongodb-native/compare/v6.5.0...v6.6.0) The MongoDB Node.js team is pleased to announce version 6.6.0 of the `mongodb` package! #### Release Notes ##### Aggregation pipelines can now add stages manually When creating an aggregation pipeline cursor, a new generic method `addStage()` has been added in the fluid API for users to add [aggregation pipeline stages](https://www.mongodb.com/docs/manual/reference/operator/aggregation-pipeline/) in a general manner. ```ts const documents = await users.aggregate().addStage({ $project: { name: true } }).toArray(); ``` Thank you [@​prenaissance](https://redirect.github.com/prenaissance) for contributing this feature! ##### cause and package name included for `MongoMissingDependencyErrors` `MongoMissingDependencyError`s now include a `cause` and a `dependencyName` field, which can be used to programmatically determine which package is missing and why the driver failed to load it. For example: MongoMissingDependencyError: The iHateJavascript module does not exist at findOne (mongodb/main.js:7:11) at Object. (mongodb/main.js:14:1) ... 3 lines matching cause stack trace ... at Module._load (node:internal/modules/cjs/loader:1021:12) { dependencyName: 'iHateJavascript', [Symbol(errorLabels)]: Set(0) {}, [cause]: Error: Cannot find module 'iHateJavascript' Require stack: - mongodb/main.js at require (node:internal/modules/helpers:179:18) at findOne (mongodb/main.js:5:5) at Object. (mongodb/main.js:14:1) { code: 'MODULE_NOT_FOUND', requireStack: [ 'mongodb/main.js' ] } } ##### `ServerDescription` Round Trip Time (RTT) measurement changes ##### (1) `ServerDescription.roundTripTime` is now a moving average Previously, `ServerDescription.roundTripTime` was calculated as a weighted average of the most recently observed heartbeat duration and the previous duration. This update changes this behaviour to average `ServerDescription.roundTripTime` over the last 10 observed heartbeats. This should reduce the likelihood that the selected server changes as a result of momentary spikes in server latency. ##### (2) Added `minRoundTripTime` to `ServerDescription` A new `minRoundTripTime` property is now available on the `ServerDescription` class which gives the minimum RTT over the last 10 heartbeats. Note that this value will be reported as 0 when fewer than 2 samples have been observed. ##### `type` supported in `SearchIndexDescription` It is now possible to specify the type of a search index when [creating a search index](https://www.mongodb.com/docs/atlas/atlas-search/create-index/): ```typescript const indexName = await collection.createSearchIndex({ name: 'my-vector-search-index', // new! specifies that a `vectorSearch` index is created type: 'vectorSearch', definition: { mappings: { dynamic: false } } }); ``` ##### `Collection.findOneAndModify`'s `UpdateFilter.$currentDate` no longer throws on collections with limited schema Example: ```typescript // collection has no schema collection.update( $currentData: { lastModified: true } // no longer throws a TS error ); ``` ##### `TopologyDescription` now properly stringifies itself to JSON The `TopologyDescription` class is exposed by the driver in server selection errors and topology monitoring events to provide insight into the driver's current representation of the server's topology and to aid in debugging. However, the TopologyDescription uses `Map`s internally, which get serialized to `{}` when JSON stringified. We recommend using Node's `util.inspect()` helper to print topology descriptions because `inspect` properly handles all JS types and all types we use in the driver. However, if JSON must be used, the `TopologyDescription` now provides a custom `toJSON()` hook: ```typescript client.on('topologyDescriptionChanged', ({ newDescription }) => { // recommended! console.log('topology description changed', inspect(newDescription, { depth: Infinity, colors: true })) // now properly prints the entire topology description console.log('topology description changed', JSON.stringify(newDescription)) }); ``` ##### Omit `readConcern` and `writeConcern` in `Collection.listSearchIndexes` options argument > \[!Important]\ > `readConcern` and `writeConcern` are no longer viable keys in the options argument passed into `Collection.listSearchIndexes` This type change is a correctness fix. `Collection.listSearchIndexes` is an Atlas specific method, and Atlas' search indexes do not support `readConcern` and `writeConcern` options. The types for this function now reflect this functionality. ##### Don't throw error when non-read operation in a transaction has a `ReadPreferenceMode` other than `'primary'` The following error will now only be thrown when a user provides a `ReadPreferenceMode` other than `primary` and then tries to perform a command that involves a read: ```javascript new MongoTransactionError('Read preference in a transaction must be primary'); ``` Prior to this change, the Node Driver would incorrectly throw this error even when the operation does not perform a read. Note: a `RunCommandOperation` is treated as a read operation for this error. ##### `TopologyDescription.error` type is `MongoError` > \[!Important]\ > The `TopologyDescription.error` property type is now `MongoError` rather than `MongoServerError`. This type change is a correctness fix. Before this change, the following errors that were not instances of `MongoServerError` were already passed into `TopologyDescription.error` at runtime: - `MongoNetworkError` (excluding `MongoNetworkRuntimeError`) - `MongoError` with a `MongoErrorLabel.HandshakeError` label ##### `indexExists()` no longer supports the `full` option The `Collection.indexExists()` helper supported an option, `full`, that modified the internals of the method. When `full` was set to `true`, the driver would always return `false`, regardless of whether or not the index exists. The `full` option is intended to modify the return type of index enumeration APIs (`Collection.indexes()` and `Collection.indexInformation()`, but since the return type of `Collection.indexExists()` this option does not make sense for the `Collection.indexExists()` helper. We have removed support for this option. ##### `indexExists()`, `indexes()` and `indexInformation()` support cursor options in Typescript These APIs have supported cursor options at runtime since the 4.x version of the driver, but our Typescript has incorrectly omitted cursor options from these APIs. ##### Index information helpers have accurate Typescript return types `Collection.indexInformation()`, `Collection.indexes()` and `Db.indexInformation()` are helpers that return index information for a given collection or database. These helpers take an option, `full`, that configures whether the return value contains full index descriptions or a compact summary: ```typescript collection.indexes({ full: true }); // returns an array of index descriptions collection.indexes({ full: false }); // returns an object, mapping index names to index keys ``` However, the Typescript return type of these helpers was always `Document`. Thanks to [@​prenaissance](https://redirect.github.com/prenaissance), these helpers now have accurate type information! The helpers return a new type, `IndexDescriptionCompact | IndexDescriptionInfo[]`, which accurately reflects the return type of these helpers. The helpers also support type narrowing by providing a boolean literal as an option to the API: ```typescript collection.indexes(); // returns `IndexDescriptionCompact | IndexDescriptionInfo[]` collection.indexes({ full: false }); // returns an `IndexDescriptionCompact` collection.indexes({ full: true }); // returns an `IndexDescriptionInfo[]` collection.indexInfo(); // returns `IndexDescriptionCompact | IndexDescriptionInfo[]` collection.indexInfo({ full: false }); // returns an `IndexDescriptionCompact` collection.indexInfo({ full: true }); // returns an `IndexDescriptionInfo[]` db.indexInfo(); // returns `IndexDescriptionCompact | IndexDescriptionInfo[]` db.indexInfo({ full: false }); // returns an `IndexDescriptionCompact` db.indexInfo({ full: true }); // returns an `IndexDescriptionInfo[]` ``` ##### AWS credentials with expirations no longer throw when using on-demand AWS KMS credentials In addition to letting users provide KMS credentials manually, client-side encryption supports fetching AWS KMS credentials on-demand using the AWS SDK. However, AWS credential mechanisms that returned access keys with expiration timestamps caused the driver to throw an error. The driver will no longer throw an error when receiving an expiration token from the AWS SDK. ##### `ClusterTime` interface `signature` optionality The `ClusterTime` interface incorrectly reported the `signature` field as required, [the server may omit it](https://redirect.github.com/mongodb/mongo/blob/r8.0.0-rc4/src/mongo/db/vector_clock.idl#L47-L58), so the typescript has been updated to reflect reality. #### Summary ##### Features - **NODE-3639:** add a general stage to the aggregation pipeline builder ([#​4079](https://redirect.github.com/mongodb/node-mongodb-native/issues/4079)) ([8fca1aa](https://redirect.github.com/mongodb/node-mongodb-native/commit/8fca1aaaeb611e26745c837868b7e7f47b287ad5)) - **NODE-5678:** add options parsing support for `timeoutMS` and `defaultTimeoutMS` ([#​4068](https://redirect.github.com/mongodb/node-mongodb-native/issues/4068)) ([ddd1e81](https://redirect.github.com/mongodb/node-mongodb-native/commit/ddd1e81c970ae16b8b7adc7045832462d283e43c)) - **NODE-5762:** include `cause` and package name for all `MongoMissingDependencyError`s ([#​4067](https://redirect.github.com/mongodb/node-mongodb-native/issues/4067)) ([62ea94b](https://redirect.github.com/mongodb/node-mongodb-native/commit/62ea94b9f529d1b850c77fb5219014159b4d27ab)) - **NODE-5825:** add `minRoundTripTime` to `ServerDescription` and change `roundTripTime` to a moving average ([#​4059](https://redirect.github.com/mongodb/node-mongodb-native/issues/4059)) ([0e3d6ea](https://redirect.github.com/mongodb/node-mongodb-native/commit/0e3d6ead735ed067bd044c8d0c9c307d970f1986)) - **NODE-5919:** support new `type` option in create search index helpers ([#​4060](https://redirect.github.com/mongodb/node-mongodb-native/issues/4060)) ([3598c23](https://redirect.github.com/mongodb/node-mongodb-native/commit/3598c23bff588f4f05f0f456261eb558d6f48cbf)) - **NODE-6020:** upgrade `bson` to ^6.5.0 ([#​4035](https://redirect.github.com/mongodb/node-mongodb-native/issues/4035)) ([8ab2055](https://redirect.github.com/mongodb/node-mongodb-native/commit/8ab205569436a629f8b7b8bbc7f6cb29a3939864)) - **NODE-6149:** upgrade `bson` to ^6.7.0 ([#​4099](https://redirect.github.com/mongodb/node-mongodb-native/pull/4099)) ([7f191cf](https://redirect.github.com/mongodb/node-mongodb-native/commit/7f191cf85631408a384be2afd7f6171dfe832f77)) ##### Bug Fixes - **NODE-3681:** Typescript error in `Collection.findOneAndModify` `UpdateFilter.$currentDate` ([#​4047](https://redirect.github.com/mongodb/node-mongodb-native/issues/4047)) ([a8670a7](https://redirect.github.com/mongodb/node-mongodb-native/commit/a8670a76cd2746e8353504c100050b474d844f36)) - **NODE-5530:** make topology descriptions JSON stringifiable ([#​4070](https://redirect.github.com/mongodb/node-mongodb-native/issues/4070)) ([3a0e011](https://redirect.github.com/mongodb/node-mongodb-native/commit/3a0e01191be5836c4d41bd92c5cc64141b531dda)) - **NODE-5745:** ignore Read/Write Concern in Atlas Search Index Helpers ([#​4042](https://redirect.github.com/mongodb/node-mongodb-native/issues/4042)) ([67d7bab](https://redirect.github.com/mongodb/node-mongodb-native/commit/67d7bab434164fa9a81e22edde9339f89be91f65)) - **NODE-5925:** driver throws error when non-read operation in a transaction has a `ReadPreferenceMode` other than `primary` ([#​4075](https://redirect.github.com/mongodb/node-mongodb-native/issues/4075)) ([39fc198](https://redirect.github.com/mongodb/node-mongodb-native/commit/39fc198b8fd2baed17c3aec223ca43094bb1c147)) - **NODE-5971:** attach `v` to `createIndexes` command when `version` is specified ([#​4043](https://redirect.github.com/mongodb/node-mongodb-native/issues/4043)) ([1879a04](https://redirect.github.com/mongodb/node-mongodb-native/commit/1879a04b9053e8c77c6957e415886c534fe9992b)) - **NODE-5999:** Change `TopologyDescription.error` type to `MongoError` ([#​4028](https://redirect.github.com/mongodb/node-mongodb-native/issues/4028)) ([30432e8](https://redirect.github.com/mongodb/node-mongodb-native/commit/30432e8664cb142e999159e5d06ceaaf14f51eb8)) - **NODE-6019:** indexExists always returns false when `full` is set to `true` ([#​4034](https://redirect.github.com/mongodb/node-mongodb-native/issues/4034)) ([0ebc1ac](https://redirect.github.com/mongodb/node-mongodb-native/commit/0ebc1ac099a2ee869d8c1cb1c7632422c4e6a7ba)) - **NODE-6029:** update types for collection listing indexes ([#​4072](https://redirect.github.com/mongodb/node-mongodb-native/issues/4072)) ([232bf3c](https://redirect.github.com/mongodb/node-mongodb-native/commit/232bf3cb9e41b717680ad0a5678bbc16d3cc243f)) - **NODE-6051:** only provide expected allowed keys to `libmongocrypt` after fetching AWS KMS credentials ([#​4057](https://redirect.github.com/mongodb/node-mongodb-native/issues/4057)) ([c604e74](https://redirect.github.com/mongodb/node-mongodb-native/commit/c604e74e2ca0bcf827441558e40cecbaf9f4fe94)) - **NODE-6066:** `ClusterTime.signature` can be undefined ([#​4069](https://redirect.github.com/mongodb/node-mongodb-native/issues/4069)) ([ce55ca9](https://redirect.github.com/mongodb/node-mongodb-native/commit/ce55ca9f5c7ea81058627b60e2cec5482d2be1f6)) ##### Performance Improvements - **NODE-6127:** move error construction into `setTimeout` callback ([#​4094](https://redirect.github.com/mongodb/node-mongodb-native/issues/4094)) ([6abc074](https://redirect.github.com/mongodb/node-mongodb-native/commit/6abc074b3b1f2bbcc5d7252ab4cbfbd729fb4eb2)) #### Documentation - [Reference](https://docs.mongodb.com/drivers/node/current/) - [API](https://mongodb.github.io/node-mongodb-native/6.6/) - [Changelog](https://redirect.github.com/mongodb/node-mongodb-native/blob/v6.6.0/HISTORY.md) We invite you to try the `mongodb` library immediately, and report any issues to the [NODE project](https://jira.mongodb.org/projects/NODE). ### [`v6.5.0`](https://redirect.github.com/mongodb/node-mongodb-native/blob/HEAD/HISTORY.md#650-2024-03-11) [Compare Source](https://redirect.github.com/mongodb/node-mongodb-native/compare/v6.4.0...v6.5.0) ##### Features - **NODE-5968:** container and Kubernetes awareness in client metadata ([#​4005](https://redirect.github.com/mongodb/node-mongodb-native/issues/4005)) ([28b7040](https://redirect.github.com/mongodb/node-mongodb-native/commit/28b70408d0153e6b1118f3dd9cfbcfa30abe29f0)) - **NODE-5988:** Provide access to raw results doc on MongoServerError ([#​4016](https://redirect.github.com/mongodb/node-mongodb-native/issues/4016)) ([c023242](https://redirect.github.com/mongodb/node-mongodb-native/commit/c02324218db18e7c51f5b775f35edacc084762b0)) - **NODE-6008:** deprecate CloseOptions interface ([#​4030](https://redirect.github.com/mongodb/node-mongodb-native/issues/4030)) ([f6cd8d9](https://redirect.github.com/mongodb/node-mongodb-native/commit/f6cd8d991b8dc8ca6d28964e46839c79727de669)) ##### Bug Fixes - **NODE-5636:** generate \_ids using pkFactory in bulk write operations ([#​4025](https://redirect.github.com/mongodb/node-mongodb-native/issues/4025)) ([fbb5059](https://redirect.github.com/mongodb/node-mongodb-native/commit/fbb505906cc171ae01279025d42f6ea1c3e7e299)) - **NODE-5981:** read preference not applied to commands properly ([#​4010](https://redirect.github.com/mongodb/node-mongodb-native/issues/4010)) ([937c9c8](https://redirect.github.com/mongodb/node-mongodb-native/commit/937c9c890b6ad9be04823702b1b92b548ef4de9b)) - **NODE-5985:** throw Nodejs' certificate expired error when TLS fails to connect instead of `CERT_HAS_EXPIRED` ([#​4014](https://redirect.github.com/mongodb/node-mongodb-native/issues/4014)) ([057c223](https://redirect.github.com/mongodb/node-mongodb-native/commit/057c223f13a0d129aa9efc01ba3c9b48271e7b97)) - **NODE-5993:** memory leak in the `Connection` class ([#​4022](https://redirect.github.com/mongodb/node-mongodb-native/issues/4022)) ([69de253](https://redirect.github.com/mongodb/node-mongodb-native/commit/69de2537314fe25a5c3fa83f73235cfa7e7f729d)) ##### Performance Improvements - **NODE-5986:** parallelize SRV/TXT resolution ([#​4012](https://redirect.github.com/mongodb/node-mongodb-native/issues/4012)) ([eab8f23](https://redirect.github.com/mongodb/node-mongodb-native/commit/eab8f2338622218a1e57121a31cad493f462931b)) ### [`v6.4.0`](https://redirect.github.com/mongodb/node-mongodb-native/blob/HEAD/HISTORY.md#640-2024-02-29) [Compare Source](https://redirect.github.com/mongodb/node-mongodb-native/compare/v6.3.0...v6.4.0) ##### Features - **NODE-3449:** Add serverConnectionId to Command Monitoring Spec ([735f7aa](https://redirect.github.com/mongodb/node-mongodb-native/commit/735f7aa17c2403044c015c0eb0fc7e4be08c0983)) - **NODE-3470:** retry selects another mongos ([#​3963](https://redirect.github.com/mongodb/node-mongodb-native/issues/3963)) ([84959ee](https://redirect.github.com/mongodb/node-mongodb-native/commit/84959ee27135abd04e4009b0adfebc7889d9139f)) - **NODE-3689:** require hello command for connection handshake to use OP_MSG disallowing OP_QUERY ([#​3938](https://redirect.github.com/mongodb/node-mongodb-native/issues/3938)) ([ce7df0f](https://redirect.github.com/mongodb/node-mongodb-native/commit/ce7df0f79ed764d4a36caf1562cea4f5015c0ea6)) - **NODE-4686:** Add log messages to CLAM ([#​3955](https://redirect.github.com/mongodb/node-mongodb-native/issues/3955)) ([e3bfa30](https://redirect.github.com/mongodb/node-mongodb-native/commit/e3bfa30eefe6b0a79141b32029d8e44d426275d6)) - **NODE-4687:** Add logging to server selection ([#​3946](https://redirect.github.com/mongodb/node-mongodb-native/issues/3946)) ([7f3ce0b](https://redirect.github.com/mongodb/node-mongodb-native/commit/7f3ce0bb8d4173739e5a3ffe9041dd11b28f9b08)) - **NODE-4719:** add SDAM Logging Spec ([#​3940](https://redirect.github.com/mongodb/node-mongodb-native/issues/3940)) ([a3c0298](https://redirect.github.com/mongodb/node-mongodb-native/commit/a3c02983bc9cead125373d86a5c47cf8f4e40f9e)) - **NODE-4847:** Add config error handling to logging ([#​3970](https://redirect.github.com/mongodb/node-mongodb-native/issues/3970)) ([8f7bb59](https://redirect.github.com/mongodb/node-mongodb-native/commit/8f7bb593cbd1b2cd69c76702dbd1125479d1055a)) - **NODE-5717:** make ExceededTimeLimit retryable reads error ([#​3947](https://redirect.github.com/mongodb/node-mongodb-native/issues/3947)) ([106ab09](https://redirect.github.com/mongodb/node-mongodb-native/commit/106ab092d0fe184509551c55b6b0fe817fa6ba21)) - **NODE-5885:** upgrade BSON to `^6.3.0` ([#​3983](https://redirect.github.com/mongodb/node-mongodb-native/issues/3983)) ([9401d09](https://redirect.github.com/mongodb/node-mongodb-native/commit/9401d09af4def8bfbeff65e70863be5d13b3dd61)) - **NODE-5939:** Implement 6.x: cache the AWS credentials provider in the MONGODB-AWS auth logic ([#​3991](https://redirect.github.com/mongodb/node-mongodb-native/issues/3991)) ([e0a37e5](https://redirect.github.com/mongodb/node-mongodb-native/commit/e0a37e594919d173762b0c64a24bb0291b159fa5)) - **NODE-5978:** upgrade BSON to ^6.4.0 ([#​4007](https://redirect.github.com/mongodb/node-mongodb-native/issues/4007)) ([90f2f70](https://redirect.github.com/mongodb/node-mongodb-native/commit/90f2f70ba61e598fd3c69c1e2a5ae4297fe8f333)) ##### Bug Fixes - **NODE-5127:** implement reject kmsRequest on server close ([#​3964](https://redirect.github.com/mongodb/node-mongodb-native/issues/3964)) ([568e05f](https://redirect.github.com/mongodb/node-mongodb-native/commit/568e05fdc3d78882e925e8e799aca6fb86c88295)) - **NODE-5609:** node driver omits base64 padding in sasl-continue command ([#​3975](https://redirect.github.com/mongodb/node-mongodb-native/issues/3975)) ([b7d28d3](https://redirect.github.com/mongodb/node-mongodb-native/commit/b7d28d3135fa298d693aa22d2f1713054c5b0751)) - **NODE-5765:** change type for countDocuments ([#​3932](https://redirect.github.com/mongodb/node-mongodb-native/issues/3932)) ([22cae0f](https://redirect.github.com/mongodb/node-mongodb-native/commit/22cae0fbc0ad4043e27210577427870b8ec287f5)) - **NODE-5791:** type error with $addToSet in bulkWrite ([#​3953](https://redirect.github.com/mongodb/node-mongodb-native/issues/3953)) ([b93d405](https://redirect.github.com/mongodb/node-mongodb-native/commit/b93d405275c3a8ce6b1eba0af335ffb2a309e34e)) - **NODE-5818:** Add feature flagging to server selection logging ([#​3974](https://redirect.github.com/mongodb/node-mongodb-native/issues/3974)) ([55203ef](https://redirect.github.com/mongodb/node-mongodb-native/commit/55203ef53d085518fd0acaf4b23d4a987cf6736d)) - **NODE-5839:** support for multibyte code-points in stringifyWithMaxLen ([#​3979](https://redirect.github.com/mongodb/node-mongodb-native/issues/3979)) ([aed1cf0](https://redirect.github.com/mongodb/node-mongodb-native/commit/aed1cf0d2b1083e24997e49bfe7f5416e944466e)) - **NODE-5840:** heartbeat duration includes socket creation ([#​3973](https://redirect.github.com/mongodb/node-mongodb-native/issues/3973)) ([a42039b](https://redirect.github.com/mongodb/node-mongodb-native/commit/a42039b9d03f1fc4d58f6edc641a839bc0364cd2)) - **NODE-5901:** propagate errors to transformed stream in cursor ([#​3985](https://redirect.github.com/mongodb/node-mongodb-native/issues/3985)) ([ecfc615](https://redirect.github.com/mongodb/node-mongodb-native/commit/ecfc6157786360832d1afb4294d76f83a90a9d70)) - **NODE-5944:** make AWS session token optional ([#​4002](https://redirect.github.com/mongodb/node-mongodb-native/issues/4002)) ([f26de76](https://redirect.github.com/mongodb/node-mongodb-native/commit/f26de764c7ee5034992ec5978175fc50f29fc690)) ##### Performance Improvements - **NODE-5771:** improve new connection ([#​3948](https://redirect.github.com/mongodb/node-mongodb-native/issues/3948)) ([a4776cf](https://redirect.github.com/mongodb/node-mongodb-native/commit/a4776cfe638c4e51cb690e43b941153d4f36a30a)) - **NODE-5854:** Conditional logger instantiation and precompute willLog perf fix ([#​3984](https://redirect.github.com/mongodb/node-mongodb-native/issues/3984)) ([a63fbc2](https://redirect.github.com/mongodb/node-mongodb-native/commit/a63fbc2a98a2b0ed88bfe2cd5f59e9feee97820b)) - **NODE-5928:** consolidate signal use and abort promise wrap ([#​3992](https://redirect.github.com/mongodb/node-mongodb-native/issues/3992)) ([38742c2](https://redirect.github.com/mongodb/node-mongodb-native/commit/38742c2849d00e6a6070329b5c6a19704f40eb89))

Configuration

📅 Schedule: Branch creation - "before 6am on Thursday,before 10am on Sunday" in timezone Europe/Kiev, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.



This PR was generated by Mend Renovate. View the repository job log.