From 105d838e88ffb65f29595b76e7086b4b88568e7b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 15:46:44 +0000 Subject: [PATCH] chore: update auto-generated files (#1709) * chore: update THIRD_PARTY_NOTICES * chore: update error documentation --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- THIRD_PARTY_NOTICES.md | 2 +- packages/errors/generated/error-overview.md | 22 +++++++++++++++++ packages/errors/generated/error-overview.rst | 25 ++++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index b1d9d0308..44575d572 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -1,5 +1,5 @@ The following third-party software is used by and included in **mongosh**. -This document was automatically generated on Tue Oct 17 2023. +This document was automatically generated on Thu Oct 19 2023. ## List of dependencies diff --git a/packages/errors/generated/error-overview.md b/packages/errors/generated/error-overview.md index c5dd94827..79a0d55a7 100644 --- a/packages/errors/generated/error-overview.md +++ b/packages/errors/generated/error-overview.md @@ -35,6 +35,28 @@ function*() { **Solution: Do not use calls directly in such functions. If necessary, place these calls in an inner 'async' function.** +#### `ASYNC-10013` + +Signals the iteration of a Mongosh API object in a place where it is not supported. +This occurs inside of constructors and (non-async) generator functions. + +Examples causing error: + +```javascript +class SomeClass { + constructor() { + for (const item of db.coll.find()) { ... } + } +} + +function*() { + for (const item of db.coll.find()) yield item; + yield* db.coll.find(); +} +``` + +**Solution: Do not use calls directly in such functions. If necessary, place these calls in an inner 'async' function.** + ## @mongosh/cli-repl #### `CLIREPL-10001` diff --git a/packages/errors/generated/error-overview.rst b/packages/errors/generated/error-overview.rst index 85fde5718..485c7ace6 100644 --- a/packages/errors/generated/error-overview.rst +++ b/packages/errors/generated/error-overview.rst @@ -23,6 +23,31 @@ Examples causing error: +**Solution: Do not use calls directly in such functions. If necessary, place these calls in an inner 'async' function.** + +``ASYNC-10013`` +~~~~~~~~~~~~~~~ + +Signals the iteration of a Mongosh API object in a place where it is not supported. +This occurs inside of constructors and (non-async) generator functions. + +Examples causing error: + +.. code-block:: javascript + + class SomeClass { + constructor() { + for (const item of db.coll.find()) { ... } + } + } + + function*() { + for (const item of db.coll.find()) yield item; + yield* db.coll.find(); + } + + + **Solution: Do not use calls directly in such functions. If necessary, place these calls in an inner 'async' function.** @mongosh/cli-repl