Skip to content

Commit

Permalink
feat: update default-binary 5.0.18
Browse files Browse the repository at this point in the history
from 5.0.13
  • Loading branch information
hasezoey committed Jun 9, 2023
1 parent 2856cfd commit ba37680
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
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 `5.0.13` for your OS will be downloaded. By setting [Environment variables](https://nodkz.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 `5.0.18` for your OS will be downloaded. By setting [Environment variables](https://nodkz.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({
args?: string[], // by default no additional arguments, any additional command line arguments for `mongod` `mongod` (ex. ['--notablescan'])
},
binary: {
version?: string, // by default '5.0.13'
version?: string, // by default '5.0.18'
downloadDir?: string, // by default node_modules/.cache/mongodb-memory-server/mongodb-binaries
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
Expand Up @@ -57,7 +57,7 @@ Valid Options are `x64`, `arm64`, ~~`ia32`~~([will be removed in 9.0](../guides/

Option `VERSION` is used to set what mongodb version should be downloaded

Default: `5.0.13`
Default: `5.0.18`

This Option does not have a effect when [`ARCHIVE_NAME`](#archive_name) or [`DOWNLOAD_URL`](#download_url) is defined.

Expand Down
3 changes: 2 additions & 1 deletion docs/guides/mongodb-server-versions.md
Expand Up @@ -31,7 +31,8 @@ Starting with MongoDB version 5.0, the default versions for `mongodb-memory-serv

| `mongodb-memory-server-core` Version | Default MongoDB Version |
| :----------------------------------: | :---------------------: |
| 8.11.x - 8.11.x | 5.0.13 |
| 8.13.x - 8.13.x | 5.0.18 |
| 8.11.x - 8.12.x | 5.0.13 |
| 8.6.x - 8.10.x | 5.0.8 |
| 8.0.x - 8.5.x | 5.0.3 |
| 7.5.x - 7.5.x | 4.0.27 |
Expand Down
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.18', '4.4.13', '5.0.13', '6.0.0'];
const versions = [defaultVersion, '4.0.28', '4.2.18', '4.4.13', '5.0.18', '6.0.0'];
// Ensure all required versions are downloaded for tests
for (const version of versions) {
await MongoBinary.getPath({ version });
Expand Down
Expand Up @@ -242,7 +242,7 @@ describe('MongodbInstance', () => {
const gotPort = await getPort({ port: 27445 });
const mongod = await MongodbInstance.create({
instance: { port: gotPort, dbPath: tmpDir },
binary: { version: '5.0.13' },
binary: { version: '5.0.18' },
});
expect(mongod.mongodProcess!.pid).toBeGreaterThan(0);
await mongod.stop();
Expand Down
Expand Up @@ -30,7 +30,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 = '5.0.13';
export const DEFAULT_VERSION = '5.0.18';
/** 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 ba37680

Please sign in to comment.