-
Type: Task
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
Use Case
As a Compass Engineer
I want to resolve the CJS module instead of ESM when bundling / resolving BSON imports
So that I do not have to work around TLA and get the same BSON when the driver "requires" the CJS module.
User Impact
- None, this effects compass. It adds a custom export condition that we can hook into.
Dependencies
- None
Unknowns
- None
Acceptance Criteria
Implementation Requirements
- Add a "compass:exports" field to the package.json "exports" conditions
- point it's "default" field at the CJS module, and "types" at the definitions.
Testing Requirements
- Manually verify this unblocks compass
Documentation Requirements
- None
Follow Up Requirements
- Could this be a way to make our internal type definitions available to compass?
- Maybe not, tsc would need to be told to look at that exports condition, something to consider
- is related to
-
NODE-6623 BSON exports causing confusion
- Investigating