-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: bson-4.1.0
-
Component/s: BSON
-
None
-
Empty show more show less
https://github.com/mongodb/js-bson/issues/384
As described in the issue, the inner logic for determining whether to serialize as Long/Double is never reached because of the outer condition for:
value >= constants.JS_INT_MIN &&
value <= constants.JS_INT_MAX
However, simply removing the outer condition causes these tests to fail.
It's not immediately clear how we should deserialize Longs which are larger than Number.MAX_SAFE_INTEGER.