refactor: Upgrade mongodb from 4.10.0 to 5.4.0 #8590
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was automatically created by Snyk using the credentials of a real user.
Snyk has created this PR to upgrade mongodb from 4.10.0 to 5.4.0.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
Warning: This is a major version upgrade, and may be a breaking change.
Release notes
Package name: mongodb
-
5.4.0 - 2023-05-04
- NODE-5166: bump max wire version for 7.0 (#3659) (561229b)
- NODE-4970: deprecate collStats collection helper (#3638) (325c4bc)
- NODE-5207: deprecate unsupported runCommand options and add spec tests (#3643) (d6d76b4)
- NODE-5213:
- Reference
- API
- Changelog
-
5.3.0 - 2023-04-18
- 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-5188: add alternative runtime detection to client metadata (#3636) (2a26de3)
- NODE-5189: deprecate tcp keepalive options (#3621) (cc7c75a)
- NODE-5042: relax SRV record validation to account for a dot suffix (#3633) (ad15881)
- NODE-5171: allow
- NODE-5201: prevent warning when default value for deprecation option is used (#3646) (e7f6e4e)
- Reference
- API
- Changelog
-
5.2.0 - 2023-04-04
- NODE-5077: automatic Azure kms credential refresh (#3599) (8e87e5c)
- NODE-3998: metadata duplication in handshake (#3615) (6d894d6)
- NODE-4518: error message with invalid authMechanism is provided (#3597) (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)
- Reference: https://docs.mongodb.com/drivers/node/current/
- API: https://mongodb.github.io/node-mongodb-native/5.2/
- Changelog: HISTORY.md
-
5.1.0 - 2023-02-23
import { MongoClient } from 'mongodb';
- NODE-3445: add support for AssumeRoleWithWebIdentity in aws authentication (#3556) (e8a30b1)
- NODE-4877: Add support for useBigInt64 (#3519) (917668c)
- NODE-5050: support GCP automatic credential fetch for CSFLE (#3574) (722a4a6)
- 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)
- Reference: https://docs.mongodb.com/drivers/node/current/
- API: https://mongodb.github.io/node-mongodb-native/5.1/
- Changelog: HISTORY.md
-
5.0.1 - 2023-02-07
- NODE-5027: revert "ensure that MessageStream is destroyed when connections are destroyed" (#3552) (2d178d0)
- Reference: https://docs.mongodb.com/drivers/node/current/
- API: https://mongodb.github.io/node-mongodb-native/5.0/
- Changelog: HISTORY.md
-
5.0.0 - 2023-01-31
-
5.0.0-alpha.0 - 2023-01-24
-
4.16.0 - 2023-04-18
-
4.15.0 - 2023-04-04
-
4.14.0 - 2023-02-07
-
4.13.0 - 2022-12-19
-
4.12.1 - 2022-11-23
-
4.12.0 - 2022-11-16
-
4.11.0 - 2022-10-19
-
4.10.0 - 2022-09-19
from mongodb GitHub release notesThe MongoDB Node.js team is pleased to announce version 5.4.0 of the
mongodbpackage!Release Highlights
ChangeStream.tryNextTypescript fixWe have corrected the tryNext method on ChangeStream to use the
TChangeschema generic instead of the untypedDocumentinterface. This may increase strictness for existing usages but aligns with the rest of the methods on the change stream class to accurately reflect the type returned from the driver.Deprecations
The
db.command()API has a number of options deprecated that were incorrectly included in the typescript interface the method reportedly accepts. A majority of the options relate to fields that must be attached to the command directly:readConcern,writeConcern, andcomment.Additionally, the collStats helper has been deprecated in favor of using database aggregations to get the same result: https://www.mongodb.com/docs/manual/reference/operator/aggregation/collStats/
NOTE: This release includes some experimental features that are not yet ready for production use. As a reminder, anything marked experimental is not a part of the stable driver API and is subject to change without notice.
Features and Deprecations
Bug Fixes
ChangeStream.tryNext()should return TChange type (#3649) (3b58ca1)Documentation
We invite you to try the
mongodblibrary immediately, and report any issues to the NODE project.The MongoDB Node.js team is pleased to announce version 5.3.0 of the
mongodbpackage!Features
Bug Fixes
upsertedIdto be null inUpdateResult(#3631) (4b5be21)Documentation
We invite you to try the
mongodblibrary immediately, and report any issues to the NODE project.The MongoDB Node.js team is pleased to announce version 5.2.0 of the mongodb package!
Release Highlights
This release includes driver support for automatically obtaining Azure credentials when using automatic client side encryption. You can find a tutorial for using Azure and automatic encryption here: Use Automatic Queryable Encryption with Azure
Additionally, we have a number of minor bug fixes listed below.
NOTE: This release includes some experimental features that are not yet ready for use. As a reminder, anything marked experimental is not a part of the stable driver API and is subject to change without notice.
Features
Bug Fixes
Documentation
We invite you to try the mongodb library immediately, and report any issues to the NODE project.
The MongoDB Node.js team is pleased to announce version 5.1.0 of the
mongodbpackage!Release Highlights
Support for JavaScript
bigints in the driverThe driver now supports automatic serialization of JavaScript
bigints toBSON.Longs. It also supports deserializing ofBSON.Longvalues returned from the server tobigintvalues when theuseBigInt64flag is passed as true.(async () => {
const client = new MongoClient('<YOUR CONNECTION STRING>');
const db = client.db('test');
const coll = db.collection('bigints');
await coll.insertOne({ a: 10n }); // The driver automatically serializes bigints to BSON.Long before being sent to the server
const docBigInt = await coll.findOne({ a: 10n }, { useBigInt64: true }); // Must provide the useBigInt64 flag to specify that bigints get returned
console.log(docBigInt);
// { _id: ObjectId(...), a: 10n }
const doc = await coll.findOne({ a: 10n }); // Must provide the useBigInt64 flag to specify that bigints get returned
console.log(doc);
// { _id: ObjectId(...), a: 10 }
await client.close();
})()
Features
Bug Fixes
Documentation
We invite you to try the mongodb library immediately, and report any issues to the NODE project.
The MongoDB Node.js team is pleased to announce version 5.0.1 of the mongodb package!
This release reverts a fix that unintentionally caused a leak of internal driver resources.
Bug Fixes
Documentation
We invite you to try the mongodb library immediately, and report any issues to the NODE project.
Read more
Read more
Read more
Read more
Read more
Commit messages
Package name: mongodb
Compare
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs