-
Type:
New Feature
-
Resolution: Unresolved
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Dependencies
Use Case
As a developer,
I want to see which version of the driver a MongoClient is using by checking the object itself,
So that I don't have to guess which version is running when my project has many different plugins or dependencies.
As a devtools dev, user or TSE,
I want to easily determine which version of the package is being used,
So that I can identify which driver version is being used when debugging issues in mongosh or compass.
As a driver engineer,
I want an easy way to log version info from CI,
So that I can easily confirm that the environment I am testing in is the correct environment.
Motivation
Sometimes a project has more than one version of the MongoDB driver installed (for example, if a library like an ODM uses an older version than the main app). Currently, it is hard to tell exactly which version a specific client object is using.
By exposing the driver's metadata through the MongoClient instance, developers can easily log or check the version at runtime. This is more reliable than trying to find the right folder in node_modules.
User Experience
- Users can programmatically access the driver's version.
Dependencies
- n/a
Risks/Unknowns
- What is the best way to obtain the runtime information?
Acceptance Criteria
Implementation Requirements
- Export the version of each package as a part of that package's public API:
- bson
- driver
- mongodb-client-encryption
- kerberos
- zstd
- mongodb-connection-string-url
Testing Requirements
Documentation Requirements
- n/a
Follow Up Requirements
- n/a