From 9d569ac63e7f6bd729e0d98254226f4ed18acb0a Mon Sep 17 00:00:00 2001 From: hasezoey Date: Thu, 18 Jul 2024 12:50:30 +0200 Subject: [PATCH] feat(resolveConfig): update default binary version to 7.x BREAKING CHANGE: Default binary version is now "7.0.11" --- README.md | 4 ++-- docs/api/config-options.md | 2 +- docs/guides/mongodb-server-versions.md | 2 +- .../src/__tests__/testUtils/globalSetup.ts | 2 +- packages/mongodb-memory-server-core/src/util/resolveConfig.ts | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index eb699ac2..f429451f 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ On Linux, you will also need `libcurl4` (or `libcurl3` on some older distro vers ### Configuring which mongod binary to use -The default behavior is that version `7.0.9` for your OS will be downloaded. By setting [Environment variables](https://typegoose.github.io/mongodb-memory-server/docs/api/config-options) you are able to specify which version and binary will be downloaded: +The default behavior is that version `7.0.11` for your OS will be downloaded. By setting [Environment variables](https://typegoose.github.io/mongodb-memory-server/docs/api/config-options) you are able to specify which version and binary will be downloaded: ```sh export MONGOMS_DOWNLOAD_URL=https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1804-4.2.8.tgz @@ -128,7 +128,7 @@ const mongod = new MongoMemoryServer({ auth?: boolean, // add "--auth" argument, dont use this directly use top-level "auth" }, binary?: { - version?: string, // by default '7.0.9' + version?: string, // by default '7.0.11' downloadDir?: string, // see the documentation on what is chosen by default https://typegoose.github.io/mongodb-memory-server/docs/api/config-options#download_dir platform?: string, // by default os.platform() arch?: string, // by default os.arch() diff --git a/docs/api/config-options.md b/docs/api/config-options.md index 1c9c2538..d4bbd7a1 100644 --- a/docs/api/config-options.md +++ b/docs/api/config-options.md @@ -93,7 +93,7 @@ Example: `ubuntu-18.04` Option `VERSION` is used to set what mongodb version should be downloaded -Default: `7.0.9` (see [Mongodb Server Versions](../guides/mongodb-server-versions.md) for a complete list and policy) +Default: `7.0.11` (see [Mongodb Server Versions](../guides/mongodb-server-versions.md) for a complete list and policy) This Option does not have a effect when [`ARCHIVE_NAME`](#archive_name) or [`DOWNLOAD_URL`](#download_url) is defined. diff --git a/docs/guides/mongodb-server-versions.md b/docs/guides/mongodb-server-versions.md index 834e33c8..70be330b 100644 --- a/docs/guides/mongodb-server-versions.md +++ b/docs/guides/mongodb-server-versions.md @@ -31,7 +31,7 @@ Starting with MongoDB version 5.0, the default versions for `mongodb-memory-serv | `mongodb-memory-server-core` Version | Default MongoDB Version | | :----------------------------------: | :---------------------: | -| 10.0.x - 10.0.x | 7.0.9 | +| 10.0.x - 10.0.x | 7.0.11 | | 9.2.x - 9.2.x | 6.0.14 | | 9.0.x - 9.1.x | 6.0.9 | | 8.14.x - 8.16.x | 5.0.19 | diff --git a/packages/mongodb-memory-server-core/src/__tests__/testUtils/globalSetup.ts b/packages/mongodb-memory-server-core/src/__tests__/testUtils/globalSetup.ts index 5e450f5f..92455338 100644 --- a/packages/mongodb-memory-server-core/src/__tests__/testUtils/globalSetup.ts +++ b/packages/mongodb-memory-server-core/src/__tests__/testUtils/globalSetup.ts @@ -5,7 +5,7 @@ import { assertion, isNullOrUndefined } from '../../util/utils'; export = async function globalSetup(): Promise { const defaultVersion = resolveConfig(ResolveConfigVariables.VERSION); assertion(!isNullOrUndefined(defaultVersion), new Error('Default version is not defined')); - const versions = [defaultVersion, '4.0.28', '4.2.24', '4.4.28', '5.0.19', '6.0.14', '7.0.9']; + const versions = [defaultVersion, '4.0.28', '4.2.24', '4.4.28', '5.0.19', '6.0.14', '7.0.11']; // Ensure all required versions are downloaded for tests for (const version of versions) { await MongoBinary.getPath({ version }); diff --git a/packages/mongodb-memory-server-core/src/util/resolveConfig.ts b/packages/mongodb-memory-server-core/src/util/resolveConfig.ts index 5d98b56d..5db57d7c 100644 --- a/packages/mongodb-memory-server-core/src/util/resolveConfig.ts +++ b/packages/mongodb-memory-server-core/src/util/resolveConfig.ts @@ -39,7 +39,7 @@ export enum ResolveConfigVariables { /** The Prefix for Environmental values */ export const ENV_CONFIG_PREFIX = 'MONGOMS_'; /** This Value exists here, because "defaultValues" can be changed with "setDefaultValue", but this property is constant */ -export const DEFAULT_VERSION = '7.0.9'; +export const DEFAULT_VERSION = '7.0.11'; /** Default values for some config options that require explicit setting, it is constant so that the default values cannot be interfered with */ export const defaultValues = new Map([ // apply app-default values here