Skip to content

Commit

Permalink
deps(mongoose): upgrade to 8.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hasezoey committed Nov 16, 2023
1 parent 433488b commit 6223bf8
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/guides/error-warning-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: 'Error & Warning Details'

### Mongoose Version [E001]

Error: `Please use mongoose 8.0.0 or higher (Current mongoose: x.x.x) [E001]`
Error: `Please use mongoose 8.0.1 or higher (Current mongoose: x.x.x) [E001]`

Error Class: `Error`

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/migration/migrate-12.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This Guide is written for migration from version `11.7.0` to `12.0.0`, for versi

## Requirements changed

- Mongoose `8.0.0` or higher is now required
- Mongoose `8.0.1` or higher is now required
- Typescript `5.2` or higher is now required to be used
- NodeJS 16 is now the lowest supported nodejs version

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/mongoose-compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ If no upper mongoose version is defined and a newer typegoose version exists wit

| Typegoose Version | Mongoose Version |
| ----------------- | ---------------- |
| 12.0.x | ~8.0.0 |
| 12.0.x | ~8.0.1 |
| 11.7.x | ~7.6.3 |
| 11.6.x | ~7.6.1 |
| 11.5.x | ~7.5.0 |
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/quick-start-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Like `public: string[]` is in reflection only `Array`.

- TypeScript version `^5.2` (since 10.0) is recommended, though older ones may also work
- NodeJS `>=16.20.1` (and `@types/node@16`)
- Mongoose `~8.0.0`
- Mongoose `~8.0.1`
- A IDE that supports TypeScript linting is recommended to be used (VSCode is recommended)
- This Guide expects you to know how Mongoose (or at least its models) works
- `experimentalDecorators` and `emitDecoratorMetadata` must be enabled in `tsconfig.json`
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
],
"license": "MIT",
"peerDependencies": {
"mongoose": "~8.0.0"
"mongoose": "~8.0.1"
},
"devDependencies": {
"@commitlint/cli": "^17.7.2",
Expand Down Expand Up @@ -66,7 +66,7 @@
"jest-runner-tsd": "^5.0.0",
"lint-staged": "^14.0.1",
"mongodb-memory-server": "^9.0.1",
"mongoose": "~8.0.0",
"mongoose": "~8.0.1",
"prettier": "^3.1.0",
"rimraf": "^5.0.5",
"semantic-release": "^19.0.5",
Expand Down
4 changes: 2 additions & 2 deletions src/typegoose.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import {
if (typeof process !== 'undefined' && !isNullOrUndefined(process?.version) && !isNullOrUndefined(mongoose?.version)) {
// for usage on client side
/* istanbul ignore next */
if (semver.lt(mongoose?.version, '8.0.0')) {
throw new Error(`Please use mongoose 8.0.0 or higher (Current mongoose: ${mongoose.version}) [E001]`);
if (semver.lt(mongoose?.version, '8.0.1')) {
throw new Error(`Please use mongoose 8.0.1 or higher (Current mongoose: ${mongoose.version}) [E001]`);
}

/* istanbul ignore next */
Expand Down
2 changes: 1 addition & 1 deletion test/tests/types/basicTypegoose.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ gh732();

function postHookErrorOption() {
@typegoose.post<TestErrorOption>(
'count',
'countDocuments',
function (...args) {
expectType<NativeError>(args[0]);
expectType<any>(args[1]);
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4962,10 +4962,10 @@ mongodb@^5.9.0:
optionalDependencies:
"@mongodb-js/saslprep" "^1.1.0"

mongoose@~8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-8.0.0.tgz#f14175eebfaf5256855d7cbd58bf862819b3fd12"
integrity sha512-PzwkLgm1Jhj0NQdgGfnFsu0QP9V1sBFgbavEgh/IPAUzKAagzvEhuaBuAQOQGjczVWnpIU9tBqyd02cOTgsPlA==
mongoose@~8.0.1:
version "8.0.1"
resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-8.0.1.tgz#27dee7cf9cf9b31c7b0536017700290f2b1a1135"
integrity sha512-O3TJrtLCt4H1eGf2HoHGcnOcCTWloQkpmIP3hA9olybX3OX2KUjdIIq135HD5paGjZEDJYKn9fw4eH5N477zqQ==
dependencies:
bson "^6.2.0"
kareem "2.5.1"
Expand Down

0 comments on commit 6223bf8

Please sign in to comment.