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
+37-21Lines changed: 37 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -84,19 +84,35 @@ To learn more, see the `v4.12.0 Release Highlights <https://github.com/mongodb/n
84
84
What's New in 4.11
85
85
------------------
86
86
87
+
Prioritization Order in Monitoring
88
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
89
+
87
90
When connecting to MongoDB Server version 6.0 or later, the driver prioritizes
88
91
``electionId`` settings before ``setVersion`` settings during Server Discovery and
89
92
Monitoring events. In previous versions, the prioritization order was reversed.
90
93
91
-
This release also includes added support for **mutually
94
+
Changes to AWS Authentication
95
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
96
+
97
+
When you install the optional ``aws-sdk/credential-providers``
98
+
dependency, the driver uses the AWS SDK to retrieve AWS credentials from the
99
+
environment.
100
+
101
+
To learn more about this behavior, see the :ref:`MONGODB-AWS
102
+
<mongodb-aws>` section of the Authentication Mechanisms guide.
103
+
104
+
Mutually Recursive Schema Type Checking
105
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
106
+
107
+
This release includes added support for **mutually
92
108
recursive** collection schema types. The driver also provides type safety for
93
109
dot-notation queries up to a depth of eight in this release. At a depth greater
94
110
than or equal to eight, Typescript successfully compiles your code but does not
95
111
provide type safety. This depth limit on recursive types is a current limitation
96
112
of TypeScript.
97
113
98
-
Mutually Recursive Schema Type Checking Example
99
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
114
+
Example
115
+
```````
100
116
101
117
Suppose we have a collection of type ``Collection<Author>`` that contains the
102
118
following mutually recursive types:
@@ -334,7 +350,7 @@ Key Changes
334
350
~~~~~~~~~~~
335
351
336
352
Node.js Version
337
-
+++++++++++++++
353
+
```````````````
338
354
339
355
The minimum supported version of Node.js is now v12.9 or greater for
340
356
version 4 of the driver. Support for our 3.x branches will continue
@@ -346,7 +362,7 @@ until summer 2022 to allow time to upgrade.
346
362
347
363
348
364
Cursor Improvements
349
-
+++++++++++++++++++
365
+
```````````````````
350
366
351
367
Our Cursor implementation is now updated to make it clear what is possible
352
368
before and after execution of an operation.
@@ -378,7 +394,7 @@ similar to the following:
378
394
- ``ListCollectionsCursor``
379
395
380
396
Cursor Stream API
381
-
^^^^^^^^^^^^^^^^^
397
+
+++++++++++++++++
382
398
383
399
Our Cursor types no longer extend ``Readable`` directly. They must be
384
400
transformed into a stream by calling ``cursor.stream()``.
@@ -398,7 +414,7 @@ Use ``for await of`` syntax or any ``Promise`` helpers for
398
414
asynchronous iteration.
399
415
400
416
``MongoClientOptions`` Interface
401
-
+++++++++++++++++++++++++++++++++
417
+
````````````````````````````````
402
418
403
419
With type hinting, you should find that options passed to a ``MongoClient``
404
420
are enumerated and discoverable. We've made a large effort to process
@@ -413,7 +429,7 @@ to get your app up and running in a correct state quickly.
413
429
- It is no longer required to specify ``useUnifiedTopology`` or ``useNewUrlParser``.
414
430
415
431
``createCollection()``
416
-
++++++++++++++++++++++
432
+
``````````````````````
417
433
418
434
This method no longer supports a ``strict`` option, which returned
419
435
an error if the collection did not exist. To assert the existence of
@@ -432,7 +448,7 @@ a collection, use the ``listCollections()`` method instead.
432
448
}
433
449
434
450
``BulkWriteError`` → ``MongoBulkWriteError``
435
-
++++++++++++++++++++++++++++++++++++++++++++
451
+
````````````````````````````````````````````
436
452
437
453
``BulkWriteError`` is now renamed to ``MongoBulkWriteError``.
438
454
@@ -441,20 +457,20 @@ depending on your settings. Import the new class name ``MongoBulkWriteError``
441
457
when testing for errors in bulk operations.
442
458
443
459
``DB``
444
-
++++++
460
+
``````
445
461
446
462
``DB`` is no longer an ``EventEmitter``. Listen for events directly from your
447
463
``MongoClient`` instance.
448
464
449
465
``Collection.group()``
450
-
++++++++++++++++++++++
466
+
``````````````````````
451
467
452
468
The ``Collection.group()`` helper, deprecated since MongoDB 3.4,
453
469
is now removed. Use the aggregation pipeline :manual:`$group </reference/operator/aggregation/group/#pipe._S_group>`
454
470
operator instead.
455
471
456
472
Authentication
457
-
++++++++++++++
473
+
``````````````
458
474
459
475
- ``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