Skip to content

Commit

Permalink
docs(migrate9): add missing changes for 9.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hasezoey committed Aug 15, 2023
1 parent eb7b691 commit 6e9a9cc
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion docs/guides/migration/migrate9.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ title: 'Migrate to version 9.0.0'
Here are the Important changes made for 9.0.0

:::caution Important, Read this first
This Guide is written for migration from version `8.13.0` to `9.0.0`, for versions `>9.0.0 <10.0.0`, please consult the [CHANGELOG](https://github.com/nodkz/mongodb-memory-server/blob/master/CHANGELOG.md)
This Guide is written for migration from version `8.15.0` to `9.0.0`, for versions `>9.0.0 <10.0.0`, please consult the [CHANGELOG](https://github.com/nodkz/mongodb-memory-server/blob/master/CHANGELOG.md)
:::

## Breaking Changes

### Minimal NodeJS version is now `14`

With 9.0.0 the minimal nodejs required is `14.20.1`.

### Mongodb Driver Version upgraded to 5.x

The used MongoDB Driver version is now `5.6.0`.
Expand Down Expand Up @@ -68,6 +72,19 @@ Some error classes have been merged:

Storage Engines `devnull` and `mmapv1` have been removed because they are not supported in newer versions of mongodb anymore, `wiredTiger` should be used instead.

### Linux fallback binary has been removed

Previously there was a code-path for a fallback linux binary, but this has been removed because mongodb has stopped shipping generic linux binaries since versions after 4.0.

If a fallback is still required, try to use the ubuntu binary via [Config Options `DISTRO`](../../api/config-options.md#distro).

### Ubuntu fallback year has been updated

The ubuntu fallback year has been updated to `22`, instead of the previous `14`, because newer versions of mongodb dont ship for any EOL ubuntu version anymore.

This fallback is only used if the ubuntu year could not be parsed from the os-file.
This can also be overwritten with [Config Option `DISTRO`](../../api/config-options.md#distro).

## Non-Breaking changes / Additions

### Compiler target is now `es2019`
Expand All @@ -79,8 +96,16 @@ This should be a non-breaking change

Crypto functions like for the md5 check and uuidv4 generation have been moved to use the `node:crypto` support, resulting in dropping 2 dependencies.

Dropped dependencies are `md5-file` and `uuid`.

## Binary childprocess is now also `.unref()`

The Mongodb Binary childprocess is now also `.unref()`, like the killer process has been for some time.

This *should* help with non-closed instances not exiting the nodejs process.

## The port testing has been replaced

Previously MMS used `get-port`, but it caused some big memory-leakage across big projects, so it has been replaced with one that uses less maps.

It also has been replaced because newer versions were ESM only, but we couldnt switch to ESM yet (and using ESM in CommonJS is not a great experience)

0 comments on commit 6e9a9cc

Please sign in to comment.