npm / mongodb-memory-server-core
mongodb-memory-server-core
What changed in mongodb-memory-server-core 7 to 11, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-05.
52 breaking1 security22 new APIs and options20 behavior and defaults21 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initmongodb-memory-server-core 1112 changes
Breaking changes 3
The lowest supported Node.js version is now 20.19.0.
MongoDB versions below 4.2.0 are no longer supported.
The mongodb-memory-server-global-4.0 package was removed because it is unsupported by the MongoDB driver.
Security 1
Binaries are checksummed during extraction and checked, helping detect invalid binaries.
Behavior and default changes 5
The MongoMemoryReplSet electionTimeoutMillis timeout is increased to 5000ms.
The default 4.4 binary is updated to 4.4.30.
The default MongoDB binary version is updated to 8.2.6.
The default MongoDB binary version is now 8.2.1.
Resume downloads is enabled by default.
Fixes and other changes 3
MongoInstance::stop now always unsets mongodProcess, changing process state after stopping.
USE_HTTP requests now use the http module.
Corrected the configuration mapping for RESUME_DOWNLOAD.
mongodb-memory-server-core 106 changes
Behavior and default changes 2
The RESUME_DOWNLOAD option is stabilized.
Updates the default MongoDB binary version to 7.0.24 and the default 4.2 and 4.4 binaries to 4.2.25 and 4.4.29.
Fixes and other changes 4
Adds a fallback version when determining the SUSE version string.
Accounts for a known compatibility issue on SUSE 12 with MongoDB versions >=8.0.0.
Accounts for known compatibility issues on SUSE 13 and 14.
Silences ECONNRESET errors during shutdown.
mongodb-memory-server-core 798 changes
Breaking changes 49
The default MongoDB version changes to 4.0.25.
The utils default export was removed; import generateDbName as a named export.
generateDbName now returns an empty string by default, affecting the database name used in generated MongoDB URIs.
Its parameter now uses an empty value by default, and the parameter definition changed to use admin by default.
Renamed to uriTemplate.
Replaces MongoBinary.getCachePath.
Removed in favor of the resolveConfig VERSION value.
downloadDir is now required when using MongoBinaryDownload.
Removed; use utils.pathExists instead.
The mongodb package is now non-optional.
Renamed to MongodOpts.
Renamed childProcess to mongodProcess.
Root values of MongodOpts are now required.
The port and dbPath values are now required.
Removed; use mongodProcess?.pid instead.
Starting no longer resets port to undefined.
Removed; replica-set primary waiting now uses events.
Lifecycle functions were renamed for clarity: create, start, and stop replace the previous names.
The servers value is no longer reset after stop.
_initReplSet is protected, restricting direct access while allowing subclasses to use it.
_initServer is protected, restricting direct access while allowing subclasses to use it.
_state is protected, restricting direct access while allowing subclasses to use it.
_waitForPrimary is protected, restricting direct access while allowing subclasses to use it.
The autoStart option was removed.
Removed.
Removed; use opts.replSet.dbName instead.
getInstanceOpts is protected, restricting direct access while allowing subclasses to use it.
Now synchronous and can be called while the replica set is in the init state.
The option was removed; add --oplogSize and its value to replSetOpts.args instead.
The event enum was renamed from MongoMemoryReplSetEventEnum.
The state enum was renamed from MongoMemoryReplSetStateEnum.
The childProcess alias was removed; it was an alias for instance.childProcess.
The uri property was removed in favor of getUri.
Adds create, which always calls MongoMemoryServer.start.
Removed; use getUri instead.
Removed; instanceInfo.dbName can be used instead.
Removed; instanceInfo.dbPath can be used instead.
Renamed to the instanceInfo getter, which returns undefined instead of false.
getInstanceInfo now returns undefined when instance information is unavailable.
Removed; instanceInfo.port can be used instead.
Now synchronous.
instanceInfo is protected, restricting direct access while allowing subclasses to use it.
Now returns undefined instead of null.
Now returns undefined instead of null.
The event enum was renamed from MongoMemoryServerEventEnum.
The state enum was renamed from MongoMemoryServerStateEnum.
The SpawnOptions type alias is removed, so TypeScript users can no longer rely on it.
Replaces getUriBase; port may be undefined to allow a host list.
All USE* and SKIP* environment variables were removed in favor of improved handling.
New APIs and options 22
Allows overriding the archive name.
Adds the assertion function to db_util.
Adds an option to disable automatic MongoDB binary downloads.
Adds DryMongoBinary for working with MongoDB binary options.
Adds the ensureAsync function to db_util.
Adds generateOptions to DryMongoBinary.
Adds an option to use http instead of https for binary downloads.
Adds a custom lockfile implementation.
Adds the ManagerAdvanced class.
Adds the ManagerBase class.
Adds the isReplSet value to MongoInstance.
Adds basic createAuth support.
Adds a state getter.
Adds the ability to automatically create authentication.
Adds getStartOptions.
Adds a state getter.
Supports reusing instances and dbPath values.
Adds the StateError error.
Adds the UnknownArchitecture error.
Adds the UnknownLockfileStatus error.
Adds the UnknownPlatform error.
Adds pathExists.
Behavior and default changes 13
Now checks that the download directory has sufficient permissions.
Adds download support for arch/manjaro and ubuntu-arm64, with support for more arm64 versions.
Now extends EventEmitter.
Now implements ManagerBase.
Supports reusing instances and dbPath values.
The method can execute while state is init.
getUri is now synchronous, so callers no longer need to await it.
Now implements ManagerAdvanced.
getDbName is now synchronous, so callers no longer need to await it.
getDbPath is now synchronous, so callers no longer need to await it.
getPort is now synchronous, so callers no longer need to await it.
The download directory and system binary are resolved relative to the found package.json.
Configuration resolution uses the first found package.json with a non-empty config field.
Fixes and other changes 14
The configured DOWNLOAD_URL is tried before deriving an archive name.
generatePaths no longer accesses the filesystem, changing how binary paths are generated.
Fedora version 34 and later receive dedicated download handling.
The global binary path is used only when it is not empty.
Binary path resolution uses INIT_CWD when available.
Debian 9.2 binaries are selected for MongoDB versions earlier than 4.2.0.
Debian testing releases are now handled when selecting MongoDB binaries.
macOS arm64 can use translated x64 archives.
The description and usage of dbName in the MongoDB URI are fixed.
getUri now waits until the replica set is running.
The server state changes to stopped when startup fails.
An otherDb is no longer generated when the corresponding setting is false.
MongoMemoryServer.stop returns false when the server is already stopped.
System binary validation also checks for execute permission.