Investigate changes in NODE-5763: Remove number as an input to ObjectId constructor

    • Type: Investigation
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      Use Case

      As a BSON user
      I want the ObjectId constructor to either generate a new random Oid or make one from a full set of 12 bytes
      So that the constructor creates ObjectIds from complete data

      User Impact

      • Numbers will no longer be supported in the constructor, users will need to migrate to createFromTime

      Dependencies

      • Driver

      Unknowns

      • None

      Acceptance Criteria

      Implementation Requirements

      • Remove support for passing a number to the constructor
      • Any non-nullish value should be type checked, any value not in the set of permitted values should cause an error to be thrown
        • Permitted: 24 character hex strings, 12 length plain number arrays, 12 length Uint8Arrays, ObjectId, and ObjectIdLike

      Testing Requirements

      • Assert passing a number into the constructor throws
      • Assert isValid returns false for number

      Documentation Requirements

      • Make sure API docs and Typescript are accurate

      Follow Up Requirements

      • None

              Assignee:
              Unassigned
              Reporter:
              TPM Jira Automations Bot
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: