Skip to content

Release 4 4 #287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Feb 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/redirects
Original file line number Diff line number Diff line change
@@ -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/
Expand Down
9 changes: 7 additions & 2 deletions snooty.toml
Original file line number Diff line number Diff line change
@@ -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+}"
Expand Down
8 changes: 8 additions & 0 deletions source/compatibility.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,21 @@ 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? <mongodb-compatibility-table-about-node>`

.. include:: /includes/mongodb-compatibility-table-node.rst

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? <language-compatibility-table-about-node>`

Expand Down
14 changes: 7 additions & 7 deletions source/fundamentals/typescript.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 <node-driver-recursive-types-dot-notation>`.
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

Expand All @@ -131,18 +131,18 @@ 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 </core/document/#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:`<node-driver-recursive-types-dot-notation>`
section.

.. _node-driver-limitations:

Limitations of Driver Version {+version+}
---------------------------------
Known Limitations
-----------------

.. include:: includes/limitations/{+version+}.rst
.. include:: includes/limitations/limits.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Learn about the following TypeScript specific limitations of
version 4.3 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 <node-driver-recursive-types-dot-notation>`
- :ref:`No mutually recursive types <node-driver-limitations-mutual-recursion>`
Expand All @@ -9,6 +8,11 @@ version 4.3 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.

Expand Down Expand Up @@ -59,15 +63,15 @@ 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<Pet>'.

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 </core/document/#dot-notation>`
in the MongoDB manual.

Expand All @@ -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
Expand Down
152 changes: 82 additions & 70 deletions source/includes/mongodb-compatibility-table-node.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@
- MongoDB 3.2
- MongoDB 3.0
- MongoDB 2.6
* - 4.4
- ✓
- ✓
- ✓
- ✓
- ✓
- ✓
- ✓
-
-
-
-
* - 4.3
- ✓
- ✓
Expand All @@ -23,10 +35,10 @@
- ✓
- ✓
- ✓
-
-
-
-
-
-
-
-
* - 4.2
- ✓
- ✓
Expand All @@ -35,13 +47,13 @@
- ✓
- ✓
- ✓
-
-
-
-
-
-
-
-
* - 4.1
-
-
-
-
- ✓
- ✓
- ✓
Expand All @@ -52,8 +64,8 @@
- ✓
- ✓
* - 4.0
-
-
-
-
- ✓
- ✓
- ✓
Expand All @@ -64,8 +76,8 @@
- ✓
- ✓
* - 3.7 [#unified-topology]_
-
-
-
-
- ✓
- ✓
- ✓
Expand All @@ -76,9 +88,9 @@
- ✓
- ✓
* - 3.6
-
-
-
-
-
-
- ✓
- ✓
- ✓
Expand All @@ -88,10 +100,10 @@
- ✓
- ✓
* - 3.5
-
-
-
-
-
-
-
-
- ✓
- ✓
- ✓
Expand All @@ -100,10 +112,10 @@
- ✓
- ✓
* - 3.4
-
-
-
-
-
-
-
-
- ✓
- ✓
- ✓
Expand All @@ -112,10 +124,10 @@
- ✓
- ✓
* - 3.3
-
-
-
-
-
-
-
-
- ✓
- ✓
- ✓
Expand All @@ -124,75 +136,75 @@
- ✓
- ✓
* - 3.2.1
-
-
-
-
-
-
-
-
-
-
- ✓
- ✓
- ✓
- ✓
- ✓
- ✓
* - 3.1
-
-
-
-
-
-
-
-
-
-
- ✓
- ✓
- ✓
- ✓
- ✓
- ✓
* - 3.0
-
-
-
-
-
-
-
-
-
-
-
-
- ✓
- ✓
- ✓
- ✓
- ✓
* - 2.2.12
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ✓
- ✓
- ✓
- ✓
* - 2.0.14
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ✓
- ✓
* - 1.4.29
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ✓
- ✓

Expand Down
Loading