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 #11

Closed
wants to merge 1 commit into from
Closed

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Oct 20, 2021

WhiteSource Renovate

This PR contains the following updates:

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

Release Notes

mongodb/node-mongodb-native

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.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!


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.

This PR has been generated by WhiteSource Renovate. View repository job log here.

@viezly
Copy link

viezly bot commented Oct 20, 2021

Pull request by bot. No need to analyze

@bgoonz bgoonz closed this Oct 21, 2021
@renovate
Copy link
Author

renovate bot commented Oct 21, 2021

Renovate Ignore Notification

As this PR has been closed unmerged, Renovate will ignore this upgrade and you will not receive PRs for any future 4.x releases. However, if you upgrade to 4.x manually then Renovate will reenable minor and patch updates automatically.

If this PR was closed by mistake or you changed your mind, you can simply rename this PR and you will soon get a fresh replacement PR opened.

@renovate renovate bot deleted the renovate/mongodb-4.x branch October 21, 2021 00:43
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.

2 participants