npm mongodb 4.3.1
v4.3.1

latest releases: 6.10.0-dev.20241113.sha.20564f7a, 6.10.0-dev.20241112.sha.48ed47ec, 6.10.0-dev.20241109.sha.ed25d561...
2 years ago

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

Release Highlights

In this patch release, we address the limitation introduced in 4.3.0 with the dot notation Typescript improvements and recursive types.
Namely, this fix removes compilation errors for self-referential types.

Note that this fix still has the following limitations:

  • type checking defaults to any after the first level of recursion for self-referential types
interface Node {
  next: Node | null;
}

declare const collection: Collection<Node>;

// no error here even though `next` is of type `Node | null`
collection.find({
  next: {
    next: 'asdf'
  }
});
  • indirectly self-referential types are still not supported
interface A {
  b: B;
}

interface B {
  a: A;
}

declare const mutuallyRecursive: Collection<A>;

// this will throw an error because there is indirect recursion 
// between types (A depends on B which depends on A and so on)
mutuallyRecursive.find({});

Bug Fixes

Documentation

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

Don't miss a new mongodb release

NewReleases is sending notifications on new releases.