Skip to content

Commit

Permalink
DOCSP-39221 - v6.6 Updates (#888)
Browse files Browse the repository at this point in the history
Co-authored-by: Rea Rustagi <[email protected]>
  • Loading branch information
mongoKart and rustagir authored May 9, 2024
1 parent 9627bfe commit bf98afb
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 4 deletions.
1 change: 1 addition & 0 deletions .backportrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// the branches available to backport to
"targetBranchChoices": [
"master",
"v6.6",
"v6.5",
"v6.4",
"v6.3",
Expand Down
2 changes: 1 addition & 1 deletion config/redirects
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
define: prefix docs/drivers/node
define: base https://www.mongodb.com/${prefix}
define: versions v3.6 v3.7 v4.0 v4.1 v4.2 v4.3 v4.4 v4.5 v4.6 v4.7 v4.8 v4.9 v4.10 v4.11 v4.12 v4.13 v4.14 v4.15 v4.16 v4.17 v5.0 v5.1 v5.2 v5.3 v5.4 v5.5 v5.6 v5.7 v5.8 v5.9 v6.0 v6.1 v6.2 v6.3 v6.4 v6.5 master
define: versions v3.6 v3.7 v4.0 v4.1 v4.2 v4.3 v4.4 v4.5 v4.6 v4.7 v4.8 v4.9 v4.10 v4.11 v4.12 v4.13 v4.14 v4.15 v4.16 v4.17 v5.0 v5.1 v5.2 v5.3 v5.4 v5.5 v5.6 v5.7 v5.8 v5.9 v6.0 v6.1 v6.2 v6.3 v6.4 v6.5 v6.6 master

symlink: current -> master

Expand Down
2 changes: 1 addition & 1 deletion snooty.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ toc_landing_pages = [
sharedinclude_root = "https://raw.githubusercontent.com/10gen/docs-shared/main/"

[constants]
version = "6.5"
version = "6.6"
api = "https://mongodb.github.io/node-mongodb-native/{+version+}"
driver-long = "MongoDB Node.js driver"
driver-short = "Node.js driver"
Expand Down
2 changes: 1 addition & 1 deletion source/includes/mongodb-compatibility-table-node.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
- MongoDB 3.0
- MongoDB 2.6

* - 6.0 to 6.5
* - 6.0 to 6.6
- ✓
- ✓
- ✓
Expand Down
87 changes: 86 additions & 1 deletion source/whats-new.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ What's New
.. meta::
:keywords: version, update, upgrade, backwards compatibility


Learn what's new in:

* :ref:`Version 6.6 <version-6.6>`
* :ref:`Version 6.5 <version-6.5>`
* :ref:`Version 6.4 <version-6.4>`
* :ref:`Version 6.3 <version-6.3>`
Expand Down Expand Up @@ -57,6 +57,91 @@ Learn what's new in:
* :ref:`Version 3.7 <version-3.7>`
* :ref:`Version 3.6 <version-3.6>`

.. _version-6.6:

What's New in 6.6
-----------------

The {+driver-short+} v6.6 release includes the following features:

- Upgrades to using BSON 6.7.0. For details about the new BSON features, see the
release notes for `BSON 6.5.0
<https://github.com/mongodb/js-bson/releases/tag/v6.5.0>`__,
`BSON 6.6.0 <https://github.com/mongodb/js-bson/releases/tag/v6.6.0>`__, and
`BSON 6.7.0 <https://github.com/mongodb/js-bson/releases/tag/v6.7.0>`__.

- Adds the ``addStage()`` method to the fluid aggregation API. You can use this method to
add aggregation pipeline stages individually, as shown in the following
example:

.. code-block:: javascript

const documents = await users.aggregate().addStage({ $project: { name: true } }).toArray();

- Adds the ``cause`` and ``dependencyName`` fields to the ``MongoMissingDependencyError``
class. You can use these fields to programmatically determine if a package is missing
or why a package didn't load.

- Adds the ``minRoundTripTime`` property to the ``ServerDescription`` class. This
property contains the minimum round-trip time over the last 10 heartbeats.

- Adds the ``toJSON()`` method to the ``TopologyDescription`` class. Although you can use
this method to stringify ``TopologyDescription`` objects to JSON, we
recommend using Node's ``util.inspect()`` method instead, because it properly handles
all types used in JavaScript and the driver.

- Adds cursor options support for the ``Collection.indexExists()``,
``Collection.indexes()``, and ``Collection.indexInformation()`` methods in Typescript.

- Removes support for the ``readConcern`` and ``writeConcern`` options from the
``Collection.listSearchIndexes()`` method. ``listSearchIndexes()`` is an Atlas-specific method, and Atlas
search indexes don't support these options.

- Redefines the ``ServerDescription.roundTripTime`` property as a moving average. Previously,
it was a weighted average of the most recently observed heartbeat duration and the
previous duration.

- You can specify the type of a search index when creating the index, as shown
in the following example:

.. code-block:: js
:emphasize-lines: 3

const indexName = await collection.createSearchIndex({
name: 'my-vector-search-index',
type: 'vectorSearch',
definition: {
mappings: { dynamic: false }
}
});

- The ``UpdateFilter.$currentDate`` property no longer throws an error when you pass
it to a compound method, such as ``findOneAndUpdate()``, on a collection with a limited schema.

- The driver throws a ``MongoTransactionError`` only if you provide a
``ReadPreferenceMode`` other than ``primary`` and then try to perform a command that
involves a read operation.

- The data type of the ``TopologyDescription.error`` property is ``MongoError``.

- The ``Collection.indexExists()`` method no longer supports the ``full`` option.

- The ``Collection.indexInformation()``, ``Collection.indexes()``, and
``Db.indexInformation()`` methods have a return type of
``IndexDescriptionCompact | IndexDescriptionInfo[]`` in TypeScript.

- When retrieving AWS KMS (Key Management System) credentials, the driver no longer
throws an error when it receives an access key that includes
an expiration timestamp.

- The ``ClusterTime`` interface no longer defines the ``signature`` field as required in
TypeScript.

To learn more about this release, see the
`v6.6.0 Release Highlights
<https://github.com/mongodb/node-mongodb-native/releases/tag/v6.6.0>`__ on
GitHub.

.. _version-6.5:

What's New in 6.5
Expand Down

0 comments on commit bf98afb

Please sign in to comment.