diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8d9ea6af1f..aeda91d847 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "6.20.0" + ".": "7.0.0" } diff --git a/HISTORY.md b/HISTORY.md index e479b80b73..201d60f416 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -2,6 +2,176 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [7.0.0](https://github.com/mongodb-js/node-mongodb-native/compare/v6.20.0...v7.0.0) (2025-10-04) + + +### ⚠ BREAKING CHANGES + +* **NODE-6065:** throw MongoRuntimeError instead of MissingDependencyError in crypto connection ([#4711](https://github.com/mongodb-js/node-mongodb-native/issues/4711)) +* **NODE-6584:** improve typing for filepaths in AutoEncryptionOptions ([#4341](https://github.com/mongodb-js/node-mongodb-native/issues/4341)) +* **NODE-6334:** rename PoolRequstedRetry to PoolRequestedRetry ([#4696](https://github.com/mongodb-js/node-mongodb-native/issues/4696)) +* **NODE-7174:** drop support for Node16 and Node18 ([#4668](https://github.com/mongodb-js/node-mongodb-native/issues/4668)) +* **NODE-7047:** use custom credential provider first after URI ([#4656](https://github.com/mongodb-js/node-mongodb-native/issues/4656)) +* **NODE-6988:** require aws sdk for aws auth ([#4659](https://github.com/mongodb-js/node-mongodb-native/issues/4659)) + +### Features + +* **NODE-3639:** add a general stage to the aggregation pipeline builder ([#4079](https://github.com/mongodb-js/node-mongodb-native/issues/4079)) ([8fca1aa](https://github.com/mongodb-js/node-mongodb-native/commit/8fca1aaaeb611e26745c837868b7e7f47b287ad5)) +* **NODE-4179:** allow secureContext in KMS TLS options ([#4578](https://github.com/mongodb-js/node-mongodb-native/issues/4578)) ([0ea6eaa](https://github.com/mongodb-js/node-mongodb-native/commit/0ea6eaa82d56073f1a63d4168935d63a4a4e7a61)) +* **NODE-5055:** Add databaseName property to command monitoring events ([#4586](https://github.com/mongodb-js/node-mongodb-native/issues/4586)) ([3faf0c9](https://github.com/mongodb-js/node-mongodb-native/commit/3faf0c967cd47b7fa6143aff914b4d2c47a584b3)) +* **NODE-5459:** add durations to connection pool events ([#4166](https://github.com/mongodb-js/node-mongodb-native/issues/4166)) ([7295695](https://github.com/mongodb-js/node-mongodb-native/commit/729569527e353a942200533f6150e748454c798d)) +* **NODE-5464:** OIDC machine and callback workflow ([#3912](https://github.com/mongodb-js/node-mongodb-native/issues/3912)) ([2ba8434](https://github.com/mongodb-js/node-mongodb-native/commit/2ba8434d10aa02ddf281482cc02ef168c1b2965c)) +* **NODE-5614:** add support for explicit resource management ([#4177](https://github.com/mongodb-js/node-mongodb-native/issues/4177)) ([b3f3987](https://github.com/mongodb-js/node-mongodb-native/commit/b3f3987041ddf0aae86044f3fdd1364eecd26d46)) +* **NODE-5672:** support standardized logging ([#4387](https://github.com/mongodb-js/node-mongodb-native/issues/4387)) ([d1b2453](https://github.com/mongodb-js/node-mongodb-native/commit/d1b2453daeed50cd9edd5b8a631789a36429d6b2)) +* **NODE-5678:** add options parsing support for timeoutMS and defaultTimeoutMS ([#4068](https://github.com/mongodb-js/node-mongodb-native/issues/4068)) ([ddd1e81](https://github.com/mongodb-js/node-mongodb-native/commit/ddd1e81c970ae16b8b7adc7045832462d283e43c)) +* **NODE-5682:** set maxTimeMS on commands and preempt I/O ([#4174](https://github.com/mongodb-js/node-mongodb-native/issues/4174)) ([e4e6a5e](https://github.com/mongodb-js/node-mongodb-native/commit/e4e6a5e9bff4e30f67e728990012bf0e8ee3e1ff)) +* **NODE-5718:** add ReadConcernMajorityNotAvailableYet to retryable errors ([#4154](https://github.com/mongodb-js/node-mongodb-native/issues/4154)) ([4f32dec](https://github.com/mongodb-js/node-mongodb-native/commit/4f32decc354b222a6fe824a668d0b7b9db930f5f)) +* **NODE-5754:** allow auto select family options ([#4185](https://github.com/mongodb-js/node-mongodb-native/issues/4185)) ([54efb7d](https://github.com/mongodb-js/node-mongodb-native/commit/54efb7d497f8efb9953f5d315267e299ed4cf5af)) +* **NODE-5801:** allow multiple providers providers per type ([#4137](https://github.com/mongodb-js/node-mongodb-native/issues/4137)) ([4d209ce](https://github.com/mongodb-js/node-mongodb-native/commit/4d209ce7aa92ac543f6b106d94a65508858ccf51)) +* **NODE-5838:** remove support for server 3.6 ([#4182](https://github.com/mongodb-js/node-mongodb-native/issues/4182)) ([7b71e1f](https://github.com/mongodb-js/node-mongodb-native/commit/7b71e1fdc179a9e0628a6b23519e3c00acaadf22)) +* **NODE-5844:** add iscryptd to ServerDescription ([#4239](https://github.com/mongodb-js/node-mongodb-native/issues/4239)) ([c39d443](https://github.com/mongodb-js/node-mongodb-native/commit/c39d443027368f927e58fbabb88b50b8f3e2e8a8)) +* **NODE-5853:** support delegated KMIP data key option ([#4129](https://github.com/mongodb-js/node-mongodb-native/issues/4129)) ([aa429f8](https://github.com/mongodb-js/node-mongodb-native/commit/aa429f8c471b6ac23d9ffc33c9d40e1dc116c75b)) +* **NODE-5908:** support range v2 ([#4141](https://github.com/mongodb-js/node-mongodb-native/issues/4141)) ([de253a7](https://github.com/mongodb-js/node-mongodb-native/commit/de253a749f1dd1194b6fbc30c36e88f906981bd3)) +* **NODE-5919:** support new `type` option in create search index helpers ([#4060](https://github.com/mongodb-js/node-mongodb-native/issues/4060)) ([3598c23](https://github.com/mongodb-js/node-mongodb-native/commit/3598c23bff588f4f05f0f456261eb558d6f48cbf)) +* **NODE-6060:** set fire-and-forget protocol when writeConcern is w: 0 ([#4219](https://github.com/mongodb-js/node-mongodb-native/issues/4219)) ([643a875](https://github.com/mongodb-js/node-mongodb-native/commit/643a87553b5314abb44bcdc342a8bb8cb51d2052)) +* **NODE-6065:** throw MongoRuntimeError instead of MissingDependencyError in crypto connection ([#4711](https://github.com/mongodb-js/node-mongodb-native/issues/4711)) ([ff229fa](https://github.com/mongodb-js/node-mongodb-native/commit/ff229fa8e4c906f5980ee4311c0eb0d883909934)) +* **NODE-6069:** OIDC k8s machine workflow ([#4270](https://github.com/mongodb-js/node-mongodb-native/issues/4270)) ([82c931c](https://github.com/mongodb-js/node-mongodb-native/commit/82c931c704d30f1a9555519d1ac2c9e03a2e69c4)) +* **NODE-6090:** Implement CSOT logic for connection checkout and server selection ([bd8a9f4](https://github.com/mongodb-js/node-mongodb-native/commit/bd8a9f44f37159c494957cbe9d343b08d98bf128)) +* **NODE-6136:** parse cursor responses on demand ([#4112](https://github.com/mongodb-js/node-mongodb-native/issues/4112)) ([3ed6a2a](https://github.com/mongodb-js/node-mongodb-native/commit/3ed6a2adf552159bc8526b096ace59f0d5800c96)) +* **NODE-6141:** allow custom aws sdk config ([#4373](https://github.com/mongodb-js/node-mongodb-native/issues/4373)) ([3d047ed](https://github.com/mongodb-js/node-mongodb-native/commit/3d047ed19f6bf5c06e441fdf3a9c90b05ef9c15d)) +* **NODE-6157:** add signature to github releases ([#4119](https://github.com/mongodb-js/node-mongodb-native/issues/4119)) ([f38c5fe](https://github.com/mongodb-js/node-mongodb-native/commit/f38c5fe3990f279194523c906dc646bbcc29cbe9)) +* **NODE-6225:** add property ownership check before referencing `mongocryptdSpawnPath` and `mongocryptdSpawnArgs` ([#4151](https://github.com/mongodb-js/node-mongodb-native/issues/4151)) ([f48f8d3](https://github.com/mongodb-js/node-mongodb-native/commit/f48f8d36cf96c25ebf656e359e97b61dbfe7c4ed)) +* **NODE-6231:** Add CSOT behaviour for retryable reads and writes ([#4186](https://github.com/mongodb-js/node-mongodb-native/issues/4186)) ([2ffd5eb](https://github.com/mongodb-js/node-mongodb-native/commit/2ffd5eb125bc4b6e444458569728e8698bc71d1a)) +* **NODE-6244:** Bump max supported wire version and server version ([#4163](https://github.com/mongodb-js/node-mongodb-native/issues/4163)) ([45bc098](https://github.com/mongodb-js/node-mongodb-native/commit/45bc0982f0f00e1811baf2a613989a808783b8b1)) +* **NODE-6245:** add keepAliveInitialDelay config ([#4510](https://github.com/mongodb-js/node-mongodb-native/issues/4510)) ([d6c0eb3](https://github.com/mongodb-js/node-mongodb-native/commit/d6c0eb31c21fc89856c7c2a3cab7a8b22d23c267)) +* **NODE-6252:** insertMany and bulkWrite permit readonly arrays ([#4175](https://github.com/mongodb-js/node-mongodb-native/issues/4175)) ([4b219d3](https://github.com/mongodb-js/node-mongodb-native/commit/4b219d361b6309dcec480c2bc7e54f548201c15b)) +* **NODE-6258:** add signal support to find and aggregate ([#4364](https://github.com/mongodb-js/node-mongodb-native/issues/4364)) ([73def18](https://github.com/mongodb-js/node-mongodb-native/commit/73def18d3fa0aea1fdd5122088493f948addaa42)) +* **NODE-6274:** add CSOT support to bulkWrite ([#4250](https://github.com/mongodb-js/node-mongodb-native/issues/4250)) ([c5a9ae5](https://github.com/mongodb-js/node-mongodb-native/commit/c5a9ae55f8baecd0460bef688d66336bb1b86415)) +* **NODE-6275:** Add CSOT support to GridFS ([#4246](https://github.com/mongodb-js/node-mongodb-native/issues/4246)) ([3cb8187](https://github.com/mongodb-js/node-mongodb-native/commit/3cb8187057aba0bed57da0fef7ffad20d451a7d0)) +* **NODE-6278:** deprecate 3.6 servers ([#4178](https://github.com/mongodb-js/node-mongodb-native/issues/4178)) ([35d8840](https://github.com/mongodb-js/node-mongodb-native/commit/35d88404aad343dfbff502fd350bb22a241fed2a)) +* **NODE-6289:** allow valid srv hostnames with less than 3 parts ([#4197](https://github.com/mongodb-js/node-mongodb-native/issues/4197)) ([3d5bd51](https://github.com/mongodb-js/node-mongodb-native/commit/3d5bd513b590f8de91a3edb0a6d2a9d81a4666e2)) +* **NODE-6290:** add sort support to updateOne and replaceOne ([#4515](https://github.com/mongodb-js/node-mongodb-native/issues/4515)) ([28857b7](https://github.com/mongodb-js/node-mongodb-native/commit/28857b79898d6a6040b7d48f3781ebc2710f0279)) +* **NODE-6304:** add CSOT support for non-tailable cursors ([#4195](https://github.com/mongodb-js/node-mongodb-native/issues/4195)) ([131f6ed](https://github.com/mongodb-js/node-mongodb-native/commit/131f6ed63bef473b5e4ce1062c864c58a48bd092)) +* **NODE-6305:** Add CSOT support to tailable cursors ([#4218](https://github.com/mongodb-js/node-mongodb-native/issues/4218)) ([2398fc6](https://github.com/mongodb-js/node-mongodb-native/commit/2398fc6b4a13b6c615315df2a1b8b8ffb737d8c3)) +* **NODE-6309:** Mark range API as stable ([#4190](https://github.com/mongodb-js/node-mongodb-native/issues/4190)) ([f53e9d9](https://github.com/mongodb-js/node-mongodb-native/commit/f53e9d9cebdfaac5edd0e46ee46f1c2eb5b7f8ae)) +* **NODE-6312:** add error transformation for server timeouts ([#4192](https://github.com/mongodb-js/node-mongodb-native/issues/4192)) ([c2c0cb9](https://github.com/mongodb-js/node-mongodb-native/commit/c2c0cb9eb22adc2d61611d3aa965f9062f5089a0)) +* **NODE-6313:** add CSOT support to sessions and transactions ([#4199](https://github.com/mongodb-js/node-mongodb-native/issues/4199)) ([5f1102f](https://github.com/mongodb-js/node-mongodb-native/commit/5f1102f0e9cd8de908a33f615cd03a4fefc9d916)) +* **NODE-6327:** new client bulk write types and builders ([#4205](https://github.com/mongodb-js/node-mongodb-native/issues/4205)) ([6d65ae7](https://github.com/mongodb-js/node-mongodb-native/commit/6d65ae77835cf144b540a5a344e1f10bb1988bc5)) +* **NODE-6329:** client bulk write happy path ([#4206](https://github.com/mongodb-js/node-mongodb-native/issues/4206)) ([3d3da40](https://github.com/mongodb-js/node-mongodb-native/commit/3d3da4070b155d372477fd9b76ac9f1cd5e5011c)) +* **NODE-6334:** rename PoolRequstedRetry to PoolRequestedRetry ([#4696](https://github.com/mongodb-js/node-mongodb-native/issues/4696)) ([84db848](https://github.com/mongodb-js/node-mongodb-native/commit/84db84829fb41135d19bc5216137ef84a16a1960)) +* **NODE-6337:** implement client bulk write batching ([#4248](https://github.com/mongodb-js/node-mongodb-native/issues/4248)) ([d56e235](https://github.com/mongodb-js/node-mongodb-native/commit/d56e235cb7aa9d991cc1fb200c8a94e6a1b788fa)) +* **NODE-6338:** implement client bulk write error handling ([#4262](https://github.com/mongodb-js/node-mongodb-native/issues/4262)) ([8def42d](https://github.com/mongodb-js/node-mongodb-native/commit/8def42ded5df4cb7d5ba1c65445d90042b1667c3)) +* **NODE-6342:** support maxTimeMS for explain commands ([#4207](https://github.com/mongodb-js/node-mongodb-native/issues/4207)) ([20396e1](https://github.com/mongodb-js/node-mongodb-native/commit/20396e1bdba9c3fb89c789b1955f117ed28a3926)) +* **NODE-6350:** add typescript support to client bulkWrite API ([#4257](https://github.com/mongodb-js/node-mongodb-native/issues/4257)) ([30c61f2](https://github.com/mongodb-js/node-mongodb-native/commit/30c61f2a926f1d8908b0800a4f9bb409e5d9581e)) +* **NODE-6365:** pass through `allowPartialTrustChain` TLS flag ([#4228](https://github.com/mongodb-js/node-mongodb-native/issues/4228)) ([d6c147d](https://github.com/mongodb-js/node-mongodb-native/commit/d6c147d62a9aa96f0807e190190a06ed880df07f)) +* **NODE-6387:** Add CSOT support to change streams ([#4256](https://github.com/mongodb-js/node-mongodb-native/issues/4256)) ([4588ff2](https://github.com/mongodb-js/node-mongodb-native/commit/4588ff2fa68cffb5f6769390d8c3eabe6926d483)) +* **NODE-6389:** add support for timeoutMS in StateMachine.execute() ([#4243](https://github.com/mongodb-js/node-mongodb-native/issues/4243)) ([c55f965](https://github.com/mongodb-js/node-mongodb-native/commit/c55f96571ec4730bdd80c2a233cfaaf035ed688d)) +* **NODE-6390:** Add timeoutMS support to auto encryption ([#4265](https://github.com/mongodb-js/node-mongodb-native/issues/4265)) ([55e08e7](https://github.com/mongodb-js/node-mongodb-native/commit/55e08e73194243e1ae4c6803429041e6b1d414e6)) +* **NODE-6391:** Add timeoutMS support to explicit encryption ([#4269](https://github.com/mongodb-js/node-mongodb-native/issues/4269)) ([f745b99](https://github.com/mongodb-js/node-mongodb-native/commit/f745b99099c3d4d66e135af612ea341ed0d9750b)) +* **NODE-6392:** add timeoutMS support to ClientEncryption helpers part 1 ([#4281](https://github.com/mongodb-js/node-mongodb-native/issues/4281)) ([e86f11e](https://github.com/mongodb-js/node-mongodb-native/commit/e86f11ed0cac1a32cb1b10d9ece3829827f4832b)) +* **NODE-6403:** add CSOT support to client bulk write ([#4261](https://github.com/mongodb-js/node-mongodb-native/issues/4261)) ([365d63b](https://github.com/mongodb-js/node-mongodb-native/commit/365d63b46551620b92c6f8979679ea38c49ae7bd)) +* **NODE-6409:** new errors for unacknowledged bulk writes ([#4276](https://github.com/mongodb-js/node-mongodb-native/issues/4276)) ([7fde8dd](https://github.com/mongodb-js/node-mongodb-native/commit/7fde8ddc869623e9df3ea7753a46cae8d6e3e9dd)) +* **NODE-6419:** deprecate explain options API for find and aggregate ([#4271](https://github.com/mongodb-js/node-mongodb-native/issues/4271)) ([a473de9](https://github.com/mongodb-js/node-mongodb-native/commit/a473de95091a7d89c3cbe1c44222b04d3695387e)) +* **NODE-6421:** add support for timeoutMS to explain helpers ([#4268](https://github.com/mongodb-js/node-mongodb-native/issues/4268)) ([5b2629b](https://github.com/mongodb-js/node-mongodb-native/commit/5b2629be4948b1f51f5085cc0ceef6818f8fe782)) +* **NODE-6446:** deprecate legacy timeout options ([#4279](https://github.com/mongodb-js/node-mongodb-native/issues/4279)) ([c28608b](https://github.com/mongodb-js/node-mongodb-native/commit/c28608b8b19a8fbcfdc204a3fda982d52eea03a5)) +* **NODE-6451:** retry SRV and TXT lookup for DNS timeout errors ([#4375](https://github.com/mongodb-js/node-mongodb-native/issues/4375)) ([fd902d3](https://github.com/mongodb-js/node-mongodb-native/commit/fd902d31d5cb65100f1c8b6f8811886b44ba19d5)) +* **NODE-6472:** findOne and find no longer keep open cursors ([#4580](https://github.com/mongodb-js/node-mongodb-native/issues/4580)) ([be7f808](https://github.com/mongodb-js/node-mongodb-native/commit/be7f808c3ff0d894906ec187de98e159ebb7b18d)) +* **NODE-6494:** add support for `hint` on distinct commands ([#4487](https://github.com/mongodb-js/node-mongodb-native/issues/4487)) ([40d0e87](https://github.com/mongodb-js/node-mongodb-native/commit/40d0e87199d75df93284a1802e54e118539f7e0e)) +* **NODE-6515:** deprecate driver support for server 4.0 ([#4517](https://github.com/mongodb-js/node-mongodb-native/issues/4517)) ([4c1a8a7](https://github.com/mongodb-js/node-mongodb-native/commit/4c1a8a71d67cb201dbb3c7101ebf6e316e4dbc50)) +* **NODE-6551:** update bson to 6.10.0 ([#4329](https://github.com/mongodb-js/node-mongodb-native/issues/4329)) ([adb15fe](https://github.com/mongodb-js/node-mongodb-native/commit/adb15feb4e6e4e1ce0e4e35373b0b5cef8f5a320)) +* **NODE-6584:** improve typing for filepaths in AutoEncryptionOptions ([#4341](https://github.com/mongodb-js/node-mongodb-native/issues/4341)) ([dab4c7c](https://github.com/mongodb-js/node-mongodb-native/commit/dab4c7c8279ac1112d99d7ceca505632a45d0787)) +* **NODE-6593:** add support for zstd@2.x ([#4346](https://github.com/mongodb-js/node-mongodb-native/issues/4346)) ([ea8a33f](https://github.com/mongodb-js/node-mongodb-native/commit/ea8a33f1c34e93dd8048ba83edca3294e474ddf5)) +* **NODE-6605:** add error message when invalidating primary ([#4340](https://github.com/mongodb-js/node-mongodb-native/issues/4340)) ([37613f1](https://github.com/mongodb-js/node-mongodb-native/commit/37613f1a726d330967012b0c007560db1cc79bd9)) +* **NODE-6633:** MongoClient.close closes active cursors ([#4372](https://github.com/mongodb-js/node-mongodb-native/issues/4372)) ([654069f](https://github.com/mongodb-js/node-mongodb-native/commit/654069fc1750b6c3336f1002e3d3fb18bbc1451d)) +* **NODE-6676:** add support for `nsType` in change stream create events ([#4431](https://github.com/mongodb-js/node-mongodb-native/issues/4431)) ([7800067](https://github.com/mongodb-js/node-mongodb-native/commit/7800067ad0ea4e24e3180fe264da4951b883e08d)) +* **NODE-6773:** add support for $lookup with automatic encryption ([#4427](https://github.com/mongodb-js/node-mongodb-native/issues/4427)) ([965b21a](https://github.com/mongodb-js/node-mongodb-native/commit/965b21a20eff38c7fe7d9036f912b31c10e5ba21)) +* **NODE-6865:** deprecate transaction getters ([#4567](https://github.com/mongodb-js/node-mongodb-native/issues/4567)) ([da46aea](https://github.com/mongodb-js/node-mongodb-native/commit/da46aeafe857f0bbfe8935abb497ff8c92f692ca)) +* **NODE-6882:** eagerly close checked out connections when client is closed ([#4499](https://github.com/mongodb-js/node-mongodb-native/issues/4499)) ([64fdb3e](https://github.com/mongodb-js/node-mongodb-native/commit/64fdb3ef40262d7cf321175c3ae0c4079b889624)) +* **NODE-6883:** allow rawData option on time series collections ([#4642](https://github.com/mongodb-js/node-mongodb-native/issues/4642)) ([0fa3cd4](https://github.com/mongodb-js/node-mongodb-native/commit/0fa3cd4e82b2b0d28a10bebca1dded2aa9324708)) +* **NODE-6884:** remove support for 4.0 ([#4534](https://github.com/mongodb-js/node-mongodb-native/issues/4534)) ([6fe6ccc](https://github.com/mongodb-js/node-mongodb-native/commit/6fe6ccc8e1a2d5cc605e7467ec7b3f83628c8095)) +* **NODE-6952:** support configuring DEK cache expiration ([#4538](https://github.com/mongodb-js/node-mongodb-native/issues/4538)) ([c529f07](https://github.com/mongodb-js/node-mongodb-native/commit/c529f07c510f16abc158cbf33ba03230629e34d5)) +* **NODE-6963:** use BSON 6.10.4 ([#4549](https://github.com/mongodb-js/node-mongodb-native/issues/4549)) ([aee490a](https://github.com/mongodb-js/node-mongodb-native/commit/aee490a453dc0acec7f673bdb3ca7be16d555092)) +* **NODE-6988:** require aws sdk for aws auth ([#4659](https://github.com/mongodb-js/node-mongodb-native/issues/4659)) ([b7c6750](https://github.com/mongodb-js/node-mongodb-native/commit/b7c6750771e0a578e7f2ce6a8b9192ee7e76e8d3)) +* **NODE-6991:** deprecate unintentionally public client metadata types ([#4566](https://github.com/mongodb-js/node-mongodb-native/issues/4566)) ([ca6554b](https://github.com/mongodb-js/node-mongodb-native/commit/ca6554b203595cd195ea80b24b1bb662d88abee9)) +* **NODE-7009:** add client metadata on demand ([#4574](https://github.com/mongodb-js/node-mongodb-native/issues/4574)) ([b9636ee](https://github.com/mongodb-js/node-mongodb-native/commit/b9636ee3fe1daa54a65935f206f0c8fdac16ae86)) +* **NODE-7020:** remove ping on connect ([#4607](https://github.com/mongodb-js/node-mongodb-native/issues/4607)) ([3d296b7](https://github.com/mongodb-js/node-mongodb-native/commit/3d296b7d94810c3bc29153ffc3c8795f02699dd4)) +* **NODE-7047:** use custom credential provider first after URI ([#4656](https://github.com/mongodb-js/node-mongodb-native/issues/4656)) ([2a47bbb](https://github.com/mongodb-js/node-mongodb-native/commit/2a47bbbf03ec54509d93f925d0747378e3de80ed)) +* **NODE-7053:** deprecate noResponse option ([#4589](https://github.com/mongodb-js/node-mongodb-native/issues/4589)) ([1115319](https://github.com/mongodb-js/node-mongodb-native/commit/1115319a0913c136c688631a0cf9f6d3dfcb2e4c)) +* **NODE-7059, NODE-7008:** add support for text queries for QE string fields ([#4597](https://github.com/mongodb-js/node-mongodb-native/issues/4597)) ([e4492f3](https://github.com/mongodb-js/node-mongodb-native/commit/e4492f3ff260a440ab4b2cb64ca90a68f9cf6fd5)) +* **NODE-7125:** add db and client properties to collection and database objects ([#4640](https://github.com/mongodb-js/node-mongodb-native/issues/4640)) ([3469f86](https://github.com/mongodb-js/node-mongodb-native/commit/3469f86816e4b583a12de29d76b19823a3ad25ef)) +* **NODE-7134:** allow hint with unacknowledged writes for delete, update and findAndModify commands ([#4647](https://github.com/mongodb-js/node-mongodb-native/issues/4647)) ([82d6ce6](https://github.com/mongodb-js/node-mongodb-native/commit/82d6ce6a6dbbf6d823f02c8d183fc1d45f0d1560)) +* **NODE-7139:** remove pre-4.2 logic and deprecate dead code ([#4657](https://github.com/mongodb-js/node-mongodb-native/issues/4657)) ([14303bc](https://github.com/mongodb-js/node-mongodb-native/commit/14303bc810c1aa069d440ac3cd45bff354dc51aa)) +* **NODE-7140:** deprecate driver info options ([#4654](https://github.com/mongodb-js/node-mongodb-native/issues/4654)) ([b813c85](https://github.com/mongodb-js/node-mongodb-native/commit/b813c85813c7c86b84aed1cdde69fc3e06856892)) +* **NODE-7157:** deprecate `retryWrites` in `CommandOperationOptions` ([#4661](https://github.com/mongodb-js/node-mongodb-native/issues/4661)) ([620972d](https://github.com/mongodb-js/node-mongodb-native/commit/620972df28f57aae1eb67dd2d3a49f8cf48f7262)) +* **NODE-7174:** drop support for Node16 and Node18 ([#4668](https://github.com/mongodb-js/node-mongodb-native/issues/4668)) ([a576b7d](https://github.com/mongodb-js/node-mongodb-native/commit/a576b7d3a8210f0544c3814b130ea21585ea1f9f)) + + +### Bug Fixes + +* **NODE-4763:** cache `resumeToken` in `ChangeStream.tryNext()` ([#4636](https://github.com/mongodb-js/node-mongodb-native/issues/4636)) ([8331a93](https://github.com/mongodb-js/node-mongodb-native/commit/8331a939c2f3d6833486ca3ec45cd77603cf3fa9)) +* **NODE-4845:** allocate sessions lazily in cursors ([#4575](https://github.com/mongodb-js/node-mongodb-native/issues/4575)) ([5761703](https://github.com/mongodb-js/node-mongodb-native/commit/57617039c0275e25e607363fbdc971b0f94e99c7)) +* **NODE-5225:** concurrent MongoClient.close() calls each attempt to close the client ([#4376](https://github.com/mongodb-js/node-mongodb-native/issues/4376)) ([9419af7](https://github.com/mongodb-js/node-mongodb-native/commit/9419af7b3bcbf134d0740c4282f83d1d5a717418)) +* **NODE-5530:** make topology descriptions JSON stringifiable ([#4070](https://github.com/mongodb-js/node-mongodb-native/issues/4070)) ([3a0e011](https://github.com/mongodb-js/node-mongodb-native/commit/3a0e01191be5836c4d41bd92c5cc64141b531dda)) +* **NODE-5720:** on pre-4.4 sharded servers, the node driver uses `error.writeConcern.code` to determine retryability ([#4155](https://github.com/mongodb-js/node-mongodb-native/issues/4155)) ([b26c328](https://github.com/mongodb-js/node-mongodb-native/commit/b26c32800ecb2658a0d9c779bdb741aa06a629d0)) +* **NODE-5745:** ignore Read/Write Concern in Atlas Search Index Helpers ([#4042](https://github.com/mongodb-js/node-mongodb-native/issues/4042)) ([67d7bab](https://github.com/mongodb-js/node-mongodb-native/commit/67d7bab434164fa9a81e22edde9339f89be91f65)) +* **NODE-5801:** use more specific key typing for multiple KMS provider support ([#4146](https://github.com/mongodb-js/node-mongodb-native/issues/4146)) ([465ffd9](https://github.com/mongodb-js/node-mongodb-native/commit/465ffd97974b40e2bf2608907455c00c58c59cff)) +* **NODE-5925:** driver throws error when non-read operation in a transaction has a ReadPreferenceMode other than 'primary' ([#4075](https://github.com/mongodb-js/node-mongodb-native/issues/4075)) ([39fc198](https://github.com/mongodb-js/node-mongodb-native/commit/39fc198b8fd2baed17c3aec223ca43094bb1c147)) +* **NODE-6029:** update types for collection listing indexes ([#4072](https://github.com/mongodb-js/node-mongodb-native/issues/4072)) ([232bf3c](https://github.com/mongodb-js/node-mongodb-native/commit/232bf3cb9e41b717680ad0a5678bbc16d3cc243f)) +* **NODE-6085:** add TS support for KMIP data key options ([#4128](https://github.com/mongodb-js/node-mongodb-native/issues/4128)) ([f790cc1](https://github.com/mongodb-js/node-mongodb-native/commit/f790cc181d87049e0018e1e5e859f90ee8156c0d)) +* **NODE-6151:** MongoClient connect does not keep Node.js running ([#4101](https://github.com/mongodb-js/node-mongodb-native/issues/4101)) ([7e0d9e6](https://github.com/mongodb-js/node-mongodb-native/commit/7e0d9e689859e20ad0fd7aae047fc349e24355c9)) +* **NODE-6165:** useBigInt64 causes compareTopologyVersion to throw ([#4109](https://github.com/mongodb-js/node-mongodb-native/issues/4109)) ([21b729b](https://github.com/mongodb-js/node-mongodb-native/commit/21b729b983e2ddbe1dd9cff31f996825a45ec4e0)) +* **NODE-6171:** RTT set to zero when serverMonitoringMode=stream ([#4110](https://github.com/mongodb-js/node-mongodb-native/issues/4110)) ([7a7ec5b](https://github.com/mongodb-js/node-mongodb-native/commit/7a7ec5b95d0c38b377551c31d03130cd9f1882f6)) +* **NODE-6241:** allow `Binary` as local KMS provider key ([#4160](https://github.com/mongodb-js/node-mongodb-native/issues/4160)) ([fb724eb](https://github.com/mongodb-js/node-mongodb-native/commit/fb724eb6441408ad7f93c50d146a12c9b64d8333)) +* **NODE-6241:** allow Binary as local kms provider key for auto encryption ([#4165](https://github.com/mongodb-js/node-mongodb-native/issues/4165)) ([d85f827](https://github.com/mongodb-js/node-mongodb-native/commit/d85f827aca56603b5d7b64f853c190473be81b6f)) +* **NODE-6242:** close becomes true after calling close when documents still remain ([#4161](https://github.com/mongodb-js/node-mongodb-native/issues/4161)) ([e3d70c3](https://github.com/mongodb-js/node-mongodb-native/commit/e3d70c3d224e1cd0888d79516c1b509921ac560d)) +* **NODE-6259:** replace dynamically assigned length property with a static getter ([#4173](https://github.com/mongodb-js/node-mongodb-native/issues/4173)) ([320dde0](https://github.com/mongodb-js/node-mongodb-native/commit/320dde04aa1547dd838e7c790bb3432e2ca2bc19)) +* **NODE-6276:** preserve top level error code MongoWriteConcernError ([#4183](https://github.com/mongodb-js/node-mongodb-native/issues/4183)) ([e902584](https://github.com/mongodb-js/node-mongodb-native/commit/e9025843e43bedb2326675184b6ce49b103e3c77)) +* **NODE-6284:** make sparsity and trimFactor optional ([#4189](https://github.com/mongodb-js/node-mongodb-native/issues/4189)) ([8622545](https://github.com/mongodb-js/node-mongodb-native/commit/8622545c18d321ae17184cd43207652e454170fc)) +* **NODE-6340:** OIDC reauth uses caches speculative auth result ([#4379](https://github.com/mongodb-js/node-mongodb-native/issues/4379)) ([8b2b7fd](https://github.com/mongodb-js/node-mongodb-native/commit/8b2b7fdc6366ee9b6b595daf074d6b88362df5e6)) +* **NODE-6355:** respect utf8 validation options when iterating cursors ([#4214](https://github.com/mongodb-js/node-mongodb-native/issues/4214)) ([8bfe187](https://github.com/mongodb-js/node-mongodb-native/commit/8bfe18716197f58c025520da5d771b520e1b1350)) +* **NODE-6362:** cache cursor deserialization options across deserialize calls ([#4221](https://github.com/mongodb-js/node-mongodb-native/issues/4221)) ([833eaa4](https://github.com/mongodb-js/node-mongodb-native/commit/833eaa41c5f379268be46408282b0c97323ea1bc)) +* **NODE-6367:** enable mixed use of iteration APIs ([#4231](https://github.com/mongodb-js/node-mongodb-native/issues/4231)) ([08912c8](https://github.com/mongodb-js/node-mongodb-native/commit/08912c8a191937bdef921b4e9a4581b12ebf8b59)) +* **NODE-6374:** MongoOperationTimeoutError inherits MongoRuntimeError ([#4237](https://github.com/mongodb-js/node-mongodb-native/issues/4237)) ([9fb896a](https://github.com/mongodb-js/node-mongodb-native/commit/9fb896a962a1bd5924453f0d2c43b0af8c01e4ba)) +* **NODE-6394:** data events missed while awaiting drain ([#4249](https://github.com/mongodb-js/node-mongodb-native/issues/4249)) ([3f9d243](https://github.com/mongodb-js/node-mongodb-native/commit/3f9d24379afa1e1e953b77f46563fca5a26c8407)) +* **NODE-6407:** use conversationId returned from server in saslContinue ([#4368](https://github.com/mongodb-js/node-mongodb-native/issues/4368)) ([fbefa6b](https://github.com/mongodb-js/node-mongodb-native/commit/fbefa6b6265bf3c5019e07626dd298c265ad4746)) +* **NODE-6412:** read stale response from previously timed out connection ([#4273](https://github.com/mongodb-js/node-mongodb-native/issues/4273)) ([fd8f3bd](https://github.com/mongodb-js/node-mongodb-native/commit/fd8f3bd8f78960726a31d24afeb27d51c549f660)) +* **NODE-6418:** change stream resumes infinitely after failed aggregates ([#4267](https://github.com/mongodb-js/node-mongodb-native/issues/4267)) ([6ecf198](https://github.com/mongodb-js/node-mongodb-native/commit/6ecf198f2e4805da42f651717c6e7f8182a8faeb)) +* **NODE-6436:** only force majority write concern on commitTransaction retry ([#4284](https://github.com/mongodb-js/node-mongodb-native/issues/4284)) ([a7d1d43](https://github.com/mongodb-js/node-mongodb-native/commit/a7d1d43e96c6875dd325d17d87639c2338eb35f3)) +* **NODE-6454:** use timeoutcontext for state machine execute() cursor options ([#4291](https://github.com/mongodb-js/node-mongodb-native/issues/4291)) ([5dd8ee5](https://github.com/mongodb-js/node-mongodb-native/commit/5dd8ee5632a306346406e8856e01ac21dedef813)) +* **NODE-6469:** pool is cleared before connection checkin on error ([#4296](https://github.com/mongodb-js/node-mongodb-native/issues/4296)) ([06a2e2c](https://github.com/mongodb-js/node-mongodb-native/commit/06a2e2ce45921dfe898eefaf1fbdd461c212d512)) +* **NODE-6523:** deleteMany in gridfs passes timeoutMS to predicate, not options ([#4319](https://github.com/mongodb-js/node-mongodb-native/issues/4319)) ([1965ed5](https://github.com/mongodb-js/node-mongodb-native/commit/1965ed51296bac9149ecb077b6cafd43150a3a07)) +* **NODE-6583:** upgrade to BSON v6.10.1 to remove internal unbounded type cache ([#4338](https://github.com/mongodb-js/node-mongodb-native/issues/4338)) ([249c279](https://github.com/mongodb-js/node-mongodb-native/commit/249c279ee21c0635ab22be10788ffcae52ad3bb5)) +* **NODE-6589:** background task does not prune idle connections when minPoolSize=0 ([#4569](https://github.com/mongodb-js/node-mongodb-native/issues/4569)) ([7cbb641](https://github.com/mongodb-js/node-mongodb-native/commit/7cbb641f848993788f5d11812518d1e360df1d53)) +* **NODE-6600:** set object mode correctly for message chunking in SizedMessageTransform ([#4345](https://github.com/mongodb-js/node-mongodb-native/issues/4345)) ([5558573](https://github.com/mongodb-js/node-mongodb-native/commit/555857319605d72ce57c639166ce25f57739bf74)) +* **NODE-6602:** only wrap errors from SOCKS in network errors ([#4347](https://github.com/mongodb-js/node-mongodb-native/issues/4347)) ([ed83f36](https://github.com/mongodb-js/node-mongodb-native/commit/ed83f36ce17e40f0faf4bbaaeab6fa3b7f90b10a)) +* **NODE-6613:** Update error messages when primaries go stale ([#4397](https://github.com/mongodb-js/node-mongodb-native/issues/4397)) ([6528c8d](https://github.com/mongodb-js/node-mongodb-native/commit/6528c8db3acfb28fa58a7cd587703d3d40c065aa)) +* **NODE-6630:** read all messages in buffer when chunk arrives ([#4512](https://github.com/mongodb-js/node-mongodb-native/issues/4512)) ([8c86e30](https://github.com/mongodb-js/node-mongodb-native/commit/8c86e303594bad8c7b8cd9033fe47afe1e813388)) +* **NODE-6638:** throw if all atomic updates are undefined ([#4519](https://github.com/mongodb-js/node-mongodb-native/issues/4519)) ([9625b2d](https://github.com/mongodb-js/node-mongodb-native/commit/9625b2d10a7d3548b423cf130fba89b383eeb8db)) +* **NODE-6690:** Remove extraneous Document in replaceOne return type ([#4383](https://github.com/mongodb-js/node-mongodb-native/issues/4383)) ([6c81d4e](https://github.com/mongodb-js/node-mongodb-native/commit/6c81d4e839589dd51cea0dca10d4163a13744c94)) +* **NODE-6763:** pass WriteConcernOptions instead on WriteConcernSettings ([#4421](https://github.com/mongodb-js/node-mongodb-native/issues/4421)) ([26f15d7](https://github.com/mongodb-js/node-mongodb-native/commit/26f15d7edc109154b1064299299158a8327a73da)) +* **NODE-6765:** FindOneAndUpdateOptions supports aggregation expressions ([#4423](https://github.com/mongodb-js/node-mongodb-native/issues/4423)) ([421ddeb](https://github.com/mongodb-js/node-mongodb-native/commit/421ddeb329169f47b567cbe432c39737551bd234)) +* **NODE-6777:** update BSON to 6.10.3 ([#4428](https://github.com/mongodb-js/node-mongodb-native/issues/4428)) ([db5b9e0](https://github.com/mongodb-js/node-mongodb-native/commit/db5b9e00c3966019fc79d7b275e585f07c59144c)) +* **NODE-6792:** use isUint8Array from driver's utils instead of util/types ([#4436](https://github.com/mongodb-js/node-mongodb-native/issues/4436)) ([dfe1fba](https://github.com/mongodb-js/node-mongodb-native/commit/dfe1fba777d89a53106487e38aaf5072978096b5)) +* **NODE-6794:** revert `@aws-sdk/credential-providers` peer compatibility change ([#4437](https://github.com/mongodb-js/node-mongodb-native/issues/4437)) ([488c407](https://github.com/mongodb-js/node-mongodb-native/commit/488c4071632c29960de8955bfbefbaab163b45ba)) +* **NODE-6801:** set token on connection from cache ([#4438](https://github.com/mongodb-js/node-mongodb-native/issues/4438)) ([cb13746](https://github.com/mongodb-js/node-mongodb-native/commit/cb1374649858ae2e0f3f3e109d7bf7e4bcd193c2)) +* **NODE-6803:** kms proxy socket creates unhandled rejection ([#4444](https://github.com/mongodb-js/node-mongodb-native/issues/4444)) ([ed69cf9](https://github.com/mongodb-js/node-mongodb-native/commit/ed69cf914435ebc96c44b265704571e3d34629ef)) +* **NODE-6845:** ensure internal rejections are handled ([#4448](https://github.com/mongodb-js/node-mongodb-native/issues/4448)) ([06e941a](https://github.com/mongodb-js/node-mongodb-native/commit/06e941a87c5278d0a7baedccc646924bf64ddfb7)) +* **NODE-6858:** treat MongoServerSelectionError as a resumable error for Change Streams ([#4653](https://github.com/mongodb-js/node-mongodb-native/issues/4653)) ([c6d64e7](https://github.com/mongodb-js/node-mongodb-native/commit/c6d64e71b010dbf2bc0dc634df12d7a03bd12da6)) +* **NODE-6864:** socket errors are not always converted to MongoNetworkErrors ([#4473](https://github.com/mongodb-js/node-mongodb-native/issues/4473)) ([2d86095](https://github.com/mongodb-js/node-mongodb-native/commit/2d860953096e8f4e18896bef92843f1a0a3ccb04)) +* **NODE-6878:** documents.clear() throws a TypeError after cursor is rewound ([#4488](https://github.com/mongodb-js/node-mongodb-native/issues/4488)) ([a1fffeb](https://github.com/mongodb-js/node-mongodb-native/commit/a1fffeb0e7fbd41832e6ae751a3f7369ea585b20)) +* **NODE-6955:** add missing `wallTime` property TS change stream event interfaces ([#4541](https://github.com/mongodb-js/node-mongodb-native/issues/4541)) ([f153c6f](https://github.com/mongodb-js/node-mongodb-native/commit/f153c6f3df8c7c440af3bc0f862a30c53f9c5fc8)) +* **NODE-6962:** OIDC machine workflows use OIDCCallbacks internally ([#4546](https://github.com/mongodb-js/node-mongodb-native/issues/4546)) ([bd6030f](https://github.com/mongodb-js/node-mongodb-native/commit/bd6030f2da079df0e36f011ead91e178647d6ac1)) +* **NODE-7138:** prevent duplicate metadata from being appended to handshake metadata ([#4651](https://github.com/mongodb-js/node-mongodb-native/issues/4651)) ([05c230c](https://github.com/mongodb-js/node-mongodb-native/commit/05c230cb1b0cc5831983ad2fc8f84200a35da63d)) + + +### Performance Improvements + +* **NODE-5906:** optimize toArray to use batches ([#4171](https://github.com/mongodb-js/node-mongodb-native/issues/4171)) ([5565d50](https://github.com/mongodb-js/node-mongodb-native/commit/5565d5008812f03e9ff86a7b6326447ac5916244)) +* **NODE-6127:** move error construction into setTimeout callback ([#4094](https://github.com/mongodb-js/node-mongodb-native/issues/4094)) ([6abc074](https://github.com/mongodb-js/node-mongodb-native/commit/6abc074b3b1f2bbcc5d7252ab4cbfbd729fb4eb2)) +* **NODE-6452:** Optimize CommandStartedEvent and CommandSucceededEvent constructors ([#4371](https://github.com/mongodb-js/node-mongodb-native/issues/4371)) ([41b066b](https://github.com/mongodb-js/node-mongodb-native/commit/41b066b2b286879085b05a58c0486aa1d24303bc)) +* **NODE-6525:** remove setPrototype and defineProperty from hot path ([#4321](https://github.com/mongodb-js/node-mongodb-native/issues/4321)) ([48ed47e](https://github.com/mongodb-js/node-mongodb-native/commit/48ed47ec192416e86762527cf3beabb4a634ac93)) +* **NODE-6616:** shortcircuit logging ejson.stringify ([#4377](https://github.com/mongodb-js/node-mongodb-native/issues/4377)) ([c1bcf0d](https://github.com/mongodb-js/node-mongodb-native/commit/c1bcf0de991096975a5151bf780faa9803ddd765)) + ## [6.20.0](https://github.com/mongodb/node-mongodb-native/compare/v6.19.0...v6.20.0) (2025-09-17) diff --git a/package-lock.json b/package-lock.json index 4db68a81d7..d70494fa35 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mongodb", - "version": "6.20.0", + "version": "7.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "mongodb", - "version": "6.20.0", + "version": "7.0.0", "license": "Apache-2.0", "dependencies": { "@mongodb-js/saslprep": "^1.3.0", diff --git a/package.json b/package.json index ed2c126a8b..4f605ea448 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mongodb", - "version": "6.20.0", + "version": "7.0.0", "description": "The official MongoDB driver for Node.js", "main": "lib/index.js", "files": [