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
@@ -34,19 +34,35 @@ Learn what's new in:
34
34
What's New in 4.11
35
35
------------------
36
36
37
+
Prioritization Order in Monitoring
38
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
39
+
37
40
When connecting to MongoDB Server version 6.0 or later, the driver prioritizes
38
41
``electionId`` settings before ``setVersion`` settings during Server Discovery and
39
42
Monitoring events. In previous versions, the prioritization order was reversed.
40
43
41
-
This release also includes added support for **mutually
44
+
Changes to AWS Authentication
45
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46
+
47
+
When you install the optional ``aws-sdk/credential-providers``
48
+
dependency, the driver uses the AWS SDK to retrieve AWS credentials from the
49
+
environment.
50
+
51
+
To learn more about this behavior, see the :ref:`MONGODB-AWS
52
+
<mongodb-aws>` section of the Authentication Mechanisms guide.
53
+
54
+
Mutually Recursive Schema Type Checking
55
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56
+
57
+
This release includes added support for **mutually
42
58
recursive** collection schema types. The driver also provides type safety for
43
59
dot-notation queries up to a depth of eight in this release. At a depth greater
44
60
than or equal to eight, Typescript successfully compiles your code but does not
45
61
provide type safety. This depth limit on recursive types is a current limitation
46
62
of TypeScript.
47
63
48
-
Mutually Recursive Schema Type Checking Example
49
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
64
+
Example
65
+
```````
50
66
51
67
Suppose we have a collection of type ``Collection<Author>`` that contains the
52
68
following mutually recursive types:
@@ -284,7 +300,7 @@ Key Changes
284
300
~~~~~~~~~~~
285
301
286
302
Node.js Version
287
-
+++++++++++++++
303
+
```````````````
288
304
289
305
The minimum supported version of Node.js is now v12.9 or greater for
290
306
version 4 of the driver. Support for our 3.x branches will continue
@@ -296,7 +312,7 @@ until summer 2022 to allow time to upgrade.
296
312
297
313
298
314
Cursor Improvements
299
-
+++++++++++++++++++
315
+
```````````````````
300
316
301
317
Our Cursor implementation is now updated to make it clear what is possible
302
318
before and after execution of an operation.
@@ -328,7 +344,7 @@ similar to the following:
328
344
- ``ListCollectionsCursor``
329
345
330
346
Cursor Stream API
331
-
^^^^^^^^^^^^^^^^^
347
+
+++++++++++++++++
332
348
333
349
Our Cursor types no longer extend ``Readable`` directly. They must be
334
350
transformed into a stream by calling ``cursor.stream()``.
@@ -348,7 +364,7 @@ Use ``for await of`` syntax or any ``Promise`` helpers for
348
364
asynchronous iteration.
349
365
350
366
``MongoClientOptions`` Interface
351
-
+++++++++++++++++++++++++++++++++
367
+
````````````````````````````````
352
368
353
369
With type hinting, you should find that options passed to a ``MongoClient``
354
370
are enumerated and discoverable. We've made a large effort to process
@@ -363,7 +379,7 @@ to get your app up and running in a correct state quickly.
363
379
- It is no longer required to specify ``useUnifiedTopology`` or ``useNewUrlParser``.
364
380
365
381
``createCollection()``
366
-
++++++++++++++++++++++
382
+
``````````````````````
367
383
368
384
This method no longer supports a ``strict`` option, which returned
369
385
an error if the collection did not exist. To assert the existence of
@@ -382,7 +398,7 @@ a collection, use the ``listCollections()`` method instead.
382
398
}
383
399
384
400
``BulkWriteError`` → ``MongoBulkWriteError``
385
-
++++++++++++++++++++++++++++++++++++++++++++
401
+
````````````````````````````````````````````
386
402
387
403
``BulkWriteError`` is now renamed to ``MongoBulkWriteError``.
388
404
@@ -391,20 +407,20 @@ depending on your settings. Import the new class name ``MongoBulkWriteError``
391
407
when testing for errors in bulk operations.
392
408
393
409
``DB``
394
-
++++++
410
+
``````
395
411
396
412
``DB`` is no longer an ``EventEmitter``. Listen for events directly from your
397
413
``MongoClient`` instance.
398
414
399
415
``Collection.group()``
400
-
++++++++++++++++++++++
416
+
``````````````````````
401
417
402
418
The ``Collection.group()`` helper, deprecated since MongoDB 3.4,
403
419
is now removed. Use the aggregation pipeline :manual:`$group </reference/operator/aggregation/group/#pipe._S_group>`
404
420
operator instead.
405
421
406
422
Authentication
407
-
++++++++++++++
423
+
``````````````
408
424
409
425
- ``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