-
Type: Bug
-
Resolution: Gone away
-
Priority: Minor - P4
-
None
-
Affects Version/s: bson-4.7.2, bson-5.0.1
-
Component/s: BSON
What problem are you facing?
Using a bigint in the Code's scope field causes an exception when inspected. This would also effect DBRef's field property if it was included in the inspect string.
Steps to reproduce?
> new Code(function a() {}, { a: 1n })
Uncaught TypeError: Do not know how to serialize a BigInt
at JSON.stringify (<anonymous>)
at Code.inspect (/Users/neal/code/drivers/js/bson/lib/bson.cjs:653:89)
at [nodejs.util.inspect.custom] (/Users/neal/code/drivers/js/bson/lib/bson.cjs:649:21)
- has to be finished together with
-
NODE-5040 Add color to BSON inspect functions
- Closed