From f495fbea9fe924f33ebf85393f6b6d38fd277211 Mon Sep 17 00:00:00 2001 From: Nathan Leniz Date: Thu, 17 Feb 2022 14:35:08 -0800 Subject: [PATCH 1/9] 4.4 release changes --- snooty.toml | 9 +- source/compatibility.txt | 8 + .../mongodb-compatibility-table-node.rst | 152 ++++++++++-------- source/whats-new.txt | 24 +++ 4 files changed, 121 insertions(+), 72 deletions(-) diff --git a/snooty.toml b/snooty.toml index 9840469bb..9bfc038c4 100644 --- a/snooty.toml +++ b/snooty.toml @@ -1,11 +1,16 @@ name = "node" title = "Node.js" -toc_landing_pages = ["/fundamentals/authentication", "/fundamentals", "/fundamentals/crud", "/usage-examples"] +toc_landing_pages = [ + "/fundamentals/authentication", + "/fundamentals", + "/fundamentals/crud", + "/usage-examples", +] sharedinclude_root = "https://raw.githubusercontent.com/10gen/docs-shared/main/" [constants] -version = "4.3" +version = "4.4" package-name-org = "mongodb-org" pgp-version = "{+version+}" api = "https://mongodb.github.io/node-mongodb-native/{+version+}" diff --git a/source/compatibility.txt b/source/compatibility.txt index 8bce93bd1..e7a5768b2 100644 --- a/source/compatibility.txt +++ b/source/compatibility.txt @@ -10,6 +10,10 @@ Compatibility MongoDB Compatibility --------------------- +The following compatibility table specifies the recommended versions of +the {+driver-long+} for use with MongoDB. + +The first column lists the driver version. :ref:`What information does the MongoDB Compatibility table show? ` @@ -17,6 +21,10 @@ MongoDB Compatibility Language Compatibility ---------------------- +The following compatibility table specifies the recommended versions of +the {+driver-long+} for use with a specific version of Node.js. + +The first column lists the driver version. :ref:`What information does the Language Compatibility table show? ` diff --git a/source/includes/mongodb-compatibility-table-node.rst b/source/includes/mongodb-compatibility-table-node.rst index 13c086d06..ea9a8bb98 100644 --- a/source/includes/mongodb-compatibility-table-node.rst +++ b/source/includes/mongodb-compatibility-table-node.rst @@ -15,6 +15,18 @@ - MongoDB 3.2 - MongoDB 3.0 - MongoDB 2.6 + * - 4.4 + - ✓ + - ✓ + - ✓ + - ✓ + - ✓ + - ✓ + - ✓ + - + - + - + - * - 4.3 - ✓ - ✓ @@ -23,10 +35,10 @@ - ✓ - ✓ - ✓ - - - - - - - - + - + - + - + - * - 4.2 - ✓ - ✓ @@ -35,13 +47,13 @@ - ✓ - ✓ - ✓ - - - - - - - - + - + - + - + - * - 4.1 - - - - + - + - - ✓ - ✓ - ✓ @@ -52,8 +64,8 @@ - ✓ - ✓ * - 4.0 - - - - + - + - - ✓ - ✓ - ✓ @@ -64,8 +76,8 @@ - ✓ - ✓ * - 3.7 [#unified-topology]_ - - - - + - + - - ✓ - ✓ - ✓ @@ -76,9 +88,9 @@ - ✓ - ✓ * - 3.6 - - - - - - + - + - + - - ✓ - ✓ - ✓ @@ -88,10 +100,10 @@ - ✓ - ✓ * - 3.5 - - - - - - - - + - + - + - + - - ✓ - ✓ - ✓ @@ -100,10 +112,10 @@ - ✓ - ✓ * - 3.4 - - - - - - - - + - + - + - + - - ✓ - ✓ - ✓ @@ -112,10 +124,10 @@ - ✓ - ✓ * - 3.3 - - - - - - - - + - + - + - + - - ✓ - ✓ - ✓ @@ -124,11 +136,11 @@ - ✓ - ✓ * - 3.2.1 - - - - - - - - - - + - + - + - + - + - - ✓ - ✓ - ✓ @@ -136,11 +148,11 @@ - ✓ - ✓ * - 3.1 - - - - - - - - - - + - + - + - + - + - - ✓ - ✓ - ✓ @@ -148,51 +160,51 @@ - ✓ - ✓ * - 3.0 - - - - - - - - - - - - + - + - + - + - + - + - - ✓ - ✓ - ✓ - ✓ - ✓ * - 2.2.12 - - - - - - - - - - - - - - + - + - + - + - + - + - + - - ✓ - ✓ - ✓ - ✓ * - 2.0.14 - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - - ✓ - ✓ * - 1.4.29 - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - - ✓ - ✓ diff --git a/source/whats-new.txt b/source/whats-new.txt index 4da495071..4f31c58e5 100644 --- a/source/whats-new.txt +++ b/source/whats-new.txt @@ -18,6 +18,30 @@ Learn what's new in: * :ref:`Version 4.0 ` * :ref:`Version 3.6 ` +.. _version-4.4: + +What's New in 4.4 +----------------- + +New features of the 4.4 Node.js driver release include: + +- KMIP support when using CSFLE. +- TLS support when using CSFLE. +- Hostname canonicalization now accepts "none", "forward", and "forwardAndReverse" as `` authMechanismProperties`` when using GSSAPI. +- In the 4.0.0 release of the driver, the deprecated ``collection.count()`` method was inadvertently changed to behave like ``collection.countDocuments()``. + In this release, the ``collection.count()`` method is updated to match legacy behavior: + + - If a query is passed in, ``collection.count()`` will behave the same as ``collection.countDocuments()`` and perform a collection scan. + - If no query is passed in, ``collection.count()`` will behave the same as ``collection.estimatedDocumentCount()`` and rely on collection metadata.. + + .. important:: Deprecation Notice + + The ``cursor.count()`` method is deprecated and will be removed in the next major version, along with ``collection.count()``. + Use ``collection.estimatedDocumentCount()`` or ``collection.countDocuments()`` instead. + +See the full release notes `here `__ + + .. _version-4.3: What's New in 4.3 From f4c6bfb4931a26c30bc2f191f5a3ac7ca6d4c28f Mon Sep 17 00:00:00 2001 From: Nathan Leniz Date: Thu, 17 Feb 2022 14:46:17 -0800 Subject: [PATCH 2/9] formatting --- source/whats-new.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source/whats-new.txt b/source/whats-new.txt index 4f31c58e5..8c4691bf6 100644 --- a/source/whats-new.txt +++ b/source/whats-new.txt @@ -12,6 +12,7 @@ What's New Learn what's new in: +* :ref:`Version 4.4 ` * :ref:`Version 4.3 ` * :ref:`Version 4.2 ` * :ref:`Version 4.1 ` @@ -27,7 +28,7 @@ New features of the 4.4 Node.js driver release include: - KMIP support when using CSFLE. - TLS support when using CSFLE. -- Hostname canonicalization now accepts "none", "forward", and "forwardAndReverse" as `` authMechanismProperties`` when using GSSAPI. +- Hostname canonicalization now accepts "none", "forward", and "forwardAndReverse" as ``authMechanismProperties`` when using GSSAPI. - In the 4.0.0 release of the driver, the deprecated ``collection.count()`` method was inadvertently changed to behave like ``collection.countDocuments()``. In this release, the ``collection.count()`` method is updated to match legacy behavior: @@ -39,9 +40,6 @@ New features of the 4.4 Node.js driver release include: The ``cursor.count()`` method is deprecated and will be removed in the next major version, along with ``collection.count()``. Use ``collection.estimatedDocumentCount()`` or ``collection.countDocuments()`` instead. -See the full release notes `here `__ - - .. _version-4.3: What's New in 4.3 From ec569dc57a80a8166b854d63878a78d3a4955fb3 Mon Sep 17 00:00:00 2001 From: Nathan Leniz Date: Thu, 17 Feb 2022 14:59:43 -0800 Subject: [PATCH 3/9] rst errors --- source/fundamentals/typescript.txt | 10 +++++----- source/includes/limitations/{4.3.rst => limits.rst} | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) rename source/includes/limitations/{4.3.rst => limits.rst} (97%) diff --git a/source/fundamentals/typescript.txt b/source/fundamentals/typescript.txt index 004d1fff4..f175758a5 100644 --- a/source/fundamentals/typescript.txt +++ b/source/fundamentals/typescript.txt @@ -98,13 +98,13 @@ Type Safety and Dot Notation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If you specify a query or update with **dot notation**, the {+driver-short+} -provides type safety if your query or update does not +provides type safety if your query or update does not :ref:`reference a nested instance of a recursive type `. Dot notation is a syntax you can use to navigate nested JSON objects. The following code snippet defines the ``ClassificationPet`` interface, which includes a ``classification`` field that enables you to specify the -genus and color of dogs and cats: +genus and color of dogs and cats: .. code-block:: typescript @@ -131,12 +131,12 @@ The type error raised by the preceding code snippet is as follows: ... Type '"Sylvilagus"' is not assignable to type 'Condition<"Canis" | "Felis">'. -To learn more about dot notation, see +To learn more about dot notation, see :manual:`Dot Notation ` in the MongoDB manual. To learn more about the limitations of dot notation in the -{+driver-short+}, see the +{+driver-short+}, see the :ref:`` section. @@ -145,4 +145,4 @@ section. Limitations of Driver Version {+version+} --------------------------------- -.. include:: includes/limitations/{+version+}.rst +.. include:: includes/limitations/limits.rst diff --git a/source/includes/limitations/4.3.rst b/source/includes/limitations/limits.rst similarity index 97% rename from source/includes/limitations/4.3.rst rename to source/includes/limitations/limits.rst index e73db1a3a..4efded74a 100644 --- a/source/includes/limitations/4.3.rst +++ b/source/includes/limitations/limits.rst @@ -1,5 +1,5 @@ Learn about the following TypeScript specific limitations of -version 4.3 of the {+driver-short+}: +version {+version+} of the {+driver-short+}: - :ref:`No type safety for dot notation references to nested instances of recursive types ` - :ref:`No mutually recursive types ` @@ -59,7 +59,7 @@ The following code snippet references a top-level instance of the The error raised by the preceding code snippet is as follows: .. code-block:: none - + index.ts(19,59): error TS2769: No overload matches this call. The last overload gave the following error. Type 'string' is not assignable to type 'Condition'. @@ -67,7 +67,7 @@ The error raised by the preceding code snippet is as follows: If you must have type safety within nested instances of recursive types, you must write your query or update without dot notation. -To learn more about dot notation, see +To learn more about dot notation, see :manual:`Dot Notation ` in the MongoDB manual. From 5e8186720cb47276403a4a62946bb636d466994e Mon Sep 17 00:00:00 2001 From: Nathan Leniz Date: Fri, 18 Feb 2022 07:14:49 -0800 Subject: [PATCH 4/9] nits --- source/whats-new.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/whats-new.txt b/source/whats-new.txt index 8c4691bf6..3a7f55741 100644 --- a/source/whats-new.txt +++ b/source/whats-new.txt @@ -26,7 +26,7 @@ What's New in 4.4 New features of the 4.4 Node.js driver release include: -- KMIP support when using CSFLE. +- KMIP provider support when using CSFLE. - TLS support when using CSFLE. - Hostname canonicalization now accepts "none", "forward", and "forwardAndReverse" as ``authMechanismProperties`` when using GSSAPI. - In the 4.0.0 release of the driver, the deprecated ``collection.count()`` method was inadvertently changed to behave like ``collection.countDocuments()``. @@ -38,7 +38,8 @@ New features of the 4.4 Node.js driver release include: .. important:: Deprecation Notice The ``cursor.count()`` method is deprecated and will be removed in the next major version, along with ``collection.count()``. - Use ``collection.estimatedDocumentCount()`` or ``collection.countDocuments()`` instead. + Use the ``collection.estimatedDocumentCount()`` or ``collection.countDocuments()`` + methods instead. .. _version-4.3: @@ -77,6 +78,11 @@ New features of the 4.1 Node.js driver release include: What's New in 4.0 ----------------- +.. important:: + + In this release of the driver, the deprecated ``collection.count()`` method was inadvertently changed to + behave like ``collection.countDocuments()``. + New features of the 4.0 Node.js driver release include: TypeScript From ecca1885b8a8c965c17835d193b60598f60372bd Mon Sep 17 00:00:00 2001 From: Nathan Leniz Date: Fri, 18 Feb 2022 07:16:09 -0800 Subject: [PATCH 5/9] update redirect file --- config/redirects | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/redirects b/config/redirects index 5c37f64eb..48eb51b7c 100644 --- a/config/redirects +++ b/config/redirects @@ -1,6 +1,6 @@ define: prefix drivers/node define: base https://docs.mongodb.com/${prefix} -define: versions v3.6 v3.7 v4.0 v4.1 v4.2 v4.3 master +define: versions v3.6 v3.7 v4.0 v4.1 v4.2 v4.3 v4.4 master raw: ${prefix}/ -> ${base}/current/ raw: ${prefix}/stable -> ${base}/current/ From bef2af952d652e10912358dbf535345511814725 Mon Sep 17 00:00:00 2001 From: Nathan Leniz Date: Fri, 18 Feb 2022 07:57:36 -0800 Subject: [PATCH 6/9] limitations --- source/fundamentals/typescript.txt | 4 ++-- source/includes/limitations/limits.rst | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/source/fundamentals/typescript.txt b/source/fundamentals/typescript.txt index f175758a5..eeb93ac81 100644 --- a/source/fundamentals/typescript.txt +++ b/source/fundamentals/typescript.txt @@ -142,7 +142,7 @@ section. .. _node-driver-limitations: -Limitations of Driver Version {+version+} ---------------------------------- +Known Limitations +----------------- .. include:: includes/limitations/limits.rst diff --git a/source/includes/limitations/limits.rst b/source/includes/limitations/limits.rst index 4efded74a..26e43e29f 100644 --- a/source/includes/limitations/limits.rst +++ b/source/includes/limitations/limits.rst @@ -1,5 +1,4 @@ -Learn about the following TypeScript specific limitations of -version {+version+} of the {+driver-short+}: +Learn about the following TypeScript specific limitations of the {+driver-short+}: - :ref:`No type safety for dot notation references to nested instances of recursive types ` - :ref:`No mutually recursive types ` @@ -9,6 +8,11 @@ version {+version+} of the {+driver-short+}: Recursive Types and Dot Notation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. important:: Impacted Versions + + - 4.3 + - 4.4 + The {+driver-short+} cannot provide type safety within nested instances of **recursive types** referenced through dot notation. @@ -76,8 +80,12 @@ in the MongoDB manual. Mutual Recursion ~~~~~~~~~~~~~~~~ -You cannot specify a **mutually recursive** type as a type parameter in version -4.3 of the driver. +.. important:: Impacted Versions + + - 4.3 + - 4.4 + +You cannot specify a **mutually recursive** type as a type parameter. A mutually recursive type exists when two types contain a property that is of the other's type. You can update the From dd26beb0cc52cf9e5522346b123cd7f8335000fc Mon Sep 17 00:00:00 2001 From: Nathan Leniz Date: Fri, 18 Feb 2022 10:54:56 -0800 Subject: [PATCH 7/9] nits --- source/whats-new.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/whats-new.txt b/source/whats-new.txt index 3a7f55741..f128a3a18 100644 --- a/source/whats-new.txt +++ b/source/whats-new.txt @@ -32,8 +32,9 @@ New features of the 4.4 Node.js driver release include: - In the 4.0.0 release of the driver, the deprecated ``collection.count()`` method was inadvertently changed to behave like ``collection.countDocuments()``. In this release, the ``collection.count()`` method is updated to match legacy behavior: - - If a query is passed in, ``collection.count()`` will behave the same as ``collection.countDocuments()`` and perform a collection scan. - - If no query is passed in, ``collection.count()`` will behave the same as ``collection.estimatedDocumentCount()`` and rely on collection metadata.. + - If a query is provided, ``collection.count()`` behaves the same as ``collection.countDocuments()`` and perform a collection scan. + - If no query is not provided, ``collection.count()`` behaves the same as ``collection.estimatedDocumentCount()`` and relies on + collection metadata. .. important:: Deprecation Notice From 625f493af6e4ec0bc97f9383910eb37d80b9a257 Mon Sep 17 00:00:00 2001 From: Nathan Leniz Date: Fri, 18 Feb 2022 11:08:02 -0800 Subject: [PATCH 8/9] nit --- source/whats-new.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/whats-new.txt b/source/whats-new.txt index f128a3a18..78ec3b73a 100644 --- a/source/whats-new.txt +++ b/source/whats-new.txt @@ -82,7 +82,7 @@ What's New in 4.0 .. important:: In this release of the driver, the deprecated ``collection.count()`` method was inadvertently changed to - behave like ``collection.countDocuments()``. + behave like ``collection.countDocuments()``. This behavior is corrected in :ref:`version 4.4 `. New features of the 4.0 Node.js driver release include: From c05981294393a2a6b9c14dfa28a354409e7dc1fc Mon Sep 17 00:00:00 2001 From: Nathan Leniz Date: Fri, 18 Feb 2022 11:10:22 -0800 Subject: [PATCH 9/9] typos --- source/whats-new.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/whats-new.txt b/source/whats-new.txt index 78ec3b73a..f32aa1241 100644 --- a/source/whats-new.txt +++ b/source/whats-new.txt @@ -32,8 +32,8 @@ New features of the 4.4 Node.js driver release include: - In the 4.0.0 release of the driver, the deprecated ``collection.count()`` method was inadvertently changed to behave like ``collection.countDocuments()``. In this release, the ``collection.count()`` method is updated to match legacy behavior: - - If a query is provided, ``collection.count()`` behaves the same as ``collection.countDocuments()`` and perform a collection scan. - - If no query is not provided, ``collection.count()`` behaves the same as ``collection.estimatedDocumentCount()`` and relies on + - If a query is provided, ``collection.count()`` behaves the same as ``collection.countDocuments()`` and performs a collection scan. + - If no query is provided, ``collection.count()`` behaves the same as ``collection.estimatedDocumentCount()`` and relies on collection metadata. .. important:: Deprecation Notice