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

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • 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
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • 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

            Assignee:
            Durran Jordan
            Reporter:
            Sergey Zelenov
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: