fix(deps): update dependency mongodb to v5
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
mongodb | dependencies | major | ^4.0.0 -> ^5.0.0 |
Release Notes
mongodb/node-mongodb-native (mongodb)
v5.8.0
The MongoDB Node.js team is pleased to announce version 5.8.0 of the mongodb
package!
Release Notes
AutoEncrypter
interface has been deprecated
The The AutoEncrypter
interface was used internally but accidentally made public in the 4.x version of the driver. It is now deprecated and will be made internal in the next major release.
Kerberos support for 1.x and 2.x
Moves the kerberos dependency back to ^1.0.0 || ^2.0.0
to indicate support for both 1.x and 2.x. Support for 1.x is removed in 6.0.
Fixed accidental deprecation warning
Because of internal options handling, a deprecation was emitted for tlsCertificateFile
when using tlsCertificateKeyFile
. That has been corrected.
ConnectionPoolCreatedEvent
Remove credential availability on In order to avoid mistakenly printing credentials the ConnectionPoolCreatedEvent
will replace the credentials option with an empty object. The credentials are still accessble via MongoClient options: client.options.credentials
.
Features
- NODE-5399: use mongodb-js/saslprep instead of saslprep (#3818) (c0d3927)
-
NODE-5429: deprecate the
AutoEncrypter
interface (#3764) (9bb0d95) -
NODE-5465,NODE-5538: lower
@aws-sdk/credential-providers
version to 3.188.0 andzstd
to^1.0.0
(#3821) (39ff81d)
Bug Fixes
- NODE-5489: set kerberos compatibility to ^1.0.0 || ^2.0.0 (#3803) (c3b35b3)
- NODE-5495: do not emit deprecation warning when tlsCertificateKeyFile is specified and tlsCertificateFile is not (#3810) (e81d4a2)
- NODE-5537: remove credentials from ConnectionPoolCreatedEvent options (#3813) (4cf1e96)
Documentation
We invite you to try the mongodb
library immediately, and report any issues to the NODE project.
v5.7.0
Features
- NODE-4929: Add OIDC Azure workflow (#3670) (b3482f3)
- NODE-5008: add zstd and kerberos to peer deps (#3691) (9561f32)
- NODE-5241: add option to return modified document (#3710) (d9c2600)
- NODE-5243: add change stream split event (#3745) (1c84f82)
- NODE-5274: deprecate write concern options (#3752) (1f880ea)
- NODE-5287: deprecate ssl options (#3743) (f9b5677)
- NODE-5319: mark search index api public (#3741) (c015e54)
- NODE-5407: update bson to 5.4.0 (#3754) (6a574cf)
Bug Fixes
- NODE-4977: load snappy lazily (#3726) (865e658)
- NODE-5102: listDatabases nameOnly setting is sent as NaN (#3742) (b97132e)
- NODE-5289: prevent scram auth from throwing TypeError if saslprep is not a function (#3727) (e006347)
- NODE-5374: do not apply cursor transform in Cursor.hasNext (#3746) (0668cd8)
v5.6.0
Features
- NODE-5019: add runCursorCommand API (#3655) (4da926e)
- NODE-5071: support additional time series options (#3667) (ccf555d)
- NODE-5314: add search index helpers (#3672) (f647542)
Bug Fixes
- NODE-5249: remove strict flag from create collection options (#3677) (be8faaf)
- NODE-5296: construct error messages for AggregateErrors in Node16+ (#3682) (e03178e)
v5.5.0
Features
- NODE-4720: Add log messages to CMAP spec (#3645) (b27f385)
- NODE-5004: dont create or drop ecc collections (#3660) (2264fbb)
Bug Fixes
v5.4.0
Features
- NODE-4814: implement remaining severity logging methods (#3629) (d7a8079)
- NODE-4815: stringify and truncate BSON documents in log messages (#3635) (d6bd1d1)
- NODE-4970: deprecate collStats collection helper (#3638) (325c4bc)
- NODE-5166: bump max wire version for 7.0 (#3659) (561229b)
- NODE-5191: OIDC Auth Updates (#3637) (c52a4ed)
- NODE-5207: deprecate unsupported runCommand options and add spec tests (#3643) (d6d76b4)
Bug Fixes
v5.3.0
Features
- NODE-4696: add FaaS env information to client metadata (#3626) (0424080)
- NODE-4774: deprecate cursor forEach (#3622) (8d76a71)
- NODE-4791: deprecate duplicate bulk methods (#3623) (2839e95)
- NODE-4795: deprecate addUser helper (#3624) (53a0aae)
- NODE-5169: Implement emergency logger (#3610) (d502eb0)
- NODE-5188: add alternative runtime detection to client metadata (#3636) (2a26de3)
- NODE-5189: deprecate tcp keepalive options (#3621) (cc7c75a)
Bug Fixes
- NODE-5042: relax SRV record validation to account for a dot suffix (#3633) (ad15881)
-
NODE-5171: allow
upsertedId
to be null inUpdateResult
(#3631) (4b5be21) - NODE-5201: prevent warning when default value for deprecation option is used (#3646) (e7f6e4e)
v5.2.0
Features
- NODE-5035: enable OIDC authentication (#3577) (35879f6)
- NODE-5036: reauthenticate OIDC and retry (#3589) (a41846d)
- NODE-5077: automatic Azure kms credential refresh (#3599) (8e87e5c)
Bug Fixes
- NODE-3998: metadata duplication in handshake (#3615) (6d894d6)
- NODE-4518: error message with invalid authMechanism is provided (#undefined) (1a16b7e)
- NODE-4854: set timeout on write and reset on message (#3582) (4a7b5ec)
- NODE-5106: prevent multiple mongo client connect()s from leaking topology (#3596) (eb836bb)
- NODE-5126: find operations fail when passed an ObjectId as filter (#3604) (2647b61)
v5.1.0
Features
- NODE-3445: add support for AssumeRoleWithWebIdentity in aws authentication (#3556) (e8a30b1)
- NODE-4877: Add support for useBigInt64 (#3519) (917668c)
- NODE-5034: support OIDC auth options (#3557) (20a4fec)
- NODE-5050: support GCP automatic credential fetch for CSFLE (#3574) (722a4a6)
Bug Fixes
- NODE-5044: Write Concern 0 Must Not Affect Read Operations (#3541) (#3575) (10146a4)
- NODE-5052: prevent cursor and changestream close logic from running more than once (#3562) (71d0d79)
- NODE-5064: consolidate connection cleanup logic and ensure socket is always closed (#3572) (e544d88)
5.0.1 (2023-02-07)
Bug Fixes
- NODE-5027: revert "ensure that MessageStream is destroyed when connections are destroyed" (#3552) (2d178d0)
v5.0.1
v5.0.0
⚠ BREAKING CHANGES
- NODE-5016: compile ts with target es2020 (#3545)
Features
Bug Fixes
v4.17.0
The MongoDB Node.js team is pleased to announce version 4.17.0 of the mongodb
package!
Release Notes
mongodb-js/saslprep
is now installed by default
Until v6, the driver included the saslprep
package as an optional dependency for SCRAM-SHA-256 authentication. saslprep
breaks when bundled with webpack because it attempted to read a file relative to the package location and consequently the driver would throw errors when using SCRAM-SHA-256 if it were bundled.
The driver now depends on mongodb-js/saslprep
, a fork of saslprep
that can be bundled with webpack because it includes the necessary saslprep data in memory upon loading. This will be installed by default but will only be used if SCRAM-SHA-256 authentication is used.
ConnectionPoolCreatedEvent
Remove credential availability on In order to avoid mistakenly printing credentials the ConnectionPoolCreatedEvent
will replace the credentials option with an empty object. The credentials are still accessble via MongoClient options: client.options.credentials
.
Features
- NODE-5272: do not create or drop ecc collections (#3678) (d26ad61)
- NODE-5398: use mongodb-js/saslprep instead of saslprep (#3820) (5244711)
Bug Fixes
- NODE-5262: AWS Lambda metadata detection logic is too permissive (#3683) (c0c3d99)
- NODE-5311: construct error messages for AggregateErrors in Node16+ (#3683) (98b7bdf)
-
NODE-5316: prevent parallel topology creation in MongoClient.connect (#3696) (e13038d)
- Thank you @clemclx for contributing this fix!
🎉
- Thank you @clemclx for contributing this fix!
- NODE-5356: prevent scram auth from throwing TypeError if saslprep is not a function (#3732) (2d028af)
- NODE-5536: remove credentials from ConnectionPoolCreatedEvent options (#3812) (2910dca)
Documentation
We invite you to try the mongodb
library immediately, and report any issues to the NODE project.
v4.16.0
The MongoDB Node.js team is pleased to announce version 4.16.0 of the mongodb
package!
Features
- NODE-5159: add FaaS env information to client metadata (#3639) (e0b20f1)
- NODE-5199: add alternative runtime detection to client metadata (#3647) (fba16ad)
Bug Fixes
- NODE-5161: metadata duplication in handshake (#3628) (b790142)
- NODE-5200: relax SRV record validation to account for a dot suffix (#3640) (4272c43)
Documentation
We invite you to try the mongodb
library immediately, and report any issues to the NODE project.
v4.15.0
The MongoDB Node.js team is pleased to announce version 4.15.0 of the mongodb package!
Features
Bug Fixes
Documentation
- Reference: https://docs.mongodb.com/drivers/node/current/
- API: https://mongodb.github.io/node-mongodb-native/4.15/
- Changelog: HISTORY.md
We invite you to try the mongodb library immediately, and report any issues to the NODE project.
v4.14.0
The MongoDB Node.js team is pleased to announce version 4.14.0 of the mongodb package!
Deprecations
Bug Fixes
- NODE-4999: Write Concern 0 Must Not Affect Read Operations (#3541) (ddfc2b9)
- NODE-5026: revert "ensure that MessageStream is destroyed when connections are destroyed" (#3551) (c4da623)
Documentation
- Reference: https://docs.mongodb.com/drivers/node/current/
- API: https://mongodb.github.io/node-mongodb-native/4.14/
- Changelog: HISTORY.md
We invite you to try the mongodb library immediately, and report any issues to the NODE project.
v4.13.0
Features
- NODE-4691: interrupt in-flight operations on heartbeat failure (#3457) (e641bd4)
- NODE-4810: define the new Logger (#3475) (6ef11d7)
Bug Fixes
- NODE-4447: disable causal consistency in implicit sessions (#3479) (6566fb5)
- NODE-4834: ensure that MessageStream is destroyed when connections are destroyed (#3482) (8338bae)
4.12.1 (2022-11-23)
Bug Fixes
- NODE-4830: lazily import aws module (#3476) (ff375e9)
- NODE-4831: check map value is not undefined (#3477) (9795cdb)
v4.12.1
v4.12.0
Features
- NODE-4681: deprecate modify result (#3459) (6a8776c)
- NODE-4683: make ChangeStream an async iterable (#3454) (df8d9a4)
- NODE-4733: deprecate result and getLastOp (#3458) (a143d3b)
- NODE-4757: deprecate unused PipeOptions (#3466) (1a5e619)
- NODE-4809: deprecate the existing logger (#3464) (1eea4f0)
Bug Fixes
- NODE-4609: allow mapping to falsey non-null values in cursors (#3452) (1bf6ef1)
- NODE-4735: fix change stream consecutive resumabilty (#3453) (89b27e9)
- NODE-4753: remove erroneous deprecation of geoNear (#3465) (199dcaf)
- NODE-4783: handle orphaned operation descriptions (#3463) (4c9b4d8)
v4.11.0
Features
- NODE-3255: add minPoolSizeCheckIntervalMS option to connection pool (#3429) (5f34ad0)
- NODE-3651: add hashed index type (#3432) (f6b56a1)
- NODE-3875: support recursive schema types (#3433) (26bce4a)
- NODE-4503: throw original error when server attaches NoWritesPerformed label (#3441) (a7dab96)
- NODE-4650: handle handshake errors with SDAM (#3426) (cbe7533)
- NODE-4721: add aws-sdk as optional dependency (#3446) (b879cb5)
Bug Fixes
- NODE-3712,NODE-4546: electionId should be ordered before setVersion (#3174) (ca51fec)
- NODE-3921: error on invalid TLS option combinations (#3405) (1a550df)
- NODE-4186: accept ReadPreferenceLike in TransactionOptions type (#3425) (dc62bcb)
- NODE-4475: make interrupted message more specific (#3437) (5f37cb6)
- NODE-4608: prevent parallel monitor checks (#3404) (78bcfe4)
- NODE-4647: improve error message (#3409) (0d3c02e)
- NODE-4649: use SDAM handling for errors from min pool size population (#3424) (ef3b55d)
v4.10.0
Features
- NODE-4385: add cmap pool pausing functionality (#3321) (335ee55)
- NODE-4484: add experimental support for disambiguatedPaths in change stream documents (#3365) (846365a)
- NODE-4519: deprecate promiseLibrary and PromiseProvider (#3403) (5c322b6)
- NODE-4547: mark all callback APIs as deprecated (#3388) (a983f14)
- NODE-4607: add exports needed by legacy client (#3396) (972f760)
- NODE-4634: add support for bulk FindOperators.hint() (#3408) (8758890)
Bug Fixes
- NODE-3144: pool clear event ordering and retryability tests (#3407) (bdc0d67)
- NODE-3986: unskip MONGODB-AWS test (#3397) (5676f81)
- NODE-4557: randomize servers when there are only 2 eligible servers (#3390) (ddcfa49)
- NODE-4583: revert nested union type support (#3383) (7f94f0a)
- NODE-4591: only set loadBalanced on handshake when explicitly set (#3386) (57e9f2d)
- NODE-4621: ipv6 address handling in HostAddress (#3410) (5eb3978)
- NODE-4639: allow PromiseProvider to be null (#3412) (d29b3d9)
v4.9.1
The MongoDB Node.js team is pleased to announce version 4.9.1 of the mongodb package!
Release Highlights
This is a bug fix release as noted below.
Bug Fixes
- NODE-4583: revert nested union type support (#3383) (014d0b3)
- NODE-4591: only set loadBalanced on handshake when explicitly set (#3386) (861d465)
v4.9.0
Features
- NODE-3517: improve index spec handling and type definitions (#3315) (0754bf9)
- NODE-4336: deprecate old write concern options and add missing writeConcern to MongoClientOptions (#3340) (d2b6ad8)
- NODE-4548: export ChangeStream class from top-level (#3357) (48f295a)
Bug Fixes
- NODE-4159,NODE-4512: remove servers with incorrect setName from topology and fix unix socket parsing (#3348) (00dcf2d)
- NODE-4273: pass 'comment' option through to distinct command (#3339) (753ecfe)
- NODE-4413: set maxTimeMS on getMores when maxAwaitTimeMS is specified (#3319) (dcbfd6e)
- NODE-4429: select server sync for endSessions during close (#3363) (5086ead)
-
NODE-4467: Add back support for
oplogReplay
option as deprecated (#3337) (6c69b7d) - NODE-4496: counter values incorrecly compared when instance of Long (#3342) (d29eb8c)
- NODE-4513: type for nested objects in query & update (#3349) (ec1a68f)
- NODE-4533: session support error message and unified test runner (#3355) (6a0e502)
- NODE-4555: export BSON internally (#3367) (4ce6e4c)
4.8.1 (2022-07-26)
Bug Fixes
- NODE-4423: better type support for nested objects in query & update (#3328) (05e007b)
- NODE-4425: webpack optional import of FLE issue (#3324) (5ab2b05)
- NODE-4444: use Node.js clear timers (#3327) (c5cfe21)
v4.8.1
v4.8.0
Features
- NODE-4078: allow comment with estimated doc count (#3301) (bed1fe3)
- NODE-4267: support nested fields in type completion for UpdateFilter (#3259) (1a9a44c)
- NODE-4294: mark queryable encryption options beta (#3300) (4c07bbb)
- NODE-4301: remove shared lib experimental tags (#3298) (3976783)
Bug Fixes
- NODE-4125: change stream resumability (#3289) (aa5f97e)
- NODE-4262: make startSession work without a connection (#3286) (89ad7c3)
- sync showExpandedEvents spec tests (#3288) (cfe18f9)
v4.7.0
Features
- NODE-1837: add zstd compression option (#3237) (1261432)
- NODE-2993: implement maxConnecting (#3255) (c9d3816)
- NODE-3750: make maxConnecting configurable (#3261) (ee41447)
- NODE-3938: Add support for pre/post images in change streams (#3250) (981465c)
- NODE-4079: estimated document count uses count (#3244) (a752e75)
- NODE-4081: fix and deprecate change stream resume options (#3270) (47adfb3)
- NODE-4139: streaming protocol message changes (#3256) (4b9ad77)
- NODE-4192: make MongoClient.connect optional (#3232) (a2359e4)
- NODE-4196: add support for showExpandedEvents in change streams (#3254) (9c1782e)
- NODE-4229: bump maxWireVersion to 17 (#3265) (d13cec2)
Bug Fixes
- NODE-4103: respect BSON options when creating change streams (#3247) (b2798d9)
- NODE-4108: improve return type for withTransaction() (#3236) (48e0e6e)
- NODE-4254: allow csfle to be dynamically required (#3260) (cd6b5a0)
- NODE-4281: ensure that the driver always uses Node.js timers (#3275) (4501a1c)
v4.6.0
Features
- NODE-4185: Allow opting out of disk use on cursor builder (#3230) (d216725)
- NODE-4189: Add support for clustered collections (#3229) (79a917b)
Bug Fixes
- NODE-3565: Improve error message for insertMany with partially empty array (#3221) (0ef2516)
- NODE-4232: stream() also returns generic AsyncIterable (ed4ba58)
v4.5.0
Features
- NODE-3697: reduce serverSession allocation (#3171) (5132bc9)
-
NODE-3699: add support for
comment
field (#3167) (4e2f9bf) - NODE-4014: Add let option to bulk write operations (#3160) (6f633d1)
- NODE-4085: add typings for csfle shared library option support (#3179) (d2897ab)
Bug Fixes
- NODE-3769: retryable writes are not compliant with specification (#3144) (ff26b12)
- NODE-3810: delay timeout errors by one event loop tick (#3180) (0ed7cbf)
- NODE-4069: remove 'default' from options for fullDocument field in change stream options (#3169) (799689e)
- NODE-4074: ensure getTopology doesn't throw synchronously (#3172) (329f081)
-
NODE-4129: constrain
watch
type parameter to extendChangeStream
type parameter (#3183) (43ba9fc)
4.4.1 (2022-03-03)
Features
Bug Fixes
- NODE-3521: update session support checks (#3151) (aaa453d)
- NODE-3948: Add error code to MongoSystemError (#3149) (446da95)
v4.4.1
v4.4.0
Features
- NODE-2938: add service host mechanism property (#3130) (46d5821)
- NODE-2939: add new hostname canonicalization opts (#3131) (d0390d0)
- NODE-3351: use hostname canonicalization (#3122) (f5c76f3)
- NODE-3777: add csfle kmip support (#3070) (44bbd6e)
- NODE-3867: deprecate cursor count and update v4 docs (#3127) (a48d7e2)
Bug Fixes
- fix csfle imports (#3142) (541e939)
- NODE-3621: fixed type of documentKey property on ChangeStreamDocument (#3118) (c63a21b)
- NODE-3795: unexpected No auth provider for DEFAULT defined error (#3092) (fb38a56)
- NODE-3813: unexpected type conversion of read preference tags (#3138) (3e7b894)
- NODE-3878: use legacy count operation on collection.count (#3126) (12c6835)
- NODE-3917: Throw an error when directConnection is set with multiple hosts (#3143) (b192493)
4.3.1 (2022-01-18)
Bug Fixes
- NODE-3792: remove offensive language throughout the codebase (#3091) (8e2b0cc)
- NODE-3852,NODE-3854,NODE-3856: Misc typescript fixes for 4.3.1 (#3102) (dd5195a)
v4.3.1
v4.3.0
Features
- NODE-3589: support dot-notation attributes in Filter (#2972) (76fff97)
- NODE-3633: add Socks5 support (#3041) (451627a)
-
NODE-3784: Add
enableUtf8Validation
option (#3074) (4f56409) - NODE-3793: Remove offensive language from code and tests (#3082) (91a67e0)
Bug Fixes
-
gridfs: make
GridFSBucketWriteStream.prototype.end()
returnthis
for compat with @types/node@17.0.6 (#3088) (7bb9e37) - NODE-2899: sort and correct circular imports (#3072) (48cc729)
- NODE-3675: SRV option bug correctly defaults authSource to $external (#3079) (30f2a2d)
- NODE-3803: Fix _id typing on collection create operations (#3077) (f1979db)
4.2.2 (2021-12-13)
Bug Fixes
- NODE-3705: ReadPreference.fromOptions omitting hedge and maxStalenessSeconds when readPreference is a string (#3060) (b9fbac5)
- NODE-3711: retry txn end on retryable write (#3045) (7b00d0f)
- NODE-3765: make replacement for replaceOne operations without _id (#3040) (e07e564)
- stricter protocol check in connection string (#3078) (bc05671)
4.2.1 (2021-11-30)
Bug Fixes
- NODE-2370: correct a return type of hasNext() (#3058) (b6a63df)
- NODE-3627: Enable flexible BSON validation for server error key containing invalid utf-8 (#3054) (7a507f0)
- NODE-3648: run get more ops through server selection (#3030) (268e211)
- NODE-3767: don't delete dbName if authSource is provided (#3055) (0a830e2)
- NODE-3770: Filter type uses WithId on the schema (#3053) (307d623)
v4.2.2
v4.2.1
v4.2.0
Features
- NODE-3083: support aggregate writes on secondaries (#3022) (f696909)
- NODE-3446: deprecate mapReduce command (#3036) (b6c73bf)
- NODE-3467: implement srvMaxHosts, srvServiceName options (#3031) (1f8b539)
- NODE-3469,NODE-3615,NODE-3507: update min and max wire versions (#3014) (2a78d5a)
- NODE-3691: make time series options granularity type strict (#3005) (98017f9)
- NODE-3692: make change stream events typing more generic (#3034) (d5ae78e)
-
NODE-3728: Allow to pass
authorizedCollections
option to thedb.listCollections
method (#3021) (e1234a7) - NODE-3729: add withId to default return type for collection.find and collection.findOne (#3039) (52520aa)
Bug Fixes
- NODE-3116: reschedule unreliable async interval first (#3006) (33886a7)
-
NODE-3344: allow setting
defaultTransactionOptions
with POJO rather than ReadConcern instance (#3032) (53b3164) - NODE-3515: do proper opTime merging in bulk results (#3012) (43300c3)
- NODE-3668: compile error with OptionalId on TS 4.5 beta (#3004) (ee7f095)
- NODE-3726: add optional option overloads of Db's createCollection function (#3019) (c3149e1)
- NODE-3727: add overloads for BulkOperationBase's execute function (#3018) (216d194)
4.1.3 (2021-10-05)
Bug Fixes
- NODE-3609: correct listDatabases return type (#2986) (a8e9938)
- NODE-3624: Incorrect default aggregation generic type (#2987) (440517e)
4.1.2 (2021-09-14)
Bug Fixes
- NODE-3434: errInfo should be exposed on bulk write (#2977) (6b3c161)
- NODE-3467: allow object type for aggregate out helper (#2971) (cd603e8)
- NODE-3487: check for nullish aws mechanism property (#2951) (78ec0dd)
- NODE-3559: incorrect GridFS stream type (#2981) (3915ea8)
- NODE-3567: correct typing on aggregation out helper (#2967) (a299a0b)
- NODE-3574: reintroduce ObjectID export (#2965) (2291119)
- NODE-3585: MongoClientOptions#compressors has incorrect type (#2976) (f1b896d)
- NODE-3591: tlsCertificateKeyFile option does not default cert (#2979) (6d42267)
- NODE-3599: incorrect indexes return type (#2980) (122b9f3)
4.1.1 (2021-08-24)
Bug Fixes
- NODE-3454: projection types are too narrow (#2924) (48d6da9)
- NODE-3468: remove generic overrides from find (#2935) (74bd7bd)
- NODE-3511: deprecate fullResponse and remove associated buggy code paths (#2943) (dfc39d1)
- NODE-3528: add support for snappy 7 (#2939) (0f7f300)
- NODE-3546: revert findOne not found result type to null (#2945) (1c576e9)
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.