-
Type: Task
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
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?Yes
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.
- is depended on by
-
NODE-4843 Demonstrate v4 types working in v5 serializer and v5 types working in v4 serializer
- Closed
-
COMPASS-6393 Investigate changes in NODE-4892: Add versioning to bson type classes and assert version in serialize and stringify
- Closed
- is related to
-
NODE-5504 Bump versioning on BSON type classes
- Closed