Navigation

    mongosh Changelog

    Released April 1, 2021

    Internal improvements.

    Released March 31, 2021

    New features in this release:

    • Support for loading a .mongoshrc.js file at startup. Use this file to bootstrap the shell with customizations and extended functionality.
    • Ability to load scripts from the command line.
    • Support for --eval option.
    • Support for --tlsCertificateSelector on Windows and macOS.

    Bug fixes in this release:

    Released March 10, 2021

    New features in this release:

    • Support for the load() method.
    • Support for AWS IAM authentication.

    Bug fixes in this release:

    • Autocomplete works properly when connected to secondary node.
    • db.createUser() on $external database now handles password properly.
    • Miscellaneous other improvements.

    Released February 24, 2021

    Minor internal improvements and bug fixes.

    Released February 22, 2021

    Minor internal improvements and bug fixes.

    Released February 17, 2021

    New features in this release:

    Bug fixes in this release:

    • Running setReadConcern no longer reverses db.auth() authentication operations.
    • Pressing the backspace key in the password prompt no longer adds an asterisk, and now behaves as expected.
    • Running UUID() without a value now generates a random UUID.

    Released February 3, 2021

    New features in this release:

    Bug fixes in this release:

    • mongosh no longer fails when connecting to a node in the STARTUP2 state.
    • mongosh now properly displays startup warnings.
    • explain() on aggregations now return accurate and complete results.

    Released November 30, 2020

    New features in this release:

    Bug fixes and miscellaneous updates in this release:

    • Remove support for deprecated 3.6 CRUD methods (insert(), remove(), save(), and update()).
    • Fix an issue with loading JavaScript files into mongosh.
    • Fix an issue where when inserting many documents via a for loop, the loop would abort before all documents were inserted.
    • Fix issue with output when printing result of a cursor.
    • Update the Node REPL to use Node version 14.

    Released November 11, 2020

    • Autocomplete now works properly when connected to a MongoDB 4.4.1 deployment.
    • The sh.status() method now outputs correctly in the browser shell.

    Released October 12, 2020

    • Adds support for replica set management methods.
    • Adds support for sharded cluster management methods.

    Released October 1, 2020

    • Adds support for collection names with a dot. For example, to query a collection named my.collection, you can run:

      db.my.collection.findOne()

    Released September 15, 2020

    Released September 14, 2020

    This release adds support for:

    • New cursor methods
    • Query planCache methods
    • Error helper methods
    • The following helper commands:

      • show users
      • show profile
      • show logs
      • show log[<name>]

    This release includes an .rpm artifact which can be downloaded from the MongoDB Download Center.

    Whenever a command's output includes { ok: 0 }, mongosh throws an exception and does not return the raw output from the server.

    The legacy mongo shell error handling is not consistent between commands. mongosh standardizes the user-facing behavior for a more consistent experience.

    • MONGOSH-323: getUser() userId field is outputted as binary.
    • MONGOSH-337: Linux tarball is not gzipped.
    • MONGOSH-341: Wrong values with NumberLong for numbers > Number.MAX_SAFE_INTEGER. As a result of this fix, values passed to NumberLong and NumberDecimal must be strings.

      Important

      The fix for MONGOSH-341 is a breaking change when compared to behavior in the legacy mongo shell.

    • MONGOSH-346: Ctrl+C does not terminate the currently running command in the shell.

      Note

      Ctrl+C terminates the process in the shell, but does not terminate the process on the MongoDB server.

    Released August 31, 2020

    This release adds support for the following APIs:

    • Credentials are now properly redacted in logging and history.

    For information on past releases, refer to mongosh Releases on GitHub.

    Give Feedback