Skip to content

Commit

Permalink
feat: update default-binary to 6.0.14
Browse files Browse the repository at this point in the history
from 6.0.9
  • Loading branch information
hasezoey committed Apr 19, 2024
1 parent c50c165 commit 47f2bb3
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 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 `6.0.9` 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 `6.0.14` 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({
auth?: boolean, // add "--auth" argument, dont use this directly use top-level "auth"
},
binary?: {
version?: string, // by default '6.0.9'
version?: string, // by default '6.0.14'
downloadDir?: string, // see the documentation on what is chosen by default https://nodkz.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
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 |
| :----------------------------------: | :---------------------: |
| 9.0.x - 9.0.x | 6.0.9 |
| 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 |
| 8.13.x - 8.13.x | 5.0.18 |
| 8.11.x - 8.12.x | 5.0.13 |
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.23', '4.4.22', '5.0.19', '6.0.9', '7.0.0'];
const versions = [defaultVersion, '4.0.28', '4.2.23', '4.4.22', '5.0.19', '6.0.14', '7.0.0'];
// Ensure all required versions are downloaded for tests
for (const version of versions) {
await MongoBinary.getPath({ version });
Expand Down
Expand Up @@ -253,7 +253,7 @@ describe('MongodbInstance', () => {
const gotPort = await getFreePort(27445);
const mongod = await MongodbInstance.create({
instance: { port: gotPort, dbPath: tmpDir },
binary: { version: '6.0.9' },
binary: { version: '6.0.14' },
});
expect(mongod.mongodProcess!.pid).toBeGreaterThan(0);
await mongod.stop();
Expand Down
Expand Up @@ -34,7 +34,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 = '6.0.9';
export const DEFAULT_VERSION = '6.0.14';
/** 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 47f2bb3

Please sign in to comment.