Skip to content

refactor: Upgrade mongodb from 4.10.0 to 5.4.0 #8590

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

Closed

Conversation

parseplatformorg
Copy link
Contributor

This PR was automatically created by Snyk using the credentials of a real user.


Snyk has created this PR to upgrade mongodb from 4.10.0 to 5.4.0.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


Warning: This is a major version upgrade, and may be a breaking change.

  • The recommended version is 14 versions ahead of your current version.
  • The recommended version was released 25 days ago, on 2023-05-04.
Release notes
Package name: mongodb
  • 5.4.0 - 2023-05-04

    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 - 2023-04-18

    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 - 2023-04-04

    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 - 2023-02-23

    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 - 2023-02-07

    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 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 - 2023-01-31
    Read more
  • 5.0.0-alpha.0 - 2023-01-24
    Read more
  • 4.16.0 - 2023-04-18
    Read more
  • 4.15.0 - 2023-04-04
    Read more
  • 4.14.0 - 2023-02-07
    Read more
  • 4.13.0 - 2022-12-19
  • 4.12.1 - 2022-11-23
  • 4.12.0 - 2022-11-16
  • 4.11.0 - 2022-10-19
  • 4.10.0 - 2022-09-19
from mongodb GitHub release notes
Commit messages
Package name: mongodb

Compare


Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

🧐 View latest project report

🛠 Adjust upgrade PR settings

🔕 Ignore this dependency or unsubscribe from future upgrade PRs

@parse-github-assistant
Copy link

I will reformat the title to use the proper commit message syntax.

@parse-github-assistant parse-github-assistant bot changed the title [Snyk] Upgrade mongodb from 4.10.0 to 5.4.0 refactor: Upgrade mongodb from 4.10.0 to 5.4.0 May 29, 2023
@parse-github-assistant
Copy link

Thanks for opening this pull request!

  • ❌ Please link an issue that describes the reason for this pull request, otherwise your pull request will be closed. Make sure to write it as Closes: #123 in the PR description, so I can recognize it.

@codecov
Copy link

codecov bot commented May 29, 2023

Codecov Report

Patch coverage has no change and project coverage change: -6.93 ⚠️

Comparison is base (505dd6b) 94.33% compared to head (990d61b) 87.41%.

❗ Current head 990d61b differs from pull request most recent head a0efd09. Consider uploading reports for the commit a0efd09 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##            alpha    #8590      +/-   ##
==========================================
- Coverage   94.33%   87.41%   -6.93%     
==========================================
  Files         183      183              
  Lines       14576    14576              
==========================================
- Hits        13750    12741    -1009     
- Misses        826     1835    +1009     

see 28 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@mtrezza mtrezza closed this Jun 1, 2023
@mtrezza mtrezza deleted the snyk-upgrade-4943124b2d082167122694a3f2f96151 branch June 1, 2023 16:06
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.

3 participants