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
@@ -138,7 +138,7 @@ New features of the 5.0 {+driver-short+} release include:
138
138
This change is for Typescript only, and does not affect queries or operations
139
139
at runtime.
140
140
141
-
- Optional installation of ``@aws-sdk/credential-providers`` as a dependency.
141
+
- Optional installation of ``@aws-sdk/credential-providers`` as a peer dependency.
142
142
143
143
- The driver no longer includes AWS SDK modules by default. Use the
144
144
following ``npm`` command to install the SDK:
@@ -234,19 +234,35 @@ To learn more, see the `v4.12.0 Release Highlights <https://github.com/mongodb/n
234
234
What's New in 4.11
235
235
------------------
236
236
237
+
Prioritization Order in Monitoring
238
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
239
+
237
240
When connecting to MongoDB Server version 6.0 or later, the driver prioritizes
238
241
``electionId`` settings before ``setVersion`` settings during Server Discovery and
239
242
Monitoring events. In previous versions, the prioritization order was reversed.
240
243
241
-
This release also includes added support for **mutually
244
+
Changes to AWS Authentication
245
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
246
+
247
+
When you install the optional ``aws-sdk/credential-providers``
248
+
dependency, the driver uses the AWS SDK to retrieve AWS credentials from the
249
+
environment.
250
+
251
+
To learn more about this behavior, see the :ref:`MONGODB-AWS
252
+
<mongodb-aws>` section of the Authentication Mechanisms guide.
253
+
254
+
Mutually Recursive Schema Type Checking
255
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
256
+
257
+
This release includes added support for **mutually
242
258
recursive** collection schema types. The driver also provides type safety for
243
259
dot-notation queries up to a depth of eight in this release. At a depth greater
244
260
than or equal to eight, Typescript successfully compiles your code but does not
245
261
provide type safety. This depth limit on recursive types is a current limitation
246
262
of TypeScript.
247
263
248
-
Mutually Recursive Schema Type Checking Example
249
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
264
+
Example
265
+
```````
250
266
251
267
Suppose we have a collection of type ``Collection<Author>`` that contains the
252
268
following mutually recursive types:
@@ -484,7 +500,7 @@ Key Changes
484
500
~~~~~~~~~~~
485
501
486
502
Node.js Version
487
-
+++++++++++++++
503
+
```````````````
488
504
489
505
The minimum supported version of Node.js is now v12.9 or greater for
490
506
version 4 of the driver. Support for our 3.x branches will continue
@@ -496,7 +512,7 @@ until summer 2022 to allow time to upgrade.
496
512
497
513
498
514
Cursor Improvements
499
-
+++++++++++++++++++
515
+
```````````````````
500
516
501
517
Our Cursor implementation is now updated to make it clear what is possible
502
518
before and after execution of an operation.
@@ -528,7 +544,7 @@ similar to the following:
528
544
- ``ListCollectionsCursor``
529
545
530
546
Cursor Stream API
531
-
^^^^^^^^^^^^^^^^^
547
+
+++++++++++++++++
532
548
533
549
Our Cursor types no longer extend ``Readable`` directly. They must be
534
550
transformed into a stream by calling ``cursor.stream()``.
@@ -548,7 +564,7 @@ Use ``for await of`` syntax or any ``Promise`` helpers for
548
564
asynchronous iteration.
549
565
550
566
``MongoClientOptions`` Interface
551
-
+++++++++++++++++++++++++++++++++
567
+
````````````````````````````````
552
568
553
569
With type hinting, you should find that options passed to a ``MongoClient``
554
570
are enumerated and discoverable. We've made a large effort to process
@@ -563,7 +579,7 @@ to get your app up and running in a correct state quickly.
563
579
- It is no longer required to specify ``useUnifiedTopology`` or ``useNewUrlParser``.
564
580
565
581
``createCollection()``
566
-
++++++++++++++++++++++
582
+
``````````````````````
567
583
568
584
This method no longer supports a ``strict`` option, which returned
569
585
an error if the collection did not exist. To assert the existence of
@@ -582,7 +598,7 @@ a collection, use the ``listCollections()`` method instead.
582
598
}
583
599
584
600
``BulkWriteError`` → ``MongoBulkWriteError``
585
-
++++++++++++++++++++++++++++++++++++++++++++
601
+
````````````````````````````````````````````
586
602
587
603
``BulkWriteError`` is now renamed to ``MongoBulkWriteError``.
588
604
@@ -591,20 +607,20 @@ depending on your settings. Import the new class name ``MongoBulkWriteError``
591
607
when testing for errors in bulk operations.
592
608
593
609
``DB``
594
-
++++++
610
+
``````
595
611
596
612
``DB`` is no longer an ``EventEmitter``. Listen for events directly from your
597
613
``MongoClient`` instance.
598
614
599
615
``Collection.group()``
600
-
++++++++++++++++++++++
616
+
``````````````````````
601
617
602
618
The ``Collection.group()`` helper, deprecated since MongoDB 3.4,
603
619
is now removed. Use the aggregation pipeline :manual:`$group </reference/operator/aggregation/group/#pipe._S_group>`
604
620
operator instead.
605
621
606
622
Authentication
607
-
++++++++++++++
623
+
``````````````
608
624
609
625
- ``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