-
Type: Task
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: mongodb-client-encryption-2.9.0
-
Component/s: None
Use Case
As a node driver engineer,
I want to deprecate any overloads async functions that take callbacks in mongodb-client-encryption,
So that we can make mongodb-client-encryption async-await in the next major release.
User Impact
Users will need to migrate to promise based code instead of callbacks, if they are using them. Users should be aware that in the upcoming major release, the JS logic will be moved into the driver.
Dependencies
- n/a
Unknowns
- Should we also deprecate any classes that will be moved to the driver in v6? The outcome of moving the FLE logic for users is that imports will change.
Acceptance Criteria
Implementation Requirements
- All public APIs in mongodb-client-encryption should have callback APIs deprecated. Look in the following places:
- All public methods on ClientEncryption.
- All public callback types on ClientEncryption.
- All exported overloads and types that use callbacks in index.d.ts
- Make note on all publicly exported classes that in the next major version the classes will be exported from the driver instead of mongodb-client-encryption.
- deprecate the AutoEncrypter interface in the driver and the class properties (MongoClient.autoEncrypter) that expose it.
note: We cannot deprecate overloads in jsdoc as we usually do in Typescript, so we will instead
- deprecate all jsdoc callback types
- all overloads in the index.d.ts file
- on optional callback parameters in jsdoc comments, prefix with DEPRECATED and add a deprecation warning.
Testing Requirements
- None.
Documentation Requirements
- regenerate mongodb-client-encryption API docs.
Follow Up Requirements
- release mongodb-client-encryption 2.9.0. since our options to document deprecations are limited, ensure the release notes mention the deprecations clearly.