Deprecation warning about promisifying repl.eval

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Minor - P4
    • 2.1.0
    • Affects Version/s: None
    • Component/s: CLI Module
    • None
    • 2
    • Iteration Nodosaurus, Iteration Oviraptor
    • Not Needed

      https://github.com/mongodb-js/mongosh/blob/ea0da2dd9b9b4930f84ba41f4a0452aeca18f07c/packages/cli-repl/src/mongosh-repl.ts#L647

      prints a warning in Node.js 21, because we are defining .eval for async repls as an async function (for convenience, so that we can use async/await inside the function):

      https://github.com/mongodb-js/mongosh/blob/ea0da2dd9b9b4930f84ba41f4a0452aeca18f07c/packages/cli-repl/src/async-repl.ts#L100

      We should just ensure that the overridden .eval does not actually return a Promise.

            Assignee:
            Bailey Pearson
            Reporter:
            Anna Henningsen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: