-
Type: Question
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
Use Case
As a devtools engineer I want the @mongodb-js/saslprep package, that is a dependency only for the node.js driver, to not be part of the devtools-shared repository.
So that: the package doesn't cause issues with the dependency resolution in the devtools-shared monorepo, and DevTools doesn't maintain driver code that is not directly used in tools.
For context: @mongodb-js/saslprep is a fork of saslprep, and is required as a production dependency in the driver, but not directly by devtools products.
Having @mongodb-js/saslprep in the devtools-shared is also causing a small issue in the dependency resolution of the monorepo: npm is resolving @mongodb-js/saslprep to the local packages/saslprep for any package in the monorepo that is using the mongodb driver.
That means that packages/saslprep must be compiled before dependants packages can be compiled or tested. However since mongodb is not part of the monorepo, lerna fails to correctly "toposort" the packages, and packages/saslprep is processed only after its dependants, which causes CI tasks to fail.
We are currently working around this specific issue by adding @mongodb-js/saslprep as a development dependency in monorepo packages that is using the driver.
User Impact
There is no direct user impact, with the possible exception that the DevTools engineers may have limited domain knowledge, and we could cause problems accidentally (ie. cause breakage for the driver while updating the typescript version).
Dependencies
None
Unknowns
Where should the package be moved?
During the node.js sync the potential options discussed were:
- Separate repo in mongodb-js
- Apply to maintain the original saslprep package
- Absorb the package code directly into the driver code
Acceptance Criteria
Implementation Requirements
- functional reqs, potential snafus to avoid, performance targets, etc
Testing Requirements
- unit test, spec test sync, etc
Documentation Requirements
- DOCSP ticket, API docs, etc
Follow Up Requirements
- additional tickets to file, required releases, etc
- depends on
-
COMPASS-8158 Move saslprep out of monorepo
- Needs Triage