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

Where should the "@mongodb-js/saslprep" package live?

    • Type: Icon: Question Question
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • 1
    • 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 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

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            maurizio.casimirri@mongodb.com Maurizio Casimirri
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: