The MongoDB Node.js team is pleased to announce version 6.3.0 of the bson package!
Release Notes
BSON short basic latin string parsing performance improved! 🐎
The BSON library's string decoding logic now attempts to optimize for basic latin (ASCII) characters. This will apply to both BSON keys and BSON values that are or contain strings. If strings are less than 6 bytes we observed approximately ~100% increase in speed while around 15 bytes the performance was about ~30% better. For any non-basic latin bytes or at 20 bytes or greater the BSON library will continue to use Node.js' Buffer.toString API.
The intent is to generally target the deserialization of BSON keys which are often short and only use basic latin, Et tu, _id?
Using a number type as input to the ObjectId constructor is deprecated
Instead, use static createFromTime() to set a numeric value for the new ObjectId.
The MongoDB Node.js team is pleased to announce version 6.3.0 of the mongodb package!
Release Notes
New client option serverMonitoringMode
For users that want to control the behaviour of the monitoring connection between each node in the topology, a new option, serverMonitoringMode, has been added. This defaults to auto but can be forced into a specific mode by providing a value of poll or stream. When the setting is auto the monitoring mode will be determined by the environment the driver is running in, specifically, FaaS environments prefer "polling" mode and all others prefer "streaming".
A polling monitor periodically issues a hello command to the node at an interval of heartbeatFrequencyMS. A streaming monitor sends an initial hello and then will automatically get a response from the Node when a change in server configuration occurs or at a maximum time of heartbeatFrequencyMS. The value of that option defaults to 10000 milliseconds.
This new option can be provided in the connection string or as an option to the MongoClient.
// In the connection string.
new MongoClient('mongodb://127.0.0.1:27017/?serverMonitoringMode=stream');
// In the options
new MongoClient('mongodb://127.0.0.1:27017/', { serverMonitoringMode: 'stream' });
Fix connection leak when serverApi is enabled
When enabling serverApi the driver's RTT measurement logic (used to determine the closest node) still sent the legacy hello command "isMaster" causing the server to return an error. Unfortunately, the error handling logic did not correctly destroy the socket which would cause a leak.
Both sending the correct hello command and the error handling connection clean-up logic are fixed in this change.
GridFS fields deprecated
The GridFS contentType and aliases options are deprecated. According to the GridFS spec, applications wishing to store contentType and aliases should add a corresponding field to the metadata document instead.
Remove deprecation warning about punycode
The mongodb-connection-string-url package which parses connection strings relied on Node's punycode module, the package now imports the community package removing the deprecation warning on Node.js 20+.
Features
NODE-3881: require hello command + OP_MSG when 'loadBalanced=True' (#3907) (fd58eec)
NODE-5197: add server monitoring mode (#3899) (ae4c94a)
This version was pushed to npm by dbx-node, 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 show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@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)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/csfloat/inspect/network/alerts).
Bumps bson to 6.3.0 and updates ancestor dependency mongodb. These dependencies need to be updated together.
Updates
bson
from 1.0.9 to 6.3.0Release notes
Sourced from bson's releases.
... (truncated)
Changelog
Sourced from bson's changelog.
... (truncated)
Commits
78b737b
chore(main): release 6.3.0 [skip-ci] (#641)cdb779b
feat(NODE-5861): optimize parsing basic latin strings (#642)44bec19
feat(NODE-3034): deprecate number as an input to ObjectId constructor (#640)3b2ed17
chore(NODE-5699): update dev dependencies (#639)99cd066
chore(NODE-5768): add comment trigger for release notes (#638)a382485
test(NODE-5692): new benchmarks using bson-bench (#636)77fac2a
chore(main): release 6.2.0 [skip-ci] (#632)7802c66
feat(NODE-5040): add color to BSON inspect (#635)eb98b8c
fix(NODE-5640): BsonVersionError improve message clarity (#629)58c002d
chore(release): 6.1.0Maintainer changes
This version was pushed to npm by dbx-node, a new releaser for bson since your current version.
Updates
mongodb
from 2.2.36 to 6.3.0Release notes
Sourced from mongodb's releases.
... (truncated)
Changelog
Sourced from mongodb's changelog.
... (truncated)
Commits
a837036
chore(main): release 6.3.0 [skip-ci] (#3904)ebbfb8a
fix(NODE-5749): RTTPinger always sends legacy hello (#3921)ae4c94a
feat(NODE-5197): add server monitoring mode (#3899)08c9fb4
fix(NODE-4863): do not use RetryableWriteError for non-server errors (#3914)54adc9f
feat(NODE-4878): Add remaining log configurable client options (#3908)c0506b1
docs(NODE-5730): update load balancer docs (#3910)b602162
refactor(NODE-5696): add async-iterator based socket helpers (#3896)89cb092
test(NODE-5732): update data lake test scripts (#3913)fd58eec
feat(NODE-3881): require hello command + OP_MSG when 'loadBalanced=True' (#3907)bb5fa43
feat(NODE-5452): Logging Cosmos Document DB Info Message (#3902)Maintainer changes
This version was pushed to npm by dbx-node, 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 show