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
NODE-3792: remove offensive language throughout the codebase (#3091) (8e2b0cc)
NODE-3852,NODE-3854,NODE-3856: Misc typescript fixes for 4.3.1 (#3102) (dd5195a)
Hello dear reader, thank you for adopting version 4.x of the MongoDB Node.js driver, from the bottom of our developer hearts we thank you so much for taking the time to upgrade to our latest and greatest offering of a stunning database experience.
We hope you enjoy your upgrade experience and this guide gives you all the answers you are searching for.
If anything, and we mean anything, hinders your upgrade experience please let us know via JIRA.
We know breaking changes are hard but they are sometimes for the best.
Anyway, enjoy the guide, see you at the end!
Key Changes
Typescript
We've migrated the driver to Typescript!
Users can now harness the power of type hinting and intellisense in editors that support it to develop their MongoDB applications.
Even pure JavaScript projects can benefit from the type definitions with the right linting setup.
Along with the type hinting there's consistent and helpful docs formatting that editors should be able to display while developing.
Recently we migrated our BSON library to TypeScript as well, this version of the driver pulls in that change.
Community Types users (@types/mongodb)
If you are a user of the community types (@types/mongodb) there will likely be compilation errors while adopting the types from our codebase.
Unfortunately we could not achieve a one to one match in types due to the details of writing the codebase in Typescript vs definitions for the user layer API along with the breaking changes of this major version. Please let us know if there's anything that is a blocker to upgrading on JIRA.
Node.js Version
We now require node 12.9 or greater for version 4 of the driver.
If that's outside your support matrix at this time, that's okay!
Bug fix support for our 3.x branch will not be ending until summer 2022, which has support going back as far as Node.js v4!
CRUD results
Our CRUD operations now return the drivers-wide spec-compliant results which are defined here:
This version was pushed to npm by pearsb1, a new releaser for mongodb since your current version.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps mongodb from 3.7.3 to 4.3.1.
Release notes
Sourced from mongodb's releases.
... (truncated)
Changelog
Sourced from mongodb's changelog.
... (truncated)
Commits
8970ac1
chore(release): 4.3.163168b4
chore: update dependencies (#3108)fa03df8
chore(NODE-3717): test reorg - the conclusion (#3105)dd5195a
fix(NODE-3852,NODE-3854,NODE-3856): Misc typescript fixes for 4.3.1 (#3102)2adc7cd
test(NODE-3787): sync preferring error codes over messages (#3104)b3d9fb8
chore(NODE-3717): test reorg penultimate part (#3103)8e2b0cc
fix(NODE-3792): remove offensive language throughout the codebase (#3091)c3256c4
chore(NODE-3717): move tests p-z (#3098)91c108e
chore: improve test filtering to use mocha hooks (#3095)3f668bd
docs: update Evergreen CLI example command (#3099)Maintainer changes
This version was pushed to npm by pearsb1, a new releaser for mongodb since your current version.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)