Skip to content

Commit 2541981

Browse files
norareidymongoKart
authored andcommitted
DOCSP-32548: Breaking changes consolidation (mongodb#777)
* DOCSP-32548: Breaking changes consolidation * changing admonition * deleting repeated info * review feedback
1 parent 6105506 commit 2541981

File tree

2 files changed

+22
-87
lines changed

2 files changed

+22
-87
lines changed

source/upgrade.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,13 @@ Version 6.x Breaking Changes
9696
- The ClientEncryption API returns promises instead of callbacks.
9797
- The ``socks`` package, which enables SOCKS5 proxy support, is a
9898
peer-optional dependency. You must install the package to enable
99-
SOCKS5 in your application.
99+
SOCKS5 in your application. To learn more, see :ref:`node-connect-socks`.
100100
- If you start a session on a client, then pass that session to a
101101
different client, the driver throws an error when you
102102
perform any operations in the session.
103103
- The ``includeResultMetadata`` option for compound operation methods is
104-
``false`` by default.
104+
``false`` by default. See the :ref:`Built-in Methods <node-compound-operations-builtin>`
105+
section of the Compound Operations guide for more information.
105106
- Raised the optional ``kerberos`` dependency minimum version to 2.0.1 and
106107
removed support for version 1.x.
107108
- Raised the optional ``zstd`` dependency minimum version to 1.1.0.

source/whats-new.txt

Lines changed: 19 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -48,55 +48,11 @@ Learn what's new in:
4848
What's New in 6.0
4949
-----------------
5050

51-
.. important:: Breaking Changes in v6.0
51+
.. warning:: Breaking Changes in v6.0
5252

53-
- Version 6.0 of the {+driver-short+} requires Node.js v16.20.1 or later.
54-
55-
- If you add ``mongodb-client-encryption`` as a dependency,
56-
the major version number must match that of the {+driver-short+}. For example,
57-
{+driver-short+} v6.x.x requires ``mongodb-client-encryption`` v6.x.x.
58-
59-
- Automatic Encryption methods are now in the {+driver-short+}. You must
60-
import these methods from the driver instead of from
61-
``mongodb-client-encryption``.
62-
63-
- Removed the ``ObjectId`` constructor that accepted a 12-character string.
64-
65-
- Modified ``abortTransaction()`` and ``commitTransaction()`` methods to return
66-
``null`` instead of the raw command results.
67-
68-
- Removed connection option helpers that accepted values other than ``true``
69-
or ``false`` as booleans. You must provide either ``true`` or ``false`` values in
70-
the connection string or to the MongoClient constructor.
71-
72-
- Removed the ``Binary`` BSON type constructor that accepted a string.
73-
74-
- The ``Binary.write()`` method no longer accepts a string to write
75-
to the binary BSON object.
76-
77-
- The ClientEncryption API returns promises instead of callbacks.
78-
79-
- The ``socks`` package, which enables SOCKS5 proxy support, is a
80-
peer-optional dependency. To use ``socks`` functionality in your
81-
application, you must install the package. To learn more, see
82-
:ref:`node-connect-socks`.
83-
84-
- If you start a session on a client, then pass that session to a
85-
different client, the driver throws an error when you
86-
perform any operations in the session.
87-
88-
- The ``includeResultMetadata`` option for compound operation methods
89-
is ``false`` by default. See the :ref:`Built-in
90-
Methods <node-compound-operations-builtin>` section of the Compound
91-
Operations guide for more information.
92-
93-
- Raised the optional ``kerberos`` dependency minimum version to 2.0.1 and
94-
removed support for version 1.x.
95-
96-
- Raised the optional ``zstd`` dependency minimum version to 1.1.0.
97-
98-
To learn more about the breaking changes included in this release, see the
99-
`v6.0.0 Release Highlights <https://github.com/mongodb/node-mongodb-native/releases/tag/v6.0.0>`__.
53+
This driver version introduces breaking changes. For a list of these changes, see
54+
the :ref:`Version 6.x Breaking Changes section <node-breaking-changes-v6.x>` in the
55+
Upgrade guide.
10056

10157
The {+driver-short+} v6.0 release includes the following features:
10258

@@ -350,34 +306,11 @@ To learn more, see the `v5.1.0 Release Highlights
350306
What's New in 5.0
351307
-----------------
352308

353-
.. important:: Breaking Changes in v5.0
354-
355-
- Version 5.0 of the {+driver-short+} is not compatible with Node.js
356-
v12 or earlier. If you want to use this version of the driver, You must
357-
use Node.js v14.20.1 or greater.
358-
359-
- This release removes support for callbacks in favor of a promise-based API.
360-
The following list provides some strategies for callback users to adopt this
361-
version:
309+
.. warning:: Breaking Changes in v5.0
362310

363-
- Migrate to the promise-based API (recommended)
364-
- Use the promise-based API and ``util.callbackify``
365-
- Add ``mongodb-legacy`` to continue using callbacks
366-
367-
For more information about these strategies, see
368-
`Changes in the MongoDB Node.js Driver v5 <https://github.com/mongodb/node-mongodb-native/blob/main/etc/notes/CHANGES_5.0.0.md>`__.
369-
370-
- This release removes support for the ``Collection.insert()``,
371-
``Collection.update()``, and ``Collection.remove()`` helper methods.
372-
The following list provides instructions on how to replace the
373-
functionality of the removed methods:
374-
375-
- Migrate from ``Collection.insert()`` to ``insertOne()`` or ``insertMany()``
376-
- Migrate from ``Collection.update()`` to ``updateOne()`` or ``updateMany()``
377-
- Migrate from ``Collection.remove()`` to ``deleteOne()`` or ``deleteMany()``
378-
379-
To view a full list of breaking changes introduced in this version, see the :ref:`Breaking
380-
Changes section <node-breaking-changes-v5.x>` in the Upgrade guide.
311+
This driver version introduces breaking changes. For a list of these changes, see
312+
the :ref:`Version 5.x Breaking Changes section <node-breaking-changes-v5.x>` in the
313+
Upgrade guide.
381314

382315
New features of the 5.0 {+driver-short+} release include:
383316

@@ -747,13 +680,21 @@ New features of the 4.1 Node.js driver release include:
747680
What's New in 4.0
748681
-----------------
749682

750-
.. important::
683+
.. warning:: Breaking Changes in v4.0
751684

752-
In this release of the driver, the deprecated ``collection.count()`` method was inadvertently changed to
753-
behave like ``collection.countDocuments()``. This behavior is corrected in :ref:`version 4.4 <version-4.4>`.
685+
This driver version introduces breaking changes. For a list of these changes, see
686+
the :ref:`Version 4.x Breaking Changes section <node-breaking-changes-v4.x>` in
687+
the Upgrade guide.
754688

755689
New features of the 4.0 Node.js driver release include:
756690

691+
.. important::
692+
693+
In this release of the driver, the deprecated ``collection.count()`` method was
694+
inadvertently changed to behave like ``collection.countDocuments()``. This behavior
695+
is corrected in :ref:`version 4.4 <version-4.4>`.
696+
697+
757698
TypeScript
758699
~~~~~~~~~~
759700

@@ -1044,13 +985,6 @@ The ``instrument()`` method is now removed. Use command monitoring instead.
1044985
See our guide on :doc:`command monitoring </fundamentals/monitoring/command-monitoring>`
1045986
for more information.
1046987

1047-
1048-
Detailed List
1049-
~~~~~~~~~~~~~
1050-
1051-
To view a full list of breaking changes introduced in this version, see the :ref:`Breaking
1052-
Changes section <node-breaking-changes-v4.x>` in the Upgrade guide.
1053-
1054988
.. _version-3.7:
1055989

1056990
What's New in 3.7

0 commit comments

Comments
 (0)