Skip to content

Commit

Permalink
feat: update default-binary 5.0.13
Browse files Browse the repository at this point in the history
from 5.0.8

fixes #727
  • Loading branch information
hasezoey committed Jan 6, 2023
1 parent d52cb3e commit 5375af3
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 19 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 `5.0.8` 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.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:

```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.8'
version?: string, // by default '5.0.13'
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
Original file line number Diff line number Diff line change
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.8`
Default: `5.0.13`

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

Expand Down
27 changes: 14 additions & 13 deletions docs/guides/mongodb-server-versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,24 @@ Starting with MongoDB version 5.0, the default versions for `mongodb-memory-serv

| `mongodb-memory-server-core` Version | Default MongoDB Version |
| :----------------------------------: | :---------------------: |
| 8.6.x - 8.6.x | 5.0.8 |
| 8.0.x - 8.5.x | 5.0.3 |
| 7.5.x - 7.5.x | 4.0.27 |
| 7.0.x - 7.4.x | 4.0.25 |
| 6.4.x - 6.9.x | 4.0.14 |
| 6.0.x - 6.4.x | 4.0.3 |
| 8.11.x - 8.11.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 |
| 7.0.x - 7.4.x | 4.0.25 |
| 6.4.x - 6.9.x | 4.0.14 |
| 6.0.x - 6.4.x | 4.0.3 |

## `mongodb-memory-server-global-*` Version Table

This Section will show all `mongodb-memory-server-global-*` packages that ever existed for this Project, what Version they provide in the latest version and what Branch they will be updated from.

If the branch is named like `old/`, then it means that this package will not be updated for new major MMS versions anymore. (Example if the package is in `old/6.x`, then it will not get any updates to MMS 7.0 or higher)

| Package Name | Provided MongoDB Version | Current Branch |
| :---------------------------------: | :----------------------: | :------------: |
| `mongodb-memory-server-global-4.4` | 4.4.13 | `master` |
| `mongodb-memory-server-global-4.2` | 4.2.18 | `master` |
| `mongodb-memory-server-global-4.0` | 4.0.28 | `master` |
| `mongodb-memory-server-global-3.6` | 3.6.23 | `old/7.x` |
| `mongodb-memory-server-global-3.4` | 3.4.20 | `old/6.x` |
| Package Name | Provided MongoDB Version | Current Branch |
| :--------------------------------: | :----------------------: | :------------: |
| `mongodb-memory-server-global-4.4` | 4.4.13 | `master` |
| `mongodb-memory-server-global-4.2` | 4.2.18 | `master` |
| `mongodb-memory-server-global-4.0` | 4.0.28 | `master` |
| `mongodb-memory-server-global-3.6` | 3.6.23 | `old/7.x` |
| `mongodb-memory-server-global-3.4` | 3.4.20 | `old/6.x` |
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.18', '4.4.13', '5.0.8', '6.0.0'];
const versions = [defaultVersion, '4.0.28', '4.2.18', '4.4.13', '5.0.13', '6.0.0'];
// 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 @@ -250,7 +250,7 @@ describe('MongodbInstance', () => {
const gotPort = await getPort({ port: 27445 });
const mongod = await MongodbInstance.create({
instance: { port: gotPort, dbPath: tmpDir.name },
binary: { version: '5.0.8' },
binary: { version: '5.0.13' },
});
expect(mongod.mongodProcess!.pid).toBeGreaterThan(0);
await mongod.stop();
Expand Down
Original file line number Diff line number Diff line change
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.8';
export const DEFAULT_VERSION = '5.0.13';
/** 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 5375af3

Please sign in to comment.