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