From 024c029ada84fe56dffb94c1be26dc8266ea0e62 Mon Sep 17 00:00:00 2001 From: Valeri Karpov Date: Thu, 11 Jan 2024 17:35:23 -0500 Subject: [PATCH 1/2] docs(model): remove callback example for `ensureIndexes()` Fix #14238 --- lib/model.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/model.js b/lib/model.js index 8d9666df0ef..823434e2edb 100644 --- a/lib/model.js +++ b/lib/model.js @@ -1671,9 +1671,7 @@ Model.listIndexes = async function listIndexes() { * * #### Example: * - * Event.ensureIndexes(function (err) { - * if (err) return handleError(err); - * }); + * await Event.ensureIndexes(); * * After completion, an `index` event is emitted on this `Model` passing an error if one occurred. * @@ -1684,7 +1682,7 @@ Model.listIndexes = async function listIndexes() { * * Event.on('index', function (err) { * if (err) console.error(err); // error occurred during index creation - * }) + * }); * * _NOTE: It is not recommended that you run this in production. Index creation may impact database performance depending on your load. Use with caution._ * From 420c92db598ad074aaf4670fd54512adbf12ccc7 Mon Sep 17 00:00:00 2001 From: Julien Vanier Date: Fri, 12 Jan 2024 16:34:34 -0500 Subject: [PATCH 2/2] Fix markdown typo introduced in #14230 --- docs/compatibility.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/compatibility.md b/docs/compatibility.md index c198324fcbd..f183a4f67b1 100644 --- a/docs/compatibility.md +++ b/docs/compatibility.md @@ -20,7 +20,7 @@ Below are the [semver](http://semver.org/) ranges representing which versions of | :------------: | :-------------------------------------: | | `7.x` | `^7.4.0 \| ^8.0.0` | | `6.x` | `^6.5.0 \| ^7.0.0 \| ^8.0.0` | -| `5.x` | `^5.13.0` | `^6.0.0 \| ^7.0.0 \| ^8.0.0`| +| `5.x` | `^5.13.0` \| `^6.0.0 \| ^7.0.0 \| ^8.0.0`| | `4.4.x` | `^5.10.0 \| ^6.0.0 \| ^7.0.0 \| ^8.0.0` | | `4.2.x` | `^5.7.0 \| ^6.0.0 \| ^7.0.0 \| ^8.0.0` | | `4.0.x` | `^5.2.0 \| ^6.0.0 \| ^7.0.0 \| ^8.0.0` |