Replace node:os endianness() with BSON.NumberUtils.isBigEndian

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Unknown
    • 7.1.0
    • Affects Version/s: None
    • Component/s: None
    • 2
    • Not Needed
    • None
    • Hide

      Create a copy of the Kickoff Template with the issue key (NODE-XXX) in the filename and share a link to the new doc via this field.

      Show
      Create a copy of the Kickoff Template with the issue key (NODE-XXX) in the filename and share a link to the new doc via this field.
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      Use Case

      As a... Node.js Driver Developer
      I want... to replace the usage of the Node.js os.endianness() method with the platform-agnostic NumberUtils.isBigEndian (or equivalent) from the BSON library.
      So that... I can remove the import of the os module, moving one step closer to a fully environment-agnostic driver that doesn't rely on Node.js internal modules.

      User Experience

      • No change. This is a purely internal refactor.

      Dependencies

      • Requires a version of the bson library that exports NumberUtils.

      Risks/Unknowns

      • As long as BSON implements it correctly for the JS runtime, there is no risk

      Acceptance Criteria

      Implementation Requirements

      • Export NumberUtils from BSON
      • Use NumberUtils instead of os.endianness in the one location in the driver

      Testing Requirements

      • Existing tests must pass

      Documentation Requirements

      • None

      Follow Up Requirements

      • Highlight those changes in the release section

        There are no Sub-Tasks for this issue.

            Assignee:
            Durran Jordan
            Reporter:
            Sergey Zelenov
            Pavel Safronov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: