You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/whats-new.txt
+22-24Lines changed: 22 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -33,31 +33,39 @@ Learn what's new in:
33
33
What's New in 5.0
34
34
-----------------
35
35
36
-
.. important:: Version 5.0 Not Compatible with Node.js Version 12
36
+
.. important:: Breaking Changes in v5.0
37
37
38
-
Version 5.0 of the {+driver-short+} is not compatible with Node.js
39
-
version 12 or earlier. If you wish to upgrade, you need to use
40
-
Node.js version 14.20.1 or greater.
38
+
- Version 5.0 of the {+driver-short+} is not compatible with Node.js
39
+
v12 or earlier. If you want to use this version of the driver, You must
40
+
use Node.js v14.20.1 or greater.
41
41
42
-
New features of the 5.0 {+driver-short+} release include:
42
+
- This release removes support for callbacks in favor of a promise-based API.
43
+
The following list provides some strategies for callback users to adopt this
44
+
version:
45
+
46
+
- Migrate to the promise-based API (recommended)
47
+
- Use the promise-based API and ``util.callbackify``
48
+
- Add ``mongodb-legacy`` to continue using callbacks
43
49
44
-
.. important:: Breaking Change: Removal of Callback Support
50
+
For more information about these strategies, see
51
+
`Changes in the MongoDB Node.js Driver v5 <https://github.com/mongodb/node-mongodb-native/blob/main/etc/notes/CHANGES_5.0.0.md>`__.
45
52
46
-
This release removes support for callbacks in favor of a promise-based API.
47
-
The following list provides some strategies for callback users to adopt this
48
-
version:
53
+
- This release removes support for the ``Collection.insert()``,
54
+
``Collection.update()``, and ``Collection.remove()`` helper methods.
55
+
The following list provides instructions on how to replace the
56
+
functionality of the removed methods:
49
57
50
-
- Migrate to the promise-based API (recommended)
51
-
- Use the promise-based API and ``util.callbackify``
52
-
- Add ``mongodb-legacy`` to continue using callbacks
58
+
- Migrate from ``Collection.insert()`` to ``insertOne()`` or ``insertMany()``
59
+
- Migrate from ``Collection.update()`` to ``updateOne()`` or ``updateMany()``
60
+
- Migrate from ``Collection.remove()`` to ``deleteOne()`` or ``deleteMany()``
53
61
54
-
For more information about these strategies, see the `v5 Change Notes <https://github.com/mongodb/node-mongodb-native/blob/main/etc/notes/CHANGES_5.0.0.md>`__.
62
+
New features of the 5.0 {+driver-short+} release include:
55
63
56
64
- By default, the driver no longer checks types referenced in dot notation
57
65
unless the ``StrictFilter`` type annotation is explicitly
58
66
used. To learn more about this change, see the :ref:`Typescript fundamentals
59
67
page <node-ts-type-safety>`.
60
-
68
+
61
69
.. note::
62
70
63
71
This change is for Typescript only, and does not affect queries or operations
@@ -77,16 +85,6 @@ New features of the 5.0 {+driver-short+} release include:
77
85
dependency successfully, the driver uses the AWS SDK itself to
78
86
manage credentials from the environment.
79
87
80
-
.. important:: Breaking Change: Removal of CRUD Helper Methods
81
-
82
-
This release removes support for the ``Collection.insert()``, ``Collection.update()``, and
83
-
``Collection.remove()`` helper methods. The following list provides
84
-
instructions on how to replace the functionality of the removed methods:
85
-
86
-
- Migrate from ``Collection.insert()`` to ``insertOne()`` or ``insertMany()``
87
-
- Migrate from ``Collection.update()`` to ``updateOne()`` or ``updateMany()``
88
-
- Migrate from ``Collection.remove()`` to ``deleteOne()`` or ``deleteMany()``
0 commit comments