feat: set lowest supported nodejs version to 20.19.0

BREAKING CHANGE:
Lowest supported NodeJS version is now 20.19.0
This commit is contained in:
hasezoey
2025-12-03 13:49:25 +01:00
parent 866770ed0b
commit de4f1b0016
12 changed files with 50 additions and 12 deletions
+2 -2
View File
@@ -26,7 +26,7 @@ jobs:
matrix:
# this is a hack as there is currently no (public) way to access "runs-on" with version
distro: [ubuntu-24.04]
node-version: [16.x, 18.x, 20.x, 22.x, 24.x]
node-version: [20.x, 22.x, 24.x]
steps:
# Install libssl1.1 for libcrypto.so.1.1, which is required for binaries before 22.04 is available (4.0, 4.2, 4.4, 5.0)
# currently 5.0 is still in LTS
@@ -77,7 +77,7 @@ jobs:
env:
CI: true
- name: Send codecov.io stats
if: matrix.node-version == '16.x'
if: matrix.node-version == '24.x'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
+1 -1
View File
@@ -68,7 +68,7 @@ Choose any package, because they are the same. They differ only in the default c
### Requirements
- NodeJS: 16.20.1+
- NodeJS: 20.19.0+
- Typescript: 5.3+ (if used)
And one of those (on Linux):
+37
View File
@@ -0,0 +1,37 @@
---
id: migrate11
title: 'Migrate to version 11.0.0'
---
Here are the Important changes made for 11.0.0
:::warning Important, Read this first
This Guide is written for migration from version `10.4.0` to `11.0.0`, for versions `>11.0.0 <12.0.0`, please consult the [CHANGELOG](https://github.com/typegoose/mongodb-memory-server/blob/master/CHANGELOG.md)
:::
## Breaking Changes
### Minimal NodeJS version is now `20`
With 10.0.0 the minimal nodejs required is `20.19.0`.
<!-- ### Mongodb Driver Version upgraded to 6.x
The used MongoDB Driver version is now `6.7.0`.
### Default binary version is now 7.x
The default binary version has been upgraded from `6.0.x` to `7.0.x`. For more specifics see [mongodb-server-versions](../mongodb-server-versions.md).
:::note
In mongodb `7.0.0` storage engine `ephemeralForTest` has been removed, mongodb-memory-server will automatically translate any occurrence to `wiredTiger` with a warning.
It is recommended to run the tests against a tmpfs or equivalent (default `/tmp` on linux / macos).
:::
## Non-Breaking changes / Additions
### Compiler target is now `es2021`
The tsconfig `target` option has been updated to `es2021`, which will result in less polyfills.
This should be a non-breaking change. -->
+1 -1
View File
@@ -19,7 +19,7 @@ If Top-Level async-await is not available for your case, the code can in most ca
## Requirements
- NodeJS: 16.20.1+
- NodeJS: 20.19.0+
- Typescript: 5.3+ (if used)
When on Linux, one of the following are required:
@@ -11,7 +11,7 @@
"directory": "packages/mongodb-memory-server-core"
},
"engines": {
"node": ">=16.20.1"
"node": ">=20.19.0"
},
"files": [
"lib",
@@ -24,8 +24,8 @@ import {
// ignore the nodejs warning for coverage
/* istanbul ignore next */
if (lt(process.version, '16.20.1')) {
console.warn('Using NodeJS below 16.20.1');
if (lt(process.version, '20.19.0')) {
console.warn('Using NodeJS below 20.19.0');
}
const log = debug('MongoMS:MongoInstance');
+1 -1
View File
@@ -12,7 +12,7 @@
"directory": "packages/mongodb-memory-server-global-4.4"
},
"engines": {
"node": ">=16.20.1"
"node": ">=20.19.0"
},
"homepage": "https://github.com/typegoose/mongodb-memory-server",
"keywords": [
+1 -1
View File
@@ -12,7 +12,7 @@
"directory": "packages/mongodb-memory-server-global-4.2"
},
"engines": {
"node": ">=16.20.1"
"node": ">=20.19.0"
},
"homepage": "https://github.com/typegoose/mongodb-memory-server",
"keywords": [
+1 -1
View File
@@ -12,7 +12,7 @@
"directory": "packages/mongodb-memory-server-global-4.4"
},
"engines": {
"node": ">=16.20.1"
"node": ">=20.19.0"
},
"homepage": "https://github.com/typegoose/mongodb-memory-server",
"keywords": [
@@ -11,7 +11,7 @@
"directory": "packages/mongodb-memory-server-global"
},
"engines": {
"node": ">=16.20.1"
"node": ">=20.19.0"
},
"homepage": "https://github.com/typegoose/mongodb-memory-server",
"keywords": [
+1 -1
View File
@@ -11,7 +11,7 @@
"directory": "packages/mongodb-memory-server"
},
"engines": {
"node": ">=16.20.1"
"node": ">=20.19.0"
},
"homepage": "https://github.com/typegoose/mongodb-memory-server",
"keywords": [
+1
View File
@@ -42,6 +42,7 @@ module.exports = {
'guides/common-issues',
],
Migration: [
'guides/migration/migrate11',
'guides/migration/migrate10',
'guides/migration/migrate9',
'guides/migration/migrate8',