-
Type: Investigation
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Not Needed
Use Case
As a node engineer
I want to ensure BSON input types are from the same version as the serializer/stringifier using them
So that there are no unexpected errors or silent serialization issues caused by the mixing of bson versions
User Impact
- BSON v5 serializer and stringify will throw if given types from a BSON version that is not v5
Unknowns
- Will we ship this?
Acceptance Criteria
Implementation Requirements
- Add Symbol.for('@@mdb.bson.version') property to all bson type classes and set it to 5
- Validate that if a bsontype is detected it has the version number set as expected
Testing Requirements
- Test that types without a version property throw errors
- Test that type with a version property serialize as expected
Documentation Requirements
- Migration guide will have a section on the explicity incompatibility and what the expected support is (all 5.x.x versions work with each other)
Follow Up Requirements
- Release an alpha with this change and follow up with downstream teams.
- depends on
-
NODE-4892 Add versioning to bson type classes and assert version in serialize and stringify
- Closed