The MongoDB Node.js team is pleased to announce version 5.1.0 of the mongodb package!
Release Highlights
Support for JavaScript bigints in the driver
The driver now supports automatic serialization of JavaScript bigints to BSON.Longs. It also supports deserializing of BSON.Long values returned from the server to bigint values when the useBigInt64 flag is passed as true.
import { MongoClient } from 'mongodb';
(async () => {
const client = new MongoClient('<YOUR CONNECTION STRING>');
const db = client.db('test');
const coll = db.collection('bigints');
await coll.insertOne({ a: 10n }); // The driver automatically serializes bigints to BSON.Long before being sent to the server
const docBigInt = await coll.findOne({ a: 10n }, { useBigInt64: true }); // Must provide the useBigInt64 flag to specify that bigints get returned
console.log(docBigInt);
// { _id: ObjectId(...), a: 10n }
const doc = await coll.findOne({ a: 10n }); // Must provide the useBigInt64 flag to specify that bigints get returned
console.log(doc);
// { _id: ObjectId(...), a: 10 }
await client.close();
})()
Features
NODE-3445: add support for AssumeRoleWithWebIdentity in aws authentication (#3556) (e8a30b1)
NODE-4877: Add support for useBigInt64 (#3519) (917668c)
NODE-5050: support GCP automatic credential fetch for CSFLE (#3574) (722a4a6)
Bug Fixes
NODE-5044: Write Concern 0 Must Not Affect Read Operations (#3541) (#3575) (10146a4)
NODE-5052: prevent cursor and changestream close logic from running more than once (#3562) (71d0d79)
NODE-5064: consolidate connection cleanup logic and ensure socket is always closed (#3572) (e544d88)
This version was pushed to npm by w-a-james, 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 5.1.0.
Release notes
Sourced from mongodb's releases.
... (truncated)
Changelog
Sourced from mongodb's changelog.
... (truncated)
Commits
687f51a
chore(release): 5.1.0917668c
feat(NODE-4877): Add support for useBigInt64 (#3519)10146a4
fix(NODE-5044): Write Concern 0 Must Not Affect Read Operations (#3541) (#3575)722a4a6
feat(NODE-5050): support GCP automatic credential fetch for CSFLE (#3574)e544d88
fix(NODE-5064): consolidate connection cleanup logic and ensure socket is alw...0df03ef
test(NODE-5035): skip oidc tests (#3573)66436e2
docs(NODE-5058): remove internal logo from 404 page and template (#3570)666f01c
refactor(NODE-5063): make DestroyOptions required on connection.destroy (#3568)9ce0bcc
test(NODE-5038): setup OIDC CI environment (#3560)71d0d79
fix(NODE-5052): prevent cursor and changestream close logic from running more...Maintainer changes
This version was pushed to npm by w-a-james, 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)