Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-5418

deprecate callbacks and publicly exported classes in mongodb-client-encryption

    • 3
    • 2
    • Not Needed
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      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.

            Assignee:
            bailey.pearson@mongodb.com Bailey Pearson
            Reporter:
            bailey.pearson@mongodb.com Bailey Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: