Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency mongodb to v4 - autoclosed #3

Closed
wants to merge 1 commit into from

Conversation

mend-for-github-com[bot]
Copy link

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
mongodb ^2.1.18 -> ^4.0.0 age adoption passing confidence

Release Notes

mongodb/node-mongodb-native

v4.5.0

Compare Source

Features
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 extend ChangeStream type parameter (#​3183) (43ba9fc)
4.4.1 (2022-03-03)
Features
  • NODE-3866: Add let option to ReplaceOptions for replaceOne operation (#​3148) (f76635a)
Bug Fixes

v4.4.1

Compare Source

v4.4.0

Compare Source

Features
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

Compare Source

v4.3.0

Compare Source

Features
Bug Fixes
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

Compare Source

v4.2.1

Compare Source

v4.2.0

Compare Source

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 the db.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
4.1.2 (2021-09-14)
Bug Fixes
4.1.1 (2021-08-24)
Bug Fixes

v4.1.4

Compare Source

Release Highlights

This release includes a couple of bug fixes as noted below:

Bug Fixes
  • NODE-3515: do proper opTime merging in bulk results (#​3012) (43300c3)
  • NODE-3668: compile error with OptionalId on TS 4.5 beta (#​3004) (ee7f095)

Documentation

We invite you to try the mongodb library immediately, and report any issues to the NODE project.

v4.1.3

Compare Source

v4.1.2

Compare Source

v4.1.1

Compare Source

v4.1.0

Compare Source

Features
Bug Fixes
  • NODE-2883: Aggregate Operation should not require parent parameter (#​2918) (dc6e2d6)
  • NODE-3058: accept null or undefined anywhere we permit nullish values (#​2921) (b42a1b4)
  • NODE-3441: fix typings for createIndexes (#​2915) (f87f376)
  • NODE-3442: AsyncIterator has incorrect return type (#​2916) (4a10389)
  • NODE-3452: readonly filters not permitted by typings (#​2927) (ce51e78)
  • NODE-3510: omit incorrect | void in declaration of Promise overload of rename() (#​2922) (58c1e84)
  • NODE-3513: default command monitoring to off (#​2926) (3c60245)
4.0.1 (2021-07-20)
Features
Bug Fixes
  • NODE-3199: unable to bundle driver due to uncaught require (#​2904) (9e48bbd)
  • NODE-3393: snapshot time not applied if distinct executed first (#​2908) (7aa3008)
  • NODE-3417: allow calling db() before MongoClient is connected (#​2889) (51ea86d)

v4.0.1

Compare Source

v4.0.0

Compare Source

Features
Bug Fixes
  • NODE-1797: error when ChangeStream used as iterator and emitter concurrently (#​2871) (e0b3afe)
  • NODE-1843: bulk operations ignoring provided sessions (#​2868) (70810d1)
  • NODE-3063: fix custom csfle test script (#​2884) (d73c80c)
  • NODE-3279: use "hello" for monitoring if supported (#​2895) (5a8842a)
  • NODE-3386: listCollections result type definition (#​2866) (c12979a)
  • NODE-3413: accept tls=false in mongodb+srv connection strings (#​2886) (526c73f)
  • NODE-3416: make change stream generic default to Document (#​2882) (3d490dc)
  • NODE-3430: watch method types on MongoClient and Db (#​2900) (17cc291)

v3.7.3

Compare Source

The MongoDB Node.js team is pleased to announce version 3.7.3 of the mongodb package!

What's Changed

Full Changelog: mongodb/node-mongodb-native@v3.7.2...v3.7.3

Documentation

We invite you to try the mongodb library immediately, and report any issues to the NODE project.

v3.7.2

Compare Source

The MongoDB Node.js team is pleased to announce version 3.7.2 of the mongodb package!

Release Highlights

This release contains a fix for optional require of dependencies on yarn berry.

Bug Fixes
  • NODE-3622: bump optional-require for additional yarn berry pnp support (#​2989) (ec23d6302)

Documentation

We invite you to try the mongodb library immediately, and report any issues to the NODE project.

v3.7.1

Compare Source

The MongoDB Node.js team is pleased to announce version 3.7.1 of the mongodb package!

Release Highlights

This release contains an internal improvement that makes our monitor utilize the new hello handshake for monitoring when available.

Features

Documentation

We invite you to try the mongodb library immediately, and report any issues to the NODE project.

v3.7.0

Compare Source

The MongoDB Node.js team is pleased to announce version 3.7.0 of the mongodb package!

Release Highlights

Versioned API

Versioned API is a new feature in MongoDB 5.0 that allows user-selectable API versions, subsets of MongoDB server semantics, to be declared on a client. During communication with a server, clients with a declared API version will force the server to behave in a manner compatible with the API version. Declaring an API version on a client can be used to ensure consistent responses from a server, providing long term API stability for an application. The declared API version is applied to all commands run through the client, including those sent through the generic RunCommand helper. Specifying versioned API options in the command document AND declaring an API version on the client is not supported and will lead to undefined behavior.

Declare an API version on a client
// Declare API version "1" for the client
client = new MongoClient(uri, { serverApi: { version: '1' } });

cursor = client.db('database').collection('coll').find(...);
Strict mode

Declaring a strict API version will cause the MongoDB server to reject all commands that are not part of the declared API version. This includes command options and aggregation pipeline stages. For example, the following find call would fail because the tailable option is not part of version 1:

// Declare API version "1" for the client, with strict on
client = new MongoClient(uri, { serverApi: { version: '1', strict: true } });

// Fails with an error
cursor = client.db('database').collection('coll').find({ ... }, { tailable: true });
Deprecation Errors

The deprecationErrors option can be used to enable command failures when using functionality that is deprecated from version 1. Note that at the time of this writing, no deprecations in version 1 exist.

// Declare API version "1" for the client, with deprecationErrors on
client = new MongoClient(uri, { serverApi: { version: '1', deprecationErrors: true } });

// Note: since API version "1" is the initial version, there are no deprecated commands to provide as an example yet.
Features
Bug Fixes

Documentation

We invite you to try the mongodb library immediately, and report any issues to the NODE project.

v3.6.12

Compare Source

The MongoDB Node.js team is pleased to announce version 3.6.12 of the mongodb package!

Bug Fixes

Documentation

We invite you to try the mongodb library immediately, and report any issues to the NODE project.

v3.6.11

Compare Source

The MongoDB Node.js team is pleased to announce version 3.6.11 of the mongodb package!

Release Highlights

This patch addresses a few bugs listed below.
Notably, we fixed an issue with the way we imported one of our optional dependencies that blocked webpack bundling.

If you are a webpack user you will still get warnings for our optional dependencies (if you don't use them).
You can hush the warnings by adding this option to your webpack config:

{
    // ...
    externals: [
        'mongodb-client-encryption',
        'aws4',
        'saslprep',
        'kerberos',
        'snappy',
        'bson-ext',
    ],
    // ...
}

It is important to note that this will leave the imports in place and not pull in the code to your bundle. If you later do adopt using these dependencies you'll want to revert the relevant setting.

Bug Fixes
  • NODE-1843: bulk operations ignoring provided sessions (#​2898) (9244b17)
  • NODE-3199: unable to bundle driver due to uncaught require (#​2903) (60efe9d)

Documentation

We invite you to try the mongodb package immediately, and report any issues to the NODE project.

v3.6.10

Compare Source

The MongoDB Node.js team is pleased to announce version 3.6.10 of the mongodb package!

Release Highlights

This patch addresses a few bugs listed below. Notably the bsonRegExp option is now respected by the underlying BSON library, you can use this to decode regular expressions that contain syntax not permitted in native JS RegExp objects. Take a look at this example:

await collection.insertOne({ a: new BSONRegExp('(?-i)AA_') })
await collection.findOne({ a: new BSONRegExp('(?-i)AA_') }, { bsonRegExp: true })
// { _id: ObjectId,  a: BSONRegExp { pattern: '(?-i)AA_', options: '' } }

Also there was an issue with Cursor.forEach where user defined forEach callbacks that throw errors incorrectly handled catching errors. Take a look at the comments in this example:

collection.find({}).forEach(doc => {
    if(doc.bad) throw new Error('bad document!');
}).catch(error => {
    // now this is called! and error is `bad document!`
})
// before this fix the `bad document!` error would be thrown synchronously
// and have to be caught with try catch out here
Bug Fixes
  • NODE-2035: Exceptions thrown from awaited cursor forEach do not propagate (#​2852) (a917dfa)
  • NODE-3150: added bsonRegExp option for v3.6 (#​2843) (e4a9a57)
  • NODE-3358: Command monitoring objects hold internal state references (#​2858) (750760c)
  • NODE-3380: perform retryable write checks against server (#​2861) (621677a)
  • NODE-3397: report more helpful error with unsupported authMechanism in initial handshake (#​2876) (3ce148d)

Documentation

We invite you to try the mongodb package immediately, and report any issues to the NODE project.

v3.6.9

Compare Source

The MongoDB Node.js team is pleased to announce version 3.6.9 of the driver!

Release Highlights

This release fixes a major performance bug in bulk write operations, which was inadvertently introduced by an incomplete code change in the previous release. The bug resulted in redundant array iterations and caused exponential increases in bulk operation completion times. Thank you Jan Schwalbe for bringing this to our attention!

Bug Fixes
  • NODE-3309: remove redundant iteration of bulk write result (#​2815) (fac9610)
  • NODE-3234: fix url parsing for a mongodb+srv url that has commas in the database name (#​2789) (58c4e69)

Documentation

We invite you to try the mongodb package immediately, and report any issues to the NODE project.

v3.6.8

Compare Source

The MongoDB Node.js team is pleased to announce version 3.6.8 of the mongodb package!

Release Highlights

Thanks to the quick adoption of the previous new patch by the mongoose package (Automattic/mongoose#10265) a small bug was identified when connections to mongodb would timeout causing unnecessary clean up operations to run. Thank you @​vkarpov15!

Bug Fixes
  • NODE-3305: undo flipping of beforeHandshake flag for timeout errors (#​2813) (6e3bab3)

Documentation

We invite you to try the mongodb package immediately, and report any issues to the NODE project.

v3.6.7

Compare Source

The MongoDB Node.js team is pleased to announce version 3.6.7 of the driver

Release Highlights

This patch addresses a number of bug fixes. Notably, there was an interesting javascript related issue with sorting documents. It only impacts users using numerical keys in their documents.

> { a: 'asc', [23]: 'asc' }
{ [23]: 'asc', a: 'asc' } // numbers come first

In javascript, numerical keys are always iterated first when looping over the keys of an object followed by the chronological specification of each string key. This effectively changes the ordering of a sort document sent to mongodb. However our driver does accept sort specification in a variety of ways and one way to avoid this problem is passing an array of tuples:

[['a', 'asc'], ['23', 'asc']]

This ensures that mongodb is sent the 'a' key as the first sort key and '23' as the second.

Bug Fixes

Documentation

We invite you to try the driver immediately, and report any issues to the NODE project.

Thanks very much to all the community members who contributed to this release!

v3.6.6

Compare Source

The MongoDB Node.js team is pleased to announce version 3.6.6 of the driver

Release Highlights

This patch addresses a number of bugs listed below.
Most notably, for client side encryption users upgrading to this version of the driver along with the new version of mongodb-client-encryption@1.2.3 will alleviate the potential deadlock case if your connection pool was fully utilized. There will now be an internal MongoClient that will be used for metadata look ups (e.g, listCollections) when the pool size is under certain constraints. The events generated from this client are forwarded to the client instance you initialize so it is possible to monitor all events.

Bug

  • [NODE-2995] - Sharing a MongoClient for metadata lookup can lead to deadlock in drivers using automatic encryption
  • [NODE-3050] - Infinite loop on Windows due to a bug in require_optional package
  • [NODE-3120] - TypeError: Cannot read property 'roundTripTime' of undefined
  • [NODE-3122] - Pipelining an upload stream of GridFSBucket never finishes on Node v14
  • [NODE-3129] - Collection () .. .setReadPreference() not routing query to secondaries
  • [NODE-3133] - autoEncryption produces serverHeartbeatFailed - with MongoError typemismatch

Improvement

  • [NODE-3070] - Define error handling behavior of writeErrors and writeConcernError on Mongos

Documentation

We invite you to try the driver immediately, and report any issues to the NODE project.

Thanks very much to all the community members who contributed to this release!

v3.6.5

Compare Source

The MongoDB Node.js team is pleased to announce version 3.6.5 of the driver!

Notable Fixes

In this patch there is a fix surrounding an issue some users were encountering in serverless environments when using the Unified Topology. If the nodejs process went unused for a great amount of time there was an intermittent issue that would cause startSession to fail, however, issuing a dummy read request would resolve the problem. The session support check is now done after server selection meaning the driver has the most up to date information about the MongoDB deployment before utilizing sessions. We encourage any user's that implemented workarounds to updated their driver and make use of this fix.

In addition, the previous release of our driver added a warning about an upcoming change in the v4 version of the driver about how users can specify their write concern options. We've updated the driver to use nodejs's process.emitWarning API in nearly all cases where the driver prints something out, as well as limit most warning messages to only be printed once.

Bug

  • session support detection spec compliance (#​2732) (9baec71)
  • [NODE-3100] - startSession fails intermittently on servers that support sessions
  • [NODE-3066] - Accessing non-existent property 'MongoError' of module exports inside circular dependency
  • [NODE-3114] - Incorrect warning: Top-level use of w, wtimeout, j, and fsync is deprecated
  • [NODE-3119] - Node 14.5.4, mongo 3.6.4 Circular warnings

v3.6.4

Compare Source

MongoDB Driver v3.6.4

The MongoDB Node.js team is pleased to announce version 3.6.4 of the driver

Release Highlights

Explain Support

The full set of $explain verbosity settings are now supported:

  • queryPlanner
  • queryPlannerExtended
  • executionStats
  • allPlansExecution

In the following commands:

  • aggregate() (MDB 3.0+)
  • find() (MDB 3.0+)
  • remove() (MDB 3.0+)
  • update() (MDB 3.0+)
  • distinct() (MDB 3.2+)
  • findAndModify() (MDB 3.2+)
  • mapReduce() (MDB 4.4+)

You can get a lot of insight into the performance of a query or optimization using these fine grained reports.
To learn more about how to use explain read here.

Direct Connection Issue Revert

We removed automatic direct connection for the unified topology in the 3.6.3 release of the driver. This change was preparatory for the 4.0 version of the driver, where we'll always perform automatic discovery. To avoid making this kind of change in a patch release, this version restores automatic direct connection when connecting to a single host using the unified topology without a specified replicaSet and without directConnection: false, in line with previous 3.6 releases.

NOTE: In the next major version the unifiedTopology is the only Topology and it is required to either specify a replicaSet name or enable directConnection in order to connect to single nodes in a replica set.

Support Azure and GCP keystores in FLE

There are no functional changes to the driver to support using Azure and GCP keystores but a new mongodb-client-encryption release (v1.2.0) can be found here which prominently features support for these key stores.

Documentation

We invite you to try the driver immediately, and report any issues to the NODE project.

Thanks very much to all the community members who contributed to this release!

Release Notes

Bug
  • [NODE-2355] - GridFSBucketWriteStream doesn't implement stream.Writable properly
  • [NODE-2828] - noCursorTimeout does not seem to for find()
  • [NODE-2874] - Setting connectionTimeoutMS to 0 will result in a disconnection every heartbeatFrequencyMS
  • [NODE-2876] - Race condition when resetting server monitor
  • [NODE-2916] - Legacy topology hangs with unlimited socket timeout
  • [NODE-2945] - ignoreUndefined not works on findOneAndUpdate when { upsert: true }
  • [NODE-2965] - MongoClient.readPreference returns "primary" ignoring readPref from connection string
  • [NODE-2966] - Unified topology: server selection fails when trying to connect to a remote replica set with a member whose 'host' attribute resolves to 'localhost'
  • [NODE-2977] - Query parameters with path in connection string not working on windows
  • [NODE-2986] - MongoError: pool destroyed
Features
  • [NODE-2762] - Comprehensive Support for Explain
  • [NODE-2852] - Add explain support to non-cursor commands
  • [NODE-2853] - Add explain support to cursor-based commands
Improvement
  • [NODE-1726] - Deprecate Topology events in Db
  • [NODE-2825] - Support Azure and GCP keystores in FLE
  • [NODE-2880] - Improve stack traces in the session leak checker
  • [NODE-2895] - Update AggregateCursor "unwind" method to match the native driver
  • [NODE-2995] - Sharing a MongoClient for metadata lookup can lead to deadlock in drivers using automatic encryption

v3.6.3

Compare Source

The MongoDB Node.js team is pleased to announce version 3


Configuration

📅 Schedule: 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.


  • If you want to rebase/retry this PR, click this checkbox.

@mend-for-github-com mend-for-github-com bot changed the title Update dependency mongodb to v4 Update dependency mongodb to v4 - autoclosed Apr 22, 2022
@mend-for-github-com mend-for-github-com bot deleted the whitesource-remediate/mongodb-4.x branch April 22, 2022 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants