-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: TypeScript
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