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 mongodb 4.14.0 → 5.6.0 (major) #400

Closed
wants to merge 1 commit into from

Conversation

depfu[bot]
Copy link
Contributor

@depfu depfu bot commented Jun 8, 2023

Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ mongodb (4.14.0 → 5.6.0) · Repo · Changelog

Release Notes

5.6.0

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

Release Highlights

Node 20 support

The MongoDB Node.js Driver now supports Node.js 20! 🎉

runCursorCommand API

We have added the Db#runCursorCommand method which can be used to execute generic cursor commands. This API complements the generic Db#command method.

TypeScript support for new time series options

The driver now has TypeScript support for the bucketMaxSpanSeconds and bucketRoundingSeconds options which will be available in MongoDB 7.0. You can read more about these options here.

Features

Bug Fixes

Documentation

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

5.5.0

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

Features

Bug Fixes

Documentation

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

5.4.0

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

Release Highlights

ChangeStream.tryNext Typescript fix

We have corrected the tryNext method on ChangeStream to use the TChange schema generic instead of the untyped Document interface. 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, and comment.

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

Documentation

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

5.3.0

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

Features

Bug Fixes

Documentation

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

5.2.0

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.

5.1.0

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

Release Highlights

Support for JavaScript bigints in the driver

The driver now supports automatic serialization of JavaScript bigints to BSON.Longs. It also supports deserializing of BSON.Long values returned from the server to bigint values when the useBigInt64 flag is passed as true.

import { MongoClient } from 'mongodb';

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

5.0.1

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 resources driver resources.

Bug Fixes

  • NODE-5027: revert "ensure that MessageStream is destroyed when connections are destroyed" (#3552) (2d178d0)

Documentation

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

5.0.0

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

Release Highlights

Node.js driver v5 emphazises the modernization of our API.

Farewell to Callbacks

Most notably, we have removed support for callbacks in favor of a Promise-only public API.
To ease the migration to a Promise-only approach when using the Node.js driver, callback support is available via the mongodb-legacy package. You can read more about this change in the Optional callback support migrated to mongodb-legacy section of the migration guide.

Dot Notation No Longer Enabled by Default

Version 4.3.0 of the Node.js driver introduced strict type checking on Filter queries that used dot notation. This functionality was enabled by default and proved to be a barrier for users upgrading to later versions of the Node.js v4.x driver. In order to ease the migration to v5.0.0, type strictness on queries that use dot notation has been removed from the CRUD API. The type checking capabilities are still available in an experimental type called StrictFilter. You can read more about this change in the Dot Notation TypeScript Support Removed By Default section of the migration guide.

BSON v5

This release also adopts all the changes in BSON v5.0.0 (see the release notes).
The driver now exports a BSON namespace that also has BSON.EJSON APIs available.
When working in projects where both the driver and bson are used, we recommend importing BSON types (ObjectId, Long, etc.) and BSON APIs from the driver instead of from BSON directly to ensure consistency when serializing and deserializing instances of the BSON types.

Other Notable Changes

@aws-sdk/credential-providers has now been moved to an optional peer dependency.
Consequently, in v5.0.0 or later versions of the driver, the AWS credential provider module must be installed manually to enable the use of the native AWS SDK for authentication.

Collection.insert, Collection.update, and Collection.remove methods have been removed in favor of their non-deprecated counterparts. You can read more about this and other changes in our Driver v5 Migration Guide.

⚠BREAKING CHANGES

Features

Documentation

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

4.16.0

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

Features

Bug Fixes

Documentation

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

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu
Copy link
Contributor Author

depfu bot commented Jul 13, 2023

Closed in favor of #409.

@depfu depfu bot closed this Jul 13, 2023
@depfu depfu bot deleted the depfu/update/yarn/mongodb-5.6.0 branch July 13, 2023 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants