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

fix(deps): update dependency mongodb to v3.7.3 #11754

Merged
merged 1 commit into from Jun 13, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 13, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
mongodb 3.6.0 -> 3.7.3 age adoption passing confidence

Release Notes

mongodb/node-mongodb-native

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 (https://github.com/Automattic/mongoose/pull/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.6.3 of the driver

Release Highlights

MongoError: not master when running createIndex

A regression introduced in v3.6.2 meant that createIndex operations would not be executed with a fixed
primary read preference. This resulted in the driver selecting any server for the operation, which would
fail if a non-primary was selected.

Performance issues on AWS Lambda

The driver periodically monitors members of the replicaset for changes in the topology, but ensures that
the "monitoring thread" is never woken sooner than 500ms. Measuring this elapsed time depends on a
stable clock, which is not available to us in some virtualized environments like AWS Lambda. The result
was that periodically operations would think there were no available servers, and the driver would force
a wait of heartbeatFrequencyMS (10s by default) before reaching out to servers again for a new
monitoring check. The internal async interval timer has been improved to account for these environments

GSSAPI AuthProvider reuses single kerberos client

A regression introduced in v3.6.0 forced the driver to reuse a single kerberos client for all
authentication attempts. This would result in incomplete authentication flows, and occaisionally even
a crash in the kerberos module. The driver has been reverted to creating a kerberos client per
authentication attempt.

Performance regression due to use of setImmediate

A change introduced in v3.6.1 switched all our usage of process.nextTick in the connection pool with
setImmediate per Node.js core recommendation. This was observed to introduce noticeable latency when the event loop
was experiencing pressure, so the change was reverted for this release pending further investigation.

Community Contributions
  • @​jswangjunsheng submitted a fix for a rare scenario when wait queue members time out before connection establishment
  • @​through-a-haze submitted a fix for incorrect construction of an X509 authentication message
  • @​andreialecu helped us indicate peer optional dependencies in our package.json for stricter package managers (pnpm, yarn2)

Documentation

Reference: http://mongodb.github.io/node-mongodb-native/3.6/
API: http://mongodb.github.io/node-mongodb-native/3.6/api/
Changelog: https://github.com/mongodb/node-mongodb-native/blob/3.6/HISTORY.md

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-2172] - Change stream breaks on disconnection when there&#​39;s something piped into it.
  • [NODE-2784] - MongoError: Not Master when running createIndex in 3.6.0
  • [NODE-2807] - MongoClient.readPreference always returns primary
  • [NODE-2827] - Connecting to single mongos makes driver think it is connected to a standalone
  • [NODE-2829] - MongoDB Driver 3.6+ Performance issues on AWS Lambda
  • [NODE-2835] - Remove default timeout for read operations
  • [NODE-2859] - GSSAPI AuthProvider causing crashes in Compass
  • [NODE-2861] - Performance Regression for usage of mongodb connections (queries, inserts, ...)
  • [NODE-2865] - Connections can be leaked if wait queue members are cancelled
  • [NODE-2869] - Invalid assignment of X509 username makes authentication impossible

Improvement

  • [NODE-2834] - Remove deprecation of AggregationCursor#geoNear
  • [NODE-2867] - Use peerDependenciesMeta field to mark peer optional dependencies

v3.6.2

Compare Source

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

Release Highlights

Updated bl dependency due to CVE-2020-8244

See this link for more details: GHSA-pp7h-53gx-mx7r

Connection pool wait queue processing is too greedy

The logic for processing the wait queue in our connection pool ran the risk of
starving the event loop. Calls to process the wait queue are now wrapped in a
setImmediate to prevent starvation

Documentation

Reference: http://mongodb.github.io/node-mongodb-native/3.6/
API: http://mongodb.github.io/node-mongodb-native/3.6/api/
Changelog: https://github.com/mongodb/node-mongodb-native/blob/3.6/HISTORY.md

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-2798] - Update version of dependency "bl" due to vulnerability
  • [NODE-2803] - Connection pool wait queue processing is too greedy

v3.6.1

Compare Source

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

Release Highlights

Kerberos

A bug in introducing the new CMAP Connection prevented some users from properly authenticating with the kerberos module.

Index options are not respected with createIndex

The logic for building the createIndex command was changed in v3.6.0 to use an allowlist rather than a blocklist, but omitted a number of index types in that list. This release reintroduces all supported index types to the allowlist.

Remove strict mode for createCollection

Since v3.6.0 createCollection will no longer returned a cached Collection instance if a collection already exists in the database, rather it will return a server error stating that the collection already exists. This is the same behavior provided by the strict option for createCollection, so that option has been removed from documentation.

Documentation

Reference: http://mongodb.github.io/node-mongodb-native/3.6/
API: http://mongodb.github.io/node-mongodb-native/3.6/api/
Changelog: https://github.com/mongodb/node-mongodb-native/blob/3.6/HISTORY.md

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-2731] - CMAP Connection type does not provide host/port properties
  • [NODE-2755] - "language_override" option support for text index is broken

Improvement

  • [NODE-2730] - Move MongoAuthProcess into the driver source tree
  • [NODE-2746] - Strict mode for `createCollection` should be removed

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - 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, check this box

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

@renovate renovate bot added the dependencies Pull requests that update a dependency file label Jun 13, 2023
@renovate
Copy link
Contributor Author

renovate bot commented Jun 13, 2023

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: sample/13-mongo-typeorm/package-lock.json
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: typeorm@0.3.16
npm ERR! Found: mongodb@3.7.3
npm ERR! node_modules/mongodb
npm ERR!   mongodb@"3.7.3" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional mongodb@"^5.2.0" from typeorm@0.3.16
npm ERR! node_modules/typeorm
npm ERR!   typeorm@"0.3.16" from the root project
npm ERR!   peer typeorm@"^0.3.0" from @nestjs/typeorm@9.0.1
npm ERR!   node_modules/@nestjs/typeorm
npm ERR!     @nestjs/typeorm@"9.0.1" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: mongodb@5.6.0
npm ERR! node_modules/mongodb
npm ERR!   peerOptional mongodb@"^5.2.0" from typeorm@0.3.16
npm ERR!   node_modules/typeorm
npm ERR!     typeorm@"0.3.16" from the root project
npm ERR!     peer typeorm@"^0.3.0" from @nestjs/typeorm@9.0.1
npm ERR!     node_modules/@nestjs/typeorm
npm ERR!       @nestjs/typeorm@"9.0.1" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /tmp/worker/ff8743/cafb3d/cache/others/npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /tmp/worker/ff8743/cafb3d/cache/others/npm/_logs/2023-06-13T07_16_12_035Z-debug-0.log

@kamilmysliwiec kamilmysliwiec merged commit c96f1b7 into master Jun 13, 2023
3 of 5 checks passed
@delete-merged-branch delete-merged-branch bot deleted the renovate/mongodb-3.x branch June 13, 2023 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant