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