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
@@ -91,7 +91,7 @@ New features of the 5.0 {+driver-short+} release include:
91
91
This change is for Typescript only, and does not affect queries or operations
92
92
at runtime.
93
93
94
-
- Optional installation of ``@aws-sdk/credential-providers`` as a dependency.
94
+
- Optional installation of ``@aws-sdk/credential-providers`` as a peer dependency.
95
95
96
96
- The driver no longer includes AWS SDK modules by default. Use the
97
97
following ``npm`` command to install the SDK:
@@ -175,19 +175,35 @@ To learn more, see the `v4.12.0 Release Highlights <https://github.com/mongodb/n
175
175
What's New in 4.11
176
176
------------------
177
177
178
+
Prioritization Order in Monitoring
179
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
180
+
178
181
When connecting to MongoDB Server version 6.0 or later, the driver prioritizes
179
182
``electionId`` settings before ``setVersion`` settings during Server Discovery and
180
183
Monitoring events. In previous versions, the prioritization order was reversed.
181
184
182
-
This release also includes added support for **mutually
185
+
Changes to AWS Authentication
186
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
187
+
188
+
When you install the optional ``aws-sdk/credential-providers``
189
+
dependency, the driver uses the AWS SDK to retrieve AWS credentials from the
190
+
environment.
191
+
192
+
To learn more about this behavior, see the :ref:`MONGODB-AWS
193
+
<mongodb-aws>` section of the Authentication Mechanisms guide.
194
+
195
+
Mutually Recursive Schema Type Checking
196
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
197
+
198
+
This release includes added support for **mutually
183
199
recursive** collection schema types. The driver also provides type safety for
184
200
dot-notation queries up to a depth of eight in this release. At a depth greater
185
201
than or equal to eight, Typescript successfully compiles your code but does not
186
202
provide type safety. This depth limit on recursive types is a current limitation
187
203
of TypeScript.
188
204
189
-
Mutually Recursive Schema Type Checking Example
190
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
205
+
Example
206
+
```````
191
207
192
208
Suppose we have a collection of type ``Collection<Author>`` that contains the
193
209
following mutually recursive types:
@@ -425,7 +441,7 @@ Key Changes
425
441
~~~~~~~~~~~
426
442
427
443
Node.js Version
428
-
+++++++++++++++
444
+
```````````````
429
445
430
446
The minimum supported version of Node.js is now v12.9 or greater for
431
447
version 4 of the driver. Support for our 3.x branches will continue
@@ -437,7 +453,7 @@ until summer 2022 to allow time to upgrade.
437
453
438
454
439
455
Cursor Improvements
440
-
+++++++++++++++++++
456
+
```````````````````
441
457
442
458
Our Cursor implementation is now updated to make it clear what is possible
443
459
before and after execution of an operation.
@@ -469,7 +485,7 @@ similar to the following:
469
485
- ``ListCollectionsCursor``
470
486
471
487
Cursor Stream API
472
-
^^^^^^^^^^^^^^^^^
488
+
+++++++++++++++++
473
489
474
490
Our Cursor types no longer extend ``Readable`` directly. They must be
475
491
transformed into a stream by calling ``cursor.stream()``.
@@ -489,7 +505,7 @@ Use ``for await of`` syntax or any ``Promise`` helpers for
489
505
asynchronous iteration.
490
506
491
507
``MongoClientOptions`` Interface
492
-
+++++++++++++++++++++++++++++++++
508
+
````````````````````````````````
493
509
494
510
With type hinting, you should find that options passed to a ``MongoClient``
495
511
are enumerated and discoverable. We've made a large effort to process
@@ -504,7 +520,7 @@ to get your app up and running in a correct state quickly.
504
520
- It is no longer required to specify ``useUnifiedTopology`` or ``useNewUrlParser``.
505
521
506
522
``createCollection()``
507
-
++++++++++++++++++++++
523
+
``````````````````````
508
524
509
525
This method no longer supports a ``strict`` option, which returned
510
526
an error if the collection did not exist. To assert the existence of
@@ -523,7 +539,7 @@ a collection, use the ``listCollections()`` method instead.
523
539
}
524
540
525
541
``BulkWriteError`` → ``MongoBulkWriteError``
526
-
++++++++++++++++++++++++++++++++++++++++++++
542
+
````````````````````````````````````````````
527
543
528
544
``BulkWriteError`` is now renamed to ``MongoBulkWriteError``.
529
545
@@ -532,20 +548,20 @@ depending on your settings. Import the new class name ``MongoBulkWriteError``
532
548
when testing for errors in bulk operations.
533
549
534
550
``DB``
535
-
++++++
551
+
``````
536
552
537
553
``DB`` is no longer an ``EventEmitter``. Listen for events directly from your
538
554
``MongoClient`` instance.
539
555
540
556
``Collection.group()``
541
-
++++++++++++++++++++++
557
+
``````````````````````
542
558
543
559
The ``Collection.group()`` helper, deprecated since MongoDB 3.4,
544
560
is now removed. Use the aggregation pipeline :manual:`$group </reference/operator/aggregation/group/#pipe._S_group>`
545
561
operator instead.
546
562
547
563
Authentication
548
-
++++++++++++++
564
+
``````````````
549
565
550
566
- ``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