bson 7.3.0 → 7.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/bson.cjs CHANGED
@@ -1316,7 +1316,7 @@ class Long extends BSONValue {
1316
1316
  }
1317
1317
  if (value < 0)
1318
1318
  return Long.fromNumber(-value, unsigned).neg();
1319
- return Long.fromBits(value % TWO_PWR_32_DBL | 0, (value / TWO_PWR_32_DBL) | 0, unsigned);
1319
+ return Long.fromBits((value % TWO_PWR_32_DBL) | 0, (value / TWO_PWR_32_DBL) | 0, unsigned);
1320
1320
  }
1321
1321
  static fromBigInt(value, unsigned) {
1322
1322
  const FROM_BIGINT_BIT_MASK = 0xffffffffn;
@@ -2606,9 +2606,9 @@ class ObjectId extends BSONValue {
2606
2606
  };
2607
2607
  static {
2608
2608
  this.resetState();
2609
- const { startupSnapshot } = globalThis?.process?.getBuiltinModule('v8') ?? {};
2610
- if (startupSnapshot?.isBuildingSnapshot()) {
2611
- startupSnapshot?.addDeserializeCallback(this.resetState);
2609
+ const { startupSnapshot } = globalThis?.process?.getBuiltinModule?.('v8') ?? {};
2610
+ if (startupSnapshot?.isBuildingSnapshot?.()) {
2611
+ startupSnapshot?.addDeserializeCallback?.(this.resetState);
2612
2612
  }
2613
2613
  }
2614
2614
  static cacheHexString;