Skip to content

Commit 33ec23a

Browse files
committed
Merge branch 'master' into beta
2 parents 63b9a97 + 1798801 commit 33ec23a

File tree

22 files changed

+171
-29
lines changed

22 files changed

+171
-29
lines changed

.releaserc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,13 @@ module.exports = {
8686
pkgRoot: './packages/mongodb-memory-server-global-3.6',
8787
},
8888
],
89+
[
90+
'@semantic-release/npm',
91+
{
92+
npmPublish: true,
93+
pkgRoot: './packages/mongodb-memory-server-global-4.0',
94+
},
95+
],
8996
[
9097
'@semantic-release/npm',
9198
{

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,26 @@
9999
* **tslib:** upgrade to version 2.3.1 ([1a36352](https://github.com/nodkz/mongodb-memory-server/commit/1a36352fcaaa6c45796cb1d1c2a0e4b509acbfdd))
100100
* **typescript:** upgrade to version 4.4.3 ([84e407b](https://github.com/nodkz/mongodb-memory-server/commit/84e407b6b14ae986ab9d4ac6a1d5caa3f694861b))
101101

102+
### [7.5.1](https://github.com/nodkz/mongodb-memory-server/compare/v7.5.0...v7.5.1) (2021-10-19)
103+
104+
105+
### Fixes
106+
107+
* **MongoInstance:** try to fix some CodeQL redos ([9fc3a33](https://github.com/nodkz/mongodb-memory-server/commit/9fc3a338326f9e0d3e511aff5794236ba133ac5d))
108+
109+
## [7.5.0](https://github.com/nodkz/mongodb-memory-server/compare/v7.4.6...v7.5.0) (2021-10-19)
110+
111+
112+
### Features
113+
114+
* upgrade default mongodb binary version to 4.0.27 ([c82e56c](https://github.com/nodkz/mongodb-memory-server/commit/c82e56ce452f6859477f46c321cc6b44ac9e91ba))
115+
* upgrade mongodb patch version for "-global-*" packages ([01a6ded](https://github.com/nodkz/mongodb-memory-server/commit/01a6deda21ffe8c52e5b7ebbab532ab7ef88583e))
116+
117+
118+
### Style
119+
120+
* fix tsdoc "[@return](https://github.com/return)" -> "[@returns](https://github.com/returns)" ([ffbc0ca](https://github.com/nodkz/mongodb-memory-server/commit/ffbc0caa9bf67ff669a9369ba030ecae92f2f7dc))
121+
102122
### [7.4.6](https://github.com/nodkz/mongodb-memory-server/compare/v7.4.5...v7.4.6) (2021-10-19)
103123

104124

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ And one of those (on Linux):
8383

8484
### Configuring which mongod binary to use
8585

86-
The default behavior is that version `4.0.25` 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:
86+
The default behavior is that version `4.0.27` 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:
8787

8888
```sh
8989
export MONGOMS_DOWNLOAD_URL=https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1804-4.2.8.tgz
@@ -125,7 +125,7 @@ const mongod = new MongoMemoryServer({
125125
args?: string[], // by default no additional arguments, any additional command line arguments for `mongod` `mongod` (ex. ['--notablescan'])
126126
},
127127
binary: {
128-
version?: string, // by default '4.0.25'
128+
version?: string, // by default '4.0.27'
129129
downloadDir?: string, // by default node_modules/.cache/mongodb-memory-server/mongodb-binaries
130130
platform?: string, // by default os.platform()
131131
arch?: string, // by default os.arch()

docs/guides/mongodb-server-versions.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,32 @@ There are some exceptions:
2121

2222
The versions with a brocken default binary may get deprecated (when possible).
2323

24+
For Packages that are named with a version (like `mongodb-memory-server-global-4.2`), the patch version (`0.0.X`) of a binary may be changed with minor (`0.X.0`) releases.
25+
2426
:::note
2527
Starting with MongoDB version 5.0, the default versions for `mongodb-memory-server-core` will only be major `X.0` versions (no `X.X` versions), see [MongoDB Versioning](https://docs.mongodb.com/manual/reference/versioning/#std-label-release-version-numbers).
2628
:::
2729

28-
## Version Table
30+
## `mongodb-memory-server-core` Version Table
2931

3032
| `mongodb-memory-server-core` Version | Default MongoDB Version |
3133
| :----------------------------------: | :---------------------: |
3234
| 8.0.x - 8.0.x | 5.0.3 |
35+
| 7.5.x - 7.5.x | 4.0.27 |
3336
| 7.0.x - 7.4.x | 4.0.25 |
3437
| 6.4.x - 6.9.x | 4.0.14 |
3538
| 6.0.x - 6.4.x | 4.0.3 |
39+
40+
## `mongodb-memory-server-global-*` Version Table
41+
42+
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.
43+
44+
If the branch is named like `old/`, then it means that this package will not be updated for new major versions anymore. (Example if the package is in `old/6.x`, then it will not get any updates to 7.0 or higher)
45+
46+
| Package Name | Provided MongoDB Version | Current Branch |
47+
| :---------------------------------: | :----------------------: | :------------: |
48+
| `mongodb-memory-server-global-4.4` | 4.4.10 | `master` |
49+
| `mongodb-memory-server-global-4.2` | 4.2.17 | `master` |
50+
| `mongodb-memory-server-global-4.0` | 4.0.27 | `master` |
51+
| `mongodb-memory-server-global-3.6` | 3.6.23 | `master` |
52+
| `mongodb-memory-server-global-3.4` | 3.4.20 | `old/6.x` |

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ export class MongoMemoryReplSet extends EventEmitter implements ManagerAdvanced
303303
* @param otherDb add an database into the uri (in mongodb its the auth database, in mongoose its the default database for models)
304304
* @throws if state is not "running"
305305
* @throws if an server doesnt have "instanceInfo.port" defined
306-
* @return an valid mongo URI, by the definition of https://docs.mongodb.com/manual/reference/connection-string/
306+
* @returns an valid mongo URI, by the definition of https://docs.mongodb.com/manual/reference/connection-string/
307307
*/
308308
getUri(otherDb?: string): string {
309309
log('getUri:', this.state);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ export class MongoMemoryServer extends EventEmitter implements ManagerAdvanced {
648648
/**
649649
* Generate the Connection string used by mongodb
650650
* @param otherDb add an database into the uri (in mongodb its the auth database, in mongoose its the default database for models)
651-
* @return an valid mongo URI, by the definition of https://docs.mongodb.com/manual/reference/connection-string/
651+
* @returns an valid mongo URI, by the definition of https://docs.mongodb.com/manual/reference/connection-string/
652652
*/
653653
getUri(otherDb?: string): string {
654654
this.debug('getUri:', this.state);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { assertion, isNullOrUndefined } from '../../util/utils';
55
export = async function globalSetup(): Promise<void> {
66
const defaultVersion = resolveConfig(ResolveConfigVariables.VERSION);
77
assertion(!isNullOrUndefined(defaultVersion), new Error('Default version is not defined'));
8-
const versions = [defaultVersion, '4.0.25', '4.2.14', '4.4.6'];
8+
const versions = [defaultVersion, '4.0.27', '4.2.17', '4.4.10', '5.0.3'];
99
// Ensure all required versions are downloaded for tests
1010
for (const version of versions) {
1111
await MongoBinary.getPath({ version });

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ export class DryMongoBinary {
206206

207207
/**
208208
* Get the full path with filename
209-
* @return Absoulte Path with FileName
209+
* @returns Absoulte Path with FileName
210210
*/
211211
static getBinaryName(opts: DryMongoBinaryNameOptions): string {
212212
log('getBinaryName');
@@ -228,7 +228,7 @@ export class DryMongoBinary {
228228
/**
229229
* Probe if the provided "systemBinary" is an existing path
230230
* @param systemBinary The Path to probe for an System-Binary
231-
* @return System Binary path or undefined
231+
* @returns System Binary path or undefined
232232
*/
233233
static async getSystemPath(systemBinary: string): Promise<string | undefined> {
234234
// REFACTOR: change this function to always return "string"
@@ -254,7 +254,7 @@ export class DryMongoBinary {
254254
* Generate an "MongoBinaryPaths" object
255255
*
256256
* This Function should not hit the FileSystem
257-
* @return an finished "MongoBinaryPaths" object
257+
* @returns an finished "MongoBinaryPaths" object
258258
*/
259259
static async generatePaths(
260260
opts: DryMongoBinaryOptions & DryMongoBinaryNameOptions
@@ -310,7 +310,7 @@ export class DryMongoBinary {
310310

311311
/**
312312
* Generate the Path where an Binary will be located
313-
* @return "boolean" indicating if the binary exists at the provided path, and "string" the path to use for the binary
313+
* @returns "boolean" indicating if the binary exists at the provided path, and "string" the path to use for the binary
314314
*/
315315
static async generateDownloadPath(
316316
opts: DryMongoBinaryOptions & DryMongoBinaryNameOptions

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class MongoBinary {
6969
* Probe all supported paths for an binary and return the binary path
7070
* @param opts Options configuring which binary to search for
7171
* @throws {Error} if no valid BinaryPath has been found
72-
* @return The first found BinaryPath
72+
* @returns The first found BinaryPath
7373
*/
7474
static async getPath(opts: MongoBinaryOpts = {}): Promise<string> {
7575
log('getPath');

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export class MongoBinaryDownload {
110110

111111
/**
112112
* Get the full path with filename
113-
* @return Absoulte Path with FileName
113+
* @returns Absoulte Path with FileName
114114
*/
115115
protected async getPath(): Promise<string> {
116116
const opts = await DryMongoBinary.generateOptions(this.binaryOpts);
@@ -212,7 +212,7 @@ export class MongoBinaryDownload {
212212
/**
213213
* Download file from downloadUrl
214214
* @param downloadUrl URL to download a File
215-
* @return The Path to the downloaded archive file
215+
* @returns The Path to the downloaded archive file
216216
*/
217217
async download(downloadUrl: string): Promise<string> {
218218
log('download');

0 commit comments

Comments
 (0)