Skip to content

Commit 946e78e

Browse files
committed
feat(resolveConfig): update default binary version to 7.0.14
from 7.0.11
1 parent 279497c commit 946e78e

File tree

9 files changed

+29
-28
lines changed

9 files changed

+29
-28
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ On Linux, you will also need `libcurl4` (or `libcurl3` on some older distro vers
8686

8787
### Configuring which mongod binary to use
8888

89-
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:
89+
The default behavior is that version `7.0.14` 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:
9090

9191
```sh
9292
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({
128128
auth?: boolean, // add "--auth" argument, dont use this directly use top-level "auth"
129129
},
130130
binary?: {
131-
version?: string, // by default '7.0.11'
131+
version?: string, // by default '7.0.14'
132132
downloadDir?: string, // see the documentation on what is chosen by default https://typegoose.github.io/mongodb-memory-server/docs/api/config-options#download_dir
133133
platform?: string, // by default os.platform()
134134
arch?: string, // by default os.arch()

docs/api/config-options.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Example: `ubuntu-18.04`
9393

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

96-
Default: `7.0.11` (see [Mongodb Server Versions](../guides/mongodb-server-versions.md) for a complete list and policy)
96+
Default: `7.0.14` (see [Mongodb Server Versions](../guides/mongodb-server-versions.md) for a complete list and policy)
9797

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

docs/guides/mongodb-server-versions.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ Starting with MongoDB version 5.0, the default versions for `mongodb-memory-serv
3131

3232
| `mongodb-memory-server-core` Version | Default MongoDB Version |
3333
| :----------------------------------: | :---------------------: |
34-
| 10.0.x - 10.0.x | 7.0.11 |
34+
| 10.1.x - 10.1.x | 7.0.14 |
35+
| 10.0.x - 10.0.x | 7.0.11 |
3536
| 9.2.x - 9.2.x | 6.0.14 |
3637
| 9.0.x - 9.1.x | 6.0.9 |
3738
| 8.14.x - 8.16.x | 5.0.19 |

packages/mongodb-memory-server-core/src/__tests__/MongoMemoryReplSet.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ describe('MongoMemoryReplSet', () => {
724724
describe('server version specific', () => {
725725
// should use default options that are supported for 7.0 (like not using "ephemeralForTest" by default)
726726
it('should allow mongodb by default 7.0', async () => {
727-
const server = await MongoMemoryReplSet.create({ binary: { version: '7.0.11' } });
727+
const server = await MongoMemoryReplSet.create({ binary: { version: '7.0.14' } });
728728

729729
await server.stop();
730730
});
@@ -746,7 +746,7 @@ describe('MongoMemoryReplSet', () => {
746746
it('should not warn if no explicit storage engine is set in 7.0', async () => {
747747
jest.spyOn(console, 'warn');
748748
const server = await MongoMemoryReplSet.create({
749-
binary: { version: '7.0.11' },
749+
binary: { version: '7.0.14' },
750750
// replSet: { storageEngine: 'ephemeralForTest' },
751751
});
752752

@@ -760,7 +760,7 @@ describe('MongoMemoryReplSet', () => {
760760
it('should warn if "ephemeralForTest" is used explicitly in mongodb 7.0', async () => {
761761
const spy = jest.spyOn(console, 'warn').mockImplementationOnce(() => {});
762762
const server = await MongoMemoryReplSet.create({
763-
binary: { version: '7.0.11' },
763+
binary: { version: '7.0.14' },
764764
replSet: { storageEngine: 'ephemeralForTest' },
765765
});
766766

packages/mongodb-memory-server-core/src/__tests__/MongoMemoryServer.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,7 @@ describe('MongoMemoryServer', () => {
12441244
describe('server version specific', () => {
12451245
// should use default options that are supported for 7.0 (like not using "ephemeralForTest" by default)
12461246
it('should allow mongodb by default 7.0', async () => {
1247-
const server = await MongoMemoryServer.create({ binary: { version: '7.0.11' } });
1247+
const server = await MongoMemoryServer.create({ binary: { version: '7.0.14' } });
12481248

12491249
await server.stop();
12501250
});
@@ -1266,7 +1266,7 @@ describe('MongoMemoryServer', () => {
12661266
it('should not warn if no explicit storage engine is set in 7.0', async () => {
12671267
jest.spyOn(console, 'warn');
12681268
const server = await MongoMemoryServer.create({
1269-
binary: { version: '7.0.11' },
1269+
binary: { version: '7.0.14' },
12701270
// instance: { storageEngine: 'ephemeralForTest' },
12711271
});
12721272

@@ -1280,7 +1280,7 @@ describe('MongoMemoryServer', () => {
12801280
it('should warn if "ephemeralForTest" is used explicitly in mongodb 7.0', async () => {
12811281
const spy = jest.spyOn(console, 'warn').mockImplementationOnce(() => {});
12821282
const server = await MongoMemoryServer.create({
1283-
binary: { version: '7.0.11' },
1283+
binary: { version: '7.0.14' },
12841284
instance: { storageEngine: 'ephemeralForTest' },
12851285
});
12861286

packages/mongodb-memory-server-core/src/__tests__/testUtils/globalSetup.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export = async function globalSetup(): Promise<void> {
1212
'4.4.28',
1313
'5.0.19',
1414
'6.0.14',
15-
'7.0.11',
15+
'7.0.14',
1616
'8.0.1',
1717
];
1818
// Ensure all required versions are downloaded for tests

packages/mongodb-memory-server-core/src/util/__tests__/MongoBinaryDownloadUrl.test.ts

+15-15
Original file line numberDiff line numberDiff line change
@@ -124,23 +124,23 @@ describe('MongoBinaryDownloadUrl', () => {
124124
const du = new MongoBinaryDownloadUrl({
125125
platform: 'darwin',
126126
arch: 'x64',
127-
version: '7.0.11',
127+
version: '7.0.14',
128128
});
129129

130130
expect(await du.getDownloadUrl()).toBe(
131-
'https://fastdl.mongodb.org/osx/mongodb-macos-x86_64-7.0.11.tgz'
131+
'https://fastdl.mongodb.org/osx/mongodb-macos-x86_64-7.0.14.tgz'
132132
);
133133
});
134134

135135
it('should work with mongodb 7.0 (arm64)', async () => {
136136
const du = new MongoBinaryDownloadUrl({
137137
platform: 'darwin',
138138
arch: 'arm64',
139-
version: '7.0.11',
139+
version: '7.0.14',
140140
});
141141

142142
expect(await du.getDownloadUrl()).toBe(
143-
'https://fastdl.mongodb.org/osx/mongodb-macos-arm64-7.0.11.tgz'
143+
'https://fastdl.mongodb.org/osx/mongodb-macos-arm64-7.0.14.tgz'
144144
);
145145
});
146146

@@ -333,35 +333,35 @@ describe('MongoBinaryDownloadUrl', () => {
333333
);
334334
});
335335

336-
it('for ubuntu 22.04 for 7.0.11', async () => {
336+
it('for ubuntu 22.04 for 7.0.14', async () => {
337337
const du = new MongoBinaryDownloadUrl({
338338
platform: 'linux',
339339
arch: 'x64',
340-
version: '7.0.11',
340+
version: '7.0.14',
341341
os: {
342342
os: 'linux',
343343
dist: 'ubuntu',
344344
release: '22.04',
345345
},
346346
});
347347
expect(await du.getDownloadUrl()).toBe(
348-
'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-7.0.11.tgz'
348+
'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-7.0.14.tgz'
349349
);
350350
});
351351

352-
it('for ubuntu 24.04 for 7.0.11', async () => {
352+
it('for ubuntu 24.04 for 7.0.14', async () => {
353353
const du = new MongoBinaryDownloadUrl({
354354
platform: 'linux',
355355
arch: 'x64',
356-
version: '7.0.11',
356+
version: '7.0.14',
357357
os: {
358358
os: 'linux',
359359
dist: 'ubuntu',
360360
release: '24.04',
361361
},
362362
});
363363
expect(await du.getDownloadUrl()).toBe(
364-
'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-7.0.11.tgz'
364+
'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-7.0.14.tgz'
365365
);
366366
});
367367

@@ -1162,10 +1162,10 @@ describe('MongoBinaryDownloadUrl', () => {
11621162

11631163
it('should return a archive name for Linux Mint 21', async () => {
11641164
(downloadUrl.os as LinuxOS).release = '22';
1165-
downloadUrl.version = '7.0.11';
1165+
downloadUrl.version = '7.0.14';
11661166
// NOTE: there are currently no binaries for ubuntu 24.04, but 22.04 still work
11671167
expect(await downloadUrl.getDownloadUrl()).toBe(
1168-
'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-7.0.11.tgz'
1168+
'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-7.0.14.tgz'
11691169
);
11701170
});
11711171
});
@@ -1759,14 +1759,14 @@ describe('MongoBinaryDownloadUrl', () => {
17591759
);
17601760
});
17611761

1762-
it('7.0.11 (windows)', async () => {
1762+
it('7.0.14 (windows)', async () => {
17631763
const du = new MongoBinaryDownloadUrl({
17641764
platform: 'win32',
17651765
arch: 'x64',
1766-
version: '7.0.11',
1766+
version: '7.0.14',
17671767
});
17681768
expect(await du.getDownloadUrl()).toBe(
1769-
'https://fastdl.mongodb.org/windows/mongodb-windows-x86_64-7.0.11.zip'
1769+
'https://fastdl.mongodb.org/windows/mongodb-windows-x86_64-7.0.14.zip'
17701770
);
17711771
});
17721772

packages/mongodb-memory-server-core/src/util/__tests__/MongoInstance.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ describe('MongodbInstance', () => {
264264
const mongod = await MongodbInstance.create({
265265
// this works without problems, because no explicit storage-engine is given, so mongodb automatically chooses wiredTiger
266266
instance: { port: gotPort, dbPath: tmpDir },
267-
binary: { version: '7.0.11' },
267+
binary: { version: '7.0.14' },
268268
});
269269
expect(mongod.mongodProcess!.pid).toBeGreaterThan(0);
270270
await mongod.stop();

packages/mongodb-memory-server-core/src/util/resolveConfig.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export enum ResolveConfigVariables {
3939
/** The Prefix for Environmental values */
4040
export const ENV_CONFIG_PREFIX = 'MONGOMS_';
4141
/** This Value exists here, because "defaultValues" can be changed with "setDefaultValue", but this property is constant */
42-
export const DEFAULT_VERSION = '7.0.11';
42+
export const DEFAULT_VERSION = '7.0.14';
4343
/** Default values for some config options that require explicit setting, it is constant so that the default values cannot be interfered with */
4444
export const defaultValues = new Map<ResolveConfigVariables, string>([
4545
// apply app-default values here

0 commit comments

Comments
 (0)