Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 6, 2025

Bumps bson from 6.10.4 to 7.0.0.

Release notes

Sourced from bson's releases.

v7.0.0

7.0.0 (2025-11-05)

The MongoDB Node.js team is pleased to announce version 7.0.0 of the bson package!

Release Notes

⚠ Breaking Changes

Minimum supported Node.js version now 20.19.0

The minimum supported Node.js version is now v20.19.0. We strive to keep our minimum supported Node.js version in sync with the runtime's release cadence to keep up with the latest security updates and modern language features. Our TypeScript target has also been updated to ES2023.

BSON now requires BigInt literal support

BSON now uses Javascript BigInt syntax and requires a JS engine with support for BigInt literal syntax.

All BSON bundles now use globalThis.crypto for random byte generation

Until [email protected], BSON has supported Node.js v16. Node.js v16 does not include crypto in the global object, which necessitated importing crypto from node:crypto. This require has caused many headaches for bundlers. We improved the situation in NODE-6074, but this release updates our Node.js bundle to rely on the global object instead and removes all requires from the bundle.

BSON no longer vendors atob, btoa, and TextEncoder for react native builds

The React Native JS engine (Hermes) now supports atob, btoa, and TextEncoder natively and polyfills are no longer needed. BSON no longer includes these polyfills for react native builds.

ObjectId constructor no longer accepts a number

If you wish to create an ObjectId from a numeric timestamp, use ObjectId.createFromTime() instead.

BSON Binary subtype 2 constant deprecated

BSON Binary subtype 2 was previously deprecated in the BSON specification, but the corresponding subtype constant remained available in the BSON library. This constant has now been deprecated to align with the specification.

Non-breaking Features

New bsonType symbol property as an alias for _bsontype

JS classes representing BSON values now have a bsonType symbol property as an alias for the existing _bsontype property. This makes it easier to distinguish between values of a specific BSON type and documents with arbitrary keys after deserializing:

import { bsonType, deserialize } from 'bson';
const doc = deserialize(...);
// will be set when doc.value is a BSON wrapper class or a sub-document { _bsontype: '...' }
console.log(doc.value._bsontype);
// will be set if and only if doc.value is a BSON wrapper class
console.log(doc.value[bsonType]);

It is safe to replace all uses of value._bsontype with value[bsonType].

... (truncated)

Changelog

Sourced from bson's changelog.

7.0.0 (2025-11-05)

Miscellaneous Chores

7.0.0-alpha.2 (2025-10-24)

Bug Fixes

  • NODE-7271: revert private property usage in ObjectId (#835) (79faf75)

7.0.0-alpha.1 (2025-10-21)

⚠ BREAKING CHANGES

  • bump BSON_MAJOR_VERSION to 7 (#832)

Features

7.0.0-alpha (2025-10-21)

⚠ BREAKING CHANGES

  • NODE-7098: use bigint literal syntax (#826)
  • NODE-5763: remove support for new ObjectId() (#824)
  • NODE-6625: remove support for Node 16 and 18 (#821)

Features

  • NODE-5763: remove support for new ObjectId(<number>) (#824) (21cc3ff)
  • NODE-6321: remove require('crypto') from Nodejs bundle (#825) (7ba8917)
  • NODE-6625: remove support for Node 16 and 18 (#821) (f636254)
  • NODE-7019: remove react native vendor polyfills (#827) (883f238)
  • NODE-7098: use bigint literal syntax (#826) (94bf732)
  • NODE-7099: deprecate BSON binary subtype 2 constant (#812) (f61946d)
  • NODE-7255: add well-known Symbol alias for _bsontype (#829) (1e1b619)
Commits
  • 988fa17 chore(main): release 7.0.0 (#848)
  • b925f26 chore: prerelease false (#847)
  • 186d5f3 chore: remove alpha tag on main (#846)
  • d9bf5c8 chore: prepare for 7.0.0 release (#845)
  • 40a6082 docs(NODE-7173): update v7 compat table (#844)
  • e8840dc test(NODE-7281): add node 24 to ci (#839)
  • 5d9ff9d chore(deps-dev): bump tar from 7.5.1 to 7.5.2 (#838)
  • b2be66a chore(deps-dev): bump the development-dependencies group across 1 directory w...
  • baa070a chore(deps): bump mongodb-labs/drivers-github-tools from 2 to 3 (#822)
  • 1a6afc6 chore(deps-dev): bump sinon from 18.0.1 to 21.0.0 (#819)
  • Additional commits viewable in compare view

Dependabot compatibility score

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 <dependency name> 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)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Nov 6, 2025
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/bson-7.0.0 branch 5 times, most recently from 131828f to f470c72 Compare November 12, 2025 18:01
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/bson-7.0.0 branch 2 times, most recently from 9675787 to c983533 Compare November 20, 2025 17:21
Bumps [bson](https://github.com/mongodb/js-bson) from 6.10.4 to 7.0.0.
- [Release notes](https://github.com/mongodb/js-bson/releases)
- [Changelog](https://github.com/mongodb/js-bson/blob/main/HISTORY.md)
- [Commits](mongodb/js-bson@v6.10.4...v7.0.0)

---
updated-dependencies:
- dependency-name: bson
  dependency-version: 7.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/bson-7.0.0 branch from c983533 to eb53177 Compare November 27, 2025 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant