Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-5328

Manage react-ace as a peerDep

    • Type: Icon: Task Task
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: Tech debt
    • None
    • Not Needed

       

      ace seems to really want to be a global singleton, so best to make sure we only build and load one copy of it.

      Thread: https://mongodb.slack.com/archives/G2L10JAV7/p1638184873399500

      less things are trying to bundle this code with side effects treating it as a peer dependency, less libraries will need 1) to have special build setup for this 2) worry about different versions of this library running on the page. If only the host app is responsible for having ace editor available, the host app is the only one that would need to do custom Webpack config to make it work and will be responsible for the version number, being used which means that e.g., Charts or Cloud will not have issues in the future where they are blocked by us on the HIPAA issues due to our dependencies being outdated.

       

      See

      https://jira.mongodb.org/browse/COMPASS-4528

      https://github.com/mongodb-js/compass/pull/2603

      https://github.com/mongodb-js/mongosh/pull/1163

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            leroux.bodenstein@mongodb.com Le Roux Bodenstein
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: