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/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "vendor"
15
15
  ],
16
16
  "types": "bson.d.ts",
17
- "version": "7.3.0",
17
+ "version": "7.3.1",
18
18
  "author": {
19
19
  "name": "The MongoDB NodeJS Team",
20
20
  "email": "dbx-node@mongodb.com"
@@ -33,7 +33,7 @@
33
33
  "@types/chai": "^4.3.17",
34
34
  "@types/mocha": "^10.0.7",
35
35
  "@types/node": "^24.2.1",
36
- "@types/sinon": "^17.0.4",
36
+ "@types/sinon": "^21.0.0",
37
37
  "@types/sinon-chai": "^3.2.12",
38
38
  "@typescript-eslint/eslint-plugin": "^8.31.1",
39
39
  "@typescript-eslint/parser": "^8.31.1",
@@ -44,7 +44,7 @@
44
44
  "eslint": "^9.33.0",
45
45
  "eslint-config-prettier": "^10.1.2",
46
46
  "eslint-plugin-prettier": "^5.2.6",
47
- "eslint-plugin-tsdoc": "^0.4.0",
47
+ "eslint-plugin-tsdoc": "^0.5.2",
48
48
  "magic-string": "^0.30.11",
49
49
  "mocha": "^11.7.1",
50
50
  "node-fetch": "^3.3.2",
@@ -59,7 +59,7 @@
59
59
  "tsd": "^0.33.0",
60
60
  "typescript": "^5.8.3",
61
61
  "typescript-cached-transpile": "0.0.6",
62
- "uuid": "^11.1.0"
62
+ "uuid": "^13.0.0"
63
63
  },
64
64
  "tsd": {
65
65
  "directory": "test/types",
package/src/long.ts CHANGED
@@ -248,7 +248,7 @@ export class Long extends BSONValue {
248
248
  if (value + 1 >= TWO_PWR_63_DBL) return Long.MAX_VALUE;
249
249
  }
250
250
  if (value < 0) return Long.fromNumber(-value, unsigned).neg();
251
- return Long.fromBits(value % TWO_PWR_32_DBL | 0, (value / TWO_PWR_32_DBL) | 0, unsigned);
251
+ return Long.fromBits((value % TWO_PWR_32_DBL) | 0, (value / TWO_PWR_32_DBL) | 0, unsigned);
252
252
  }
253
253
 
254
254
  /**
package/src/objectid.ts CHANGED
@@ -47,9 +47,9 @@ export class ObjectId extends BSONValue {
47
47
  this.resetState();
48
48
  // https://nodejs.org/api/v8.html#startup-snapshot-api
49
49
  // @ts-expect-error Node.js types not present since this is an optional API
50
- const { startupSnapshot } = globalThis?.process?.getBuiltinModule('v8') ?? {};
51
- if (startupSnapshot?.isBuildingSnapshot()) {
52
- startupSnapshot?.addDeserializeCallback(this.resetState);
50
+ const { startupSnapshot } = globalThis?.process?.getBuiltinModule?.('v8') ?? {};
51
+ if (startupSnapshot?.isBuildingSnapshot?.()) {
52
+ startupSnapshot?.addDeserializeCallback?.(this.resetState);
53
53
  }
54
54
  }
55
55
 
package/src/timestamp.ts CHANGED
@@ -152,6 +152,7 @@ export class Timestamp extends LongWithoutOverridesClass {
152
152
 
153
153
  toJSON(): { $timestamp: string } {
154
154
  return {
155
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
155
156
  $timestamp: this.toString()
156
157
  };
157
158
  }