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

@mongodb-js/saslprep version 1.1.4 typescript import regression

    • 3
    • 2
    • Not Needed
    • 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?

      SASLPrep package: https://github.com/mongodb-js/devtools-shared/tree/main/packages/saslprep

      Reproduction

      Starting in version 1.1.4 of the saslprep package, this style of importing the saslprep function no longer compiles in TS

      import { saslprep } from "@mongodb-js/saslprep";
      saslprep('abc')
      

      The following line in index.d.ts is the type definition our driver relies upon for importing:

       export var saslprep: typeof import(".");
      

      It is not present in node.d.ts

      User Impact

      • No external impact
      • The driver cannot upgrade to the latest saslprep

      Dependencies

      • The driver

      Unknowns

      • How do we reintroduce the named export correctly?

      Acceptance Criteria

      Implementation Requirements

      • Add a named "saslprep" export to the saslprep package's src/node.ts file

      Testing Requirements

      • Manually test the driver with the updated version
      • Investigate typescript testing (tsd?) to prevent this class of regression

      Documentation Requirements

      • None

      Follow Up Requirements

      • None

            Assignee:
            bailey.pearson@mongodb.com Bailey Pearson
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: