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

BSON does not sort the RegExp options string

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • bson-4.4.1
    • Affects Version/s: 4.0.0, bson-4.3.0
    • Component/s: None
    • Not Needed

      Acceptance Criteria

      • Fix the BSONRegex constructor to alphabetize the options
      • Investigate and fix the spec test that isn't catching this error

       

      Original Description

      The options in a BSONRegExp are supposed to be always alphabetized.
      https://github.com/mongodb/js-bson/blob/master/src/regexp.ts#L40

      There is a spec test we should be failing here: https://github.com/mongodb/specifications/blob/859af7b17a0c99bdd727ec11dd8733ac25da7398/source/bson-corpus/tests/regex.json#L33-L37

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

              Created:
              Updated:
              Resolved: