Skip to content

Commit

Permalink
feat(resolveConfig): update default binary version to 7.x
Browse files Browse the repository at this point in the history
BREAKING CHANGE:
Default binary version is now "7.0.11"
  • Loading branch information
hasezoey committed Jul 18, 2024
1 parent 39b1c2b commit 9d569ac
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion docs/api/config-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/mongodb-server-versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { assertion, isNullOrUndefined } from '../../util/utils';
export = async function globalSetup(): Promise<void> {
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 });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<ResolveConfigVariables, string>([
// apply app-default values here
Expand Down

0 comments on commit 9d569ac

Please sign in to comment.