[Snyk] Upgrade mongodb from 3.1.1 to 3.2.7 #2
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.
Snyk have raised this PR to upgrade
mongodb
from 3.1.1 to 3.2.7.Release notes
chore(release): 3.2.7
chore(release): 3.2.6
chore(release): 3.2.5
chore(release): 3.2.4
chore(release): 3.2.3
chore(release): 3.2.2
The MongoDB Node.js team is pleased to announce version 3.2.1 of the driver.
Due to a publishing snafu v3.2.1 was immediately published without a proper v3.2.0 release
Release Highlights
2.x EOL
With the v3.1.0 release we officially deprecated the 2.x driver. With this release that driver is effectively EOL, and will no longer be supported. Please update your driver as soon as possible.Unified Topology
In this release we are very excited to announce the immediate availability of a complete rewrite of the driver's "topology" layer. This is the core brains of the driver responsible for things like server selection, server discovery and monitoring. This work combines the three existing topology concepts (`Mongos`, `ReplSet`, and `Server`) into a single type `Topology`. The new `Topology` type uses the same machinery to represent all three types, greatly improving our ability to maintain the code, and reducing the chance for bug duplication.The
Topology
class no longer uses a callback store, instead relying on a server selection loop for operation execution. This means failed operations will fail faster, with more accurate stack traces and specifics about the failure. It generally makes it much easier to reason about what the driver is doing each time an operation is executed.You can enable it with the
useUnifiedTopology
feature flag passed to yourMongoClient
constructor, like so:This topology layer will replace the existing topologies in a breaking 4.x release later this year, so we strongly encourage our users to try it out as soon as possible.
`withTransaction` helper
Reliably committing a transaction in the face of errors can be a complicated endeavor using the MongoDB 4.0 drivers API. This version introduces a `withTransaction` helper method on the `ClientSession` object that allows application logic to be executed within a transaction. This method is capable of retrying either the commit operation or entire transaction as needed (and when the error permits) to better ensure that the transaction can complete successfully. Consider using this for all but the most complicated of transactions use cases.A call to
withTransaction
begins a new transaction, executes the provided function, and then attempts to commit the transaction. The function passed towithTransaction
must take asession
parameter, and this session must be passed to all methods within the function. If some error is encountered, it will attempt to re-commit the transaction before ultimately failing back to the user after aborting the transaction.NOTE: A mentioned, the passed in function MAY be retried multiple times, please keep this in mind when executing non-database operations within the function.
Here’s an example of it in action:
Cursors support asyncInterator and for..await..of loops
`Symbol.asyncIterator` is defined on cursors for Node.js versions that support it (>=v10.x.x). This allows you to use for..await..of loops with cursors:OP_MSG
This release also brings support for a new wire protocol introduced originally in version 3.6 of the server.Database-level aggregation
The server supports several collection-less aggregation source stages like `$currentOp` and `$listLocalSessions`. In this version we have added a `Db.prototype.aggregate` helper for database-level aggregations.Authentication
Since the 3.6 server release, multiple authentication contexts for a single MongoClient have been prohibited. This release cleans up the final bits of internal api related to multiple auth contexts, and greatly improves our ability to maintain this code. This not only involved simplifying the implementation of our auth providers, but also a large refactor of how connections are established and handshaked. Calls to `auth` and `logout` are now no-ops, and top level API for this will be removed in the next major release.Release Notes
Bug
New Feature
Improvement
from
mongodb
GitHub Release Notes🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs