Skip to content

v6.8.2

Compare
Choose a tag to compare
@github-actions github-actions released this 12 Sep 17:07
f1c5618

6.8.2 (2024-09-12)

The MongoDB Node.js team is pleased to announce version 6.8.2 of the mongodb package!

Release Notes

Fixed mixed use of cursor.next() and cursor[Symbol.asyncIterator]

In 6.8.0, we inadvertently prevented the use of cursor.next() along with using for await syntax to iterate cursors. If your code made use of the following pattern and the call to cursor.next retrieved all your documents in the first batch, then the for-await loop would never be entered. This issue is now fixed.

const firstDoc = await cursor.next();

for await (const doc of cursor) {
    // process doc
    // ...
}

Bug Fixes

Documentation

We invite you to try the mongodb library immediately, and report any issues to the NODE project.