Skip to content

Commit

Permalink
fix(typegoose): update minimal node version check to match engines
Browse files Browse the repository at this point in the history
seemingly forgot to do it in 12.0.0

re 8dd8467
  • Loading branch information
hasezoey committed Apr 2, 2024
1 parent f197dbe commit a07c9ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions docs/guides/error-warning-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ Typegoose requires at least the mentioned mongoose version because that version

### NodeJS Version [E002]

Error: `You are using a NodeJS Version below 14.17.0, Please Upgrade! [E002]`
Error: `You are using a NodeJS Version below 16.20.1, Please Upgrade! [E002]`

Error Class: `Error`

Details:
Typegoose requires at least NodeJS Version 14.17, because:
Typegoose requires at least NodeJS Version 16.20.1, because:

- it is the mongoose minimal nodejs version
- it is the lowest LTS version, which many (dev) dependencies already require

### Function only supports to be called "${supported}" times [E003]
Expand Down
4 changes: 2 additions & 2 deletions src/typegoose.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ if (typeof process !== 'undefined' && !isNullOrUndefined(process?.version) && !i
}

/* istanbul ignore next */
if (semver.lt(process.version.slice(1), '14.17.0')) {
throw new Error('You are using a NodeJS Version below 14.17.0, Please Upgrade! [E002]');
if (semver.lt(process.version.slice(1), '16.20.1')) {
throw new Error('You are using a NodeJS Version below 16.20.1, Please Upgrade! [E002]');
}
}

Expand Down

0 comments on commit a07c9ee

Please sign in to comment.