Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-2722

Rely on the Buffer class for all binary storage

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • bson-4.2.0
    • Affects Version/s: None
    • Component/s: BSON

      Node's Buffer type is a UInt8Array under the hood but to provide better cross platform javascript support we can move to using the more generic ArrayBuffer. this shouldn't result in a breaking change since Buffer is a subclass of UInt8Array which is a subclass of ArrayBuffer, so we're just going up the inheritance chain. Acceptance criteria should include tests to ensure this assumption is correct.

      In order to use ArrayBuffer only we would need to in house a lot of functionality and potentially have breaking changes in our BSON Binary class.
      So we decided instead to keep Buffer as a bundled dependency and consolidate the types of our binary storage.

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: