The MongoDB Node.js team is pleased to announce version 4.11.0 of the mongodb package!
Release Highlights
Recursive Schema Support
Version 4.3.0 of the Node driver added Typescript support for dot notation into our Filter type but
in the process it broke support for recursive schemas. In 4.11.0, we now support recursive schemas and
provide type safety on dot notation queries up to a depth of 9. Beyond a depth of 9, code still compiles
but is no longer type checked (it falls back to a type of any).
// we have a collection of type Collection<CircularSchema>
// below a depth of 9, type checking is enforced
collection.findOne({ 'nestedSchema.nestedSchema.nestedSchema.name': 25 }) // compilation error - name must be a string
// at a depth greater than 9, code compiles but is not type checked (11 deep)
collection.findOne({
'nestedSchema.nestedSchema.nestedSchema.nestedSchema.nestedSchema.nestedSchema.nestedSchema.nestedSchema.nestedSchema.nestedSchema.name': 25
}) // NO compilation error
Note that our depth limit is a product of Typescript's recursive type limitations.
External Contributions
Many thanks to those who contributed to this release!
@ermik provided an extremely large schema to test compilation with, which made testing our new recursive schema support possible with large schemas straightforward.
@noahsilas for documentation improvements in change streams and fixing our Typescript types for read preferences.
@zendagin for adding Typescript support for hashed indexes.
@LinusU for removing support for server versions lower than our minimum supported server version and improving error messages for unacknowledged writes with hints.
Features
NODE-3651: add hashed index type (#3432) (f6b56a1)
NODE-3875: support recursive schema types (#3433) (26bce4a)
NODE-4503: throw original error when server attaches NoWritesPerformed label (#3441) (a7dab96)
NODE-4650: handle handshake errors with SDAM (#3426) (cbe7533)
NODE-4721: add aws-sdk as optional dependency (#3446) (b879cb5)
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.1.13 to 4.11.0.
Release notes
Sourced from mongodb's releases.
... (truncated)
Changelog
Sourced from mongodb's changelog.
... (truncated)
Commits
6fb87e4
chore(release): 4.11.0631455d
docs(NODE-4724): update fle docs to use "in use encryption" terminology (#3448)7a8b186
docs(NODE-4554): remove experimental tag from disambiguatedPaths (#3450)8f06a55
chore(NODE-4700): update dependencies (#3439)b879cb5
feat(NODE-4721): add aws-sdk as optional dependency (#3446)5f37cb6
fix(NODE-4475): make interrupted message more specific (#3437)26bce4a
feat(NODE-3875): support recursive schema types (#3433)a7dab96
feat(NODE-4503): throw original error when server attaches NoWritesPerformed ...dbfb7d5
docs: Note special case inAbstractCursor.forEach()
iterator (#3445)bf000ae
refactor(NODE-4689): track checked out connections (#3440)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)