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
@@ -174,7 +174,7 @@ New features of the 5.0 {+driver-short+} release include:
174
174
This change is for Typescript only, and does not affect queries or operations
175
175
at runtime.
176
176
177
-
- Optional installation of ``@aws-sdk/credential-providers`` as a dependency.
177
+
- Optional installation of ``@aws-sdk/credential-providers`` as a peer dependency.
178
178
179
179
- The driver no longer includes AWS SDK modules by default. Use the
180
180
following ``npm`` command to install the SDK:
@@ -270,19 +270,35 @@ To learn more, see the `v4.12.0 Release Highlights <https://github.com/mongodb/n
270
270
What's New in 4.11
271
271
------------------
272
272
273
+
Prioritization Order in Monitoring
274
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
275
+
273
276
When connecting to MongoDB Server version 6.0 or later, the driver prioritizes
274
277
``electionId`` settings before ``setVersion`` settings during Server Discovery and
275
278
Monitoring events. In previous versions, the prioritization order was reversed.
276
279
277
-
This release also includes added support for **mutually
280
+
Changes to AWS Authentication
281
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
282
+
283
+
When you install the optional ``aws-sdk/credential-providers``
284
+
dependency, the driver uses the AWS SDK to retrieve AWS credentials from the
285
+
environment.
286
+
287
+
To learn more about this behavior, see the :ref:`MONGODB-AWS
288
+
<mongodb-aws>` section of the Authentication Mechanisms guide.
289
+
290
+
Mutually Recursive Schema Type Checking
291
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
292
+
293
+
This release includes added support for **mutually
278
294
recursive** collection schema types. The driver also provides type safety for
279
295
dot-notation queries up to a depth of eight in this release. At a depth greater
280
296
than or equal to eight, Typescript successfully compiles your code but does not
281
297
provide type safety. This depth limit on recursive types is a current limitation
282
298
of TypeScript.
283
299
284
-
Mutually Recursive Schema Type Checking Example
285
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
300
+
Example
301
+
```````
286
302
287
303
Suppose we have a collection of type ``Collection<Author>`` that contains the
288
304
following mutually recursive types:
@@ -520,7 +536,7 @@ Key Changes
520
536
~~~~~~~~~~~
521
537
522
538
Node.js Version
523
-
+++++++++++++++
539
+
```````````````
524
540
525
541
The minimum supported version of Node.js is now v12.9 or greater for
526
542
version 4 of the driver. Support for our 3.x branches will continue
@@ -532,7 +548,7 @@ until summer 2022 to allow time to upgrade.
532
548
533
549
534
550
Cursor Improvements
535
-
+++++++++++++++++++
551
+
```````````````````
536
552
537
553
Our Cursor implementation is now updated to make it clear what is possible
538
554
before and after execution of an operation.
@@ -564,7 +580,7 @@ similar to the following:
564
580
- ``ListCollectionsCursor``
565
581
566
582
Cursor Stream API
567
-
^^^^^^^^^^^^^^^^^
583
+
+++++++++++++++++
568
584
569
585
Our Cursor types no longer extend ``Readable`` directly. They must be
570
586
transformed into a stream by calling ``cursor.stream()``.
@@ -584,7 +600,7 @@ Use ``for await of`` syntax or any ``Promise`` helpers for
584
600
asynchronous iteration.
585
601
586
602
``MongoClientOptions`` Interface
587
-
+++++++++++++++++++++++++++++++++
603
+
````````````````````````````````
588
604
589
605
With type hinting, you should find that options passed to a ``MongoClient``
590
606
are enumerated and discoverable. We've made a large effort to process
@@ -599,7 +615,7 @@ to get your app up and running in a correct state quickly.
599
615
- It is no longer required to specify ``useUnifiedTopology`` or ``useNewUrlParser``.
600
616
601
617
``createCollection()``
602
-
++++++++++++++++++++++
618
+
``````````````````````
603
619
604
620
This method no longer supports a ``strict`` option, which returned
605
621
an error if the collection did not exist. To assert the existence of
@@ -618,7 +634,7 @@ a collection, use the ``listCollections()`` method instead.
618
634
}
619
635
620
636
``BulkWriteError`` → ``MongoBulkWriteError``
621
-
++++++++++++++++++++++++++++++++++++++++++++
637
+
````````````````````````````````````````````
622
638
623
639
``BulkWriteError`` is now renamed to ``MongoBulkWriteError``.
624
640
@@ -627,20 +643,20 @@ depending on your settings. Import the new class name ``MongoBulkWriteError``
627
643
when testing for errors in bulk operations.
628
644
629
645
``DB``
630
-
++++++
646
+
``````
631
647
632
648
``DB`` is no longer an ``EventEmitter``. Listen for events directly from your
633
649
``MongoClient`` instance.
634
650
635
651
``Collection.group()``
636
-
++++++++++++++++++++++
652
+
``````````````````````
637
653
638
654
The ``Collection.group()`` helper, deprecated since MongoDB 3.4,
639
655
is now removed. Use the aggregation pipeline :manual:`$group </reference/operator/aggregation/group/#pipe._S_group>`
640
656
operator instead.
641
657
642
658
Authentication
643
-
++++++++++++++
659
+
``````````````
644
660
645
661
- ``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