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
+38-22Lines changed: 38 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -106,7 +106,7 @@ New features of the 5.0 {+driver-short+} release include:
106
106
This change is for Typescript only, and does not affect queries or operations
107
107
at runtime.
108
108
109
-
- Optional installation of ``@aws-sdk/credential-providers`` as a dependency.
109
+
- Optional installation of ``@aws-sdk/credential-providers`` as a peer dependency.
110
110
111
111
- The driver no longer includes AWS SDK modules by default. Use the
112
112
following ``npm`` command to install the SDK:
@@ -202,19 +202,35 @@ To learn more, see the `v4.12.0 Release Highlights <https://github.com/mongodb/n
202
202
What's New in 4.11
203
203
------------------
204
204
205
+
Prioritization Order in Monitoring
206
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
207
+
205
208
When connecting to MongoDB Server version 6.0 or later, the driver prioritizes
206
209
``electionId`` settings before ``setVersion`` settings during Server Discovery and
207
210
Monitoring events. In previous versions, the prioritization order was reversed.
208
211
209
-
This release also includes added support for **mutually
212
+
Changes to AWS Authentication
213
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
214
+
215
+
When you install the optional ``aws-sdk/credential-providers``
216
+
dependency, the driver uses the AWS SDK to retrieve AWS credentials from the
217
+
environment.
218
+
219
+
To learn more about this behavior, see the :ref:`MONGODB-AWS
220
+
<mongodb-aws>` section of the Authentication Mechanisms guide.
221
+
222
+
Mutually Recursive Schema Type Checking
223
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
224
+
225
+
This release includes added support for **mutually
210
226
recursive** collection schema types. The driver also provides type safety for
211
227
dot-notation queries up to a depth of eight in this release. At a depth greater
212
228
than or equal to eight, Typescript successfully compiles your code but does not
213
229
provide type safety. This depth limit on recursive types is a current limitation
214
230
of TypeScript.
215
231
216
-
Mutually Recursive Schema Type Checking Example
217
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
232
+
Example
233
+
```````
218
234
219
235
Suppose we have a collection of type ``Collection<Author>`` that contains the
220
236
following mutually recursive types:
@@ -452,7 +468,7 @@ Key Changes
452
468
~~~~~~~~~~~
453
469
454
470
Node.js Version
455
-
+++++++++++++++
471
+
```````````````
456
472
457
473
The minimum supported version of Node.js is now v12.9 or greater for
458
474
version 4 of the driver. Support for our 3.x branches will continue
@@ -464,7 +480,7 @@ until summer 2022 to allow time to upgrade.
464
480
465
481
466
482
Cursor Improvements
467
-
+++++++++++++++++++
483
+
```````````````````
468
484
469
485
Our Cursor implementation is now updated to make it clear what is possible
470
486
before and after execution of an operation.
@@ -496,7 +512,7 @@ similar to the following:
496
512
- ``ListCollectionsCursor``
497
513
498
514
Cursor Stream API
499
-
^^^^^^^^^^^^^^^^^
515
+
+++++++++++++++++
500
516
501
517
Our Cursor types no longer extend ``Readable`` directly. They must be
502
518
transformed into a stream by calling ``cursor.stream()``.
@@ -516,7 +532,7 @@ Use ``for await of`` syntax or any ``Promise`` helpers for
516
532
asynchronous iteration.
517
533
518
534
``MongoClientOptions`` Interface
519
-
+++++++++++++++++++++++++++++++++
535
+
````````````````````````````````
520
536
521
537
With type hinting, you should find that options passed to a ``MongoClient``
522
538
are enumerated and discoverable. We've made a large effort to process
@@ -531,7 +547,7 @@ to get your app up and running in a correct state quickly.
531
547
- It is no longer required to specify ``useUnifiedTopology`` or ``useNewUrlParser``.
532
548
533
549
``createCollection()``
534
-
++++++++++++++++++++++
550
+
``````````````````````
535
551
536
552
This method no longer supports a ``strict`` option, which returned
537
553
an error if the collection did not exist. To assert the existence of
@@ -550,7 +566,7 @@ a collection, use the ``listCollections()`` method instead.
550
566
}
551
567
552
568
``BulkWriteError`` → ``MongoBulkWriteError``
553
-
++++++++++++++++++++++++++++++++++++++++++++
569
+
````````````````````````````````````````````
554
570
555
571
``BulkWriteError`` is now renamed to ``MongoBulkWriteError``.
556
572
@@ -559,20 +575,20 @@ depending on your settings. Import the new class name ``MongoBulkWriteError``
559
575
when testing for errors in bulk operations.
560
576
561
577
``DB``
562
-
++++++
578
+
``````
563
579
564
580
``DB`` is no longer an ``EventEmitter``. Listen for events directly from your
565
581
``MongoClient`` instance.
566
582
567
583
``Collection.group()``
568
-
++++++++++++++++++++++
584
+
``````````````````````
569
585
570
586
The ``Collection.group()`` helper, deprecated since MongoDB 3.4,
571
587
is now removed. Use the aggregation pipeline :manual:`$group </reference/operator/aggregation/group/#pipe._S_group>`
572
588
operator instead.
573
589
574
590
Authentication
575
-
++++++++++++++
591
+
``````````````
576
592
577
593
- ``gssapiServiceName`` is now removed. Use `authMechanismProperties.SERVICE_NAME <{+api+}/interfaces/MongoClientOptions.html#authMechanismProperties>`__ in the URI or as an option on ``MongoClientOptions``.
0 commit comments