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

[Snyk] Upgrade mongodb from 4.3.1 to 4.5.0 #1

Closed

Conversation

Hashen110
Copy link
Owner

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


Snyk has created this PR to upgrade mongodb from 4.3.1 to 4.5.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.


  • The recommended version is 3 versions ahead of your current version.
  • The recommended version was released a month ago, on 2022-04-04.
Release notes
Package name: mongodb
  • 4.5.0 - 2022-04-04

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

    Release Highlights

    This release includes a number of enhancements noted below.

    comment option support

    The comment option is now widely available: by setting a comment on an operation you can trace its value in database logs for more insights.

    collection.insertOne(
      { name: 'spot' },
      { comment: { started: new Date() } }
    )

    An example of a log line, trimmed for brevity. We can see the timestamp of the log and the time created on our client application differ.

    {
      "t": { "$date": "2022-04-04T16:08:56.079-04:00" },
      "attr": {
        "commandArgs": {
          "documents": [ { "_id": "...", "name": "spot" } ],
          "comment": { "started": { "$date": "2022-04-04T20:08:56.072Z" } } }
      }
    }

    Socket timeout fixes for FaaS environments

    This release includes a fix for serverless environments where transient serverHeartBeatFailure events that could be corrected to serverHeartBeatSucceeded events in the next tick of the event loop were nonetheless handled as an actual issue with the client's connection and caused unnecessary resource clean up routines.

    It turns out that since Node.js handles timeout events first in the event loop, socket timeouts expire while the FaaS environment is dormant and the timeout handler code is the first thing that runs upon function wake prior to checking for any data from the server. Delaying the timeout handling until after the data reading phase avoids the sleep-induced timeout error in the cases where the connection is still healthy.

    TS fixes for 4.7

    Typescript 4.7 may not be out yet but in preparation for its release we've fixed issues compiling against that version. The main new obstacle was defaulting generic arguments that require that the constraining condition enforce similarity with the defaulted type. You may notice that our change stream watch<T extends Document = Document>() methods now requires that T extends Document, a requirement that already had to be met by the underlying ChangeStreamDocument type.

    Features

    Bug Fixes

    Documentation

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

  • 4.4.1 - 2022-03-03

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

    Bug Fixes

    Documentation

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

  • 4.4.0 - 2022-02-17

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

    Release Highlights

    This release includes a few new features described below.

    KMIP

    KMIP can now be configured as a KMS provider for CSFLE by providing the KMIP endpoint in the kmsProviders option.

    Example:

    new MongoClient(uri, { autoEncryption: { kmsProviders: { kmip: { endpoint: 'host:port' }}}})

    CSFLE TLS

    Custom TLS options can now be provided for connection to the KMS servers on a per KMS provider basis.

    Example:

    new MongoClient(uri, { autoEncryption: { tlsOptions: { aws: { tlsCAFile: 'path/to/file' }}}})

    Valid options are tlsCAFile, tlsCertificateKeyFile, tlsCertificateKeyFilePassword and all accept strings as values: a string path to a certificate location on the file system or a string password.

    Kerberos

    Hostname canonicalization when using GSSAPI authentication now accepts 'none', 'forward', and 'forwardAndReverse' as auth mechanism properties. 'none' will perform no canonicalization (default), 'forward' will perform a forward cname lookup, and 'forwardAndReverse' will perform a forward lookup followed by a reverse PTR lookup on the IP address. Previous boolean values are still accepted and map to false -> 'none' and true -> 'forwardAndReverse'.

    Example:

    new MongoClient('mongodb://user:pass@host:port/db?authMechanism=GSSAPI&authMechanismProperties=CANONICALIZE_HOST_NAME=forward');

    For cases when the service host name differs from the connection’s host name (most likely when creating new users on localhost), a SERVICE_HOST auth mechanism property may now be provided.

    Example:

    new MongoClient('mongodb://user:pass@host:port/db?authMechanism=GSSAPI&authMechanismProperties=SERVICE_HOST:example.com')

    ⚠️ collection.count() and cursor.count()

    In the 4.0.0 release of the driver, the deprecated collection.count() method was inadvertently changed to behave like collection.countDocuments(). In this release, we have updated the collection.count() behavior to match the legacy behavior:

    • If a query is passed in, collection.count will behave the same as collection.countDocuments and perform a collection scan.
    • If no query is passed in, collection.count will behave the same as collection.estimatedDocumentCount and rely on collection metadata.

    We also deprecated the cursor.count() method and will remove it in the next major version along with collection.count(); please use collection.estimatedDocumentCount() or collection.countDocuments() instead.

    Features

    Bug Fixes

    Documentation

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

  • 4.3.1 - 2022-01-18
    Read more
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants