Skip to content

Commit

Permalink
dependencies(mongoose): upgrade to 6.1.3
Browse files Browse the repository at this point in the history
fixes #647
  • Loading branch information
hasezoey committed Dec 22, 2021
1 parent 35d9822 commit 46076cd
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 23 deletions.
4 changes: 2 additions & 2 deletions docs/guides/error-warning-details.md
Expand Up @@ -11,12 +11,12 @@ Only Removed Error will have a link to their code, because there is currently no

### Mongoose Version [E001]

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

Error Class: `Error`

Details:
Typegoose requires at least mongoose version `6.0.14`, because that version changed something that affected typegoose internals
Typegoose requires at least mongoose version `6.1.3`, because that version changed something that affected typegoose internals

### NodeJS Version [E002]

Expand Down
1 change: 1 addition & 0 deletions docs/guides/mongoose-compatibility.md
Expand Up @@ -9,6 +9,7 @@ If no upper mongoose version is defined and a newer typegoose version exists wit

| Typegoose Version | Mongoose Version |
| ----------------- | ---------------- |
| 9.4.x | ~6.1.3 |
| 9.3.x | ~6.0.14 |
| 9.2.x | ~6.0.11 |
| 9.1.x | 6.0.9 - 6.0.10 |
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/quick-start-guide.md
Expand Up @@ -108,7 +108,7 @@ Like `public: string[]` is in reflection only `Array`.

- TypeScript version `^4.4` (since 9.0) is recommended, though older ones may also work
- NodeJS `^12.22.0`
- Mongoose `~6.0.14`
- Mongoose `~6.1.3`
- 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
Expand Up @@ -36,7 +36,7 @@
],
"license": "MIT",
"peerDependencies": {
"mongoose": "~6.0.14"
"mongoose": "~6.1.3"
},
"devDependencies": {
"@commitlint/cli": "^15.0.0",
Expand Down Expand Up @@ -64,7 +64,7 @@
"jest": "^27.4.5",
"lint-staged": "^11.2.6",
"mongodb-memory-server": "^8.0.4",
"mongoose": "~6.0.14",
"mongoose": "~6.1.3",
"mongoose-findorcreate": "3.0.0",
"prettier": "^2.5.1",
"rimraf": "^3.0.2",
Expand Down
4 changes: 2 additions & 2 deletions src/typegoose.ts
Expand Up @@ -8,8 +8,8 @@ import { assertion, assertionIsClass, getName, isNullOrUndefined, mergeMetadata,
if (!isNullOrUndefined(process?.version) && !isNullOrUndefined(mongoose?.version)) {
// for usage on client side
/* istanbul ignore next */
if (semver.lt(mongoose?.version, '6.0.14')) {
throw new Error(`Please use mongoose 6.0.14 or higher (Current mongoose: ${mongoose.version}) [E001]`);
if (semver.lt(mongoose?.version, '6.1.3')) {
throw new Error(`Please use mongoose 6.1.3 or higher (Current mongoose: ${mongoose.version}) [E001]`);
}

/* istanbul ignore next */
Expand Down
32 changes: 16 additions & 16 deletions yarn.lock
Expand Up @@ -1769,7 +1769,7 @@ bson@^4.2.2, bson@^4.5.2:
dependencies:
buffer "^5.6.0"

bson@^4.5.4:
bson@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/bson/-/bson-4.6.0.tgz#15c3b39ba3940c3d915a0c44d51459f4b4fbf1b2"
integrity sha512-8jw1NU1hglS+Da1jDOUYuNcBJ4cNHCFIqzlwoFNnsTOg2R/ox0aTYcTiBN4dzRa9q7Cvy6XErh3L8ReTEb9AQQ==
Expand Down Expand Up @@ -4661,10 +4661,10 @@ mongodb-connection-string-url@^2.0.0:
"@types/whatwg-url" "^8.2.1"
whatwg-url "^9.1.0"

mongodb-connection-string-url@^2.1.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/mongodb-connection-string-url/-/mongodb-connection-string-url-2.2.0.tgz#e2422bae91a953dc4ae5882e401301f5be39a227"
integrity sha512-U0cDxLUrQrl7DZA828CA+o69EuWPWEJTwdMPozyd7cy/dbtncUZczMw7wRHcwMD7oKOn0NM2tF9jdf5FFVW9CA==
mongodb-connection-string-url@^2.3.2:
version "2.4.1"
resolved "https://registry.yarnpkg.com/mongodb-connection-string-url/-/mongodb-connection-string-url-2.4.1.tgz#6b3c6c40133a0ad059fe9a0abda64b2a1cb4e8b4"
integrity sha512-d5Kd2bVsKcSA7YI/yo57fSTtMwRQdFkvc5IZwod1RRxJtECeWPPSo7zqcUGJELifRA//Igs4spVtYAmvFCatug==
dependencies:
"@types/whatwg-url" "^8.2.1"
whatwg-url "^11.0.0"
Expand Down Expand Up @@ -4699,14 +4699,14 @@ mongodb-memory-server@^8.0.4:
mongodb-memory-server-core "8.0.4"
tslib "^2.3.1"

mongodb@4.1.4:
version "4.1.4"
resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-4.1.4.tgz#ba8062c7c67e7a22db5a059dbac1e3044b48453b"
integrity sha512-Cv/sk8on/tpvvqbEvR1h03mdyNdyvvO+WhtFlL4jrZ+DSsN/oSQHVqmJQI/sBCqqbOArFcYCAYDfyzqFwV4GSQ==
mongodb@4.2.2:
version "4.2.2"
resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-4.2.2.tgz#cd70568bd96003877e35358ad17a0c5de35c6dfd"
integrity sha512-zt8rCTnTKyMQppyt63qMnrLM5dbADgUk18ORPF1XbtHLIYCyc9hattaYHi0pqMvNxDpgGgUofSVzS+UQErgTug==
dependencies:
bson "^4.5.4"
bson "^4.6.0"
denque "^2.0.1"
mongodb-connection-string-url "^2.1.0"
mongodb-connection-string-url "^2.3.2"
optionalDependencies:
saslprep "^1.0.3"

Expand All @@ -4726,14 +4726,14 @@ mongoose-findorcreate@3.0.0:
resolved "https://registry.yarnpkg.com/mongoose-findorcreate/-/mongoose-findorcreate-3.0.0.tgz#490acf67c16061de74f7d1b92906538a62554a6d"
integrity sha512-kQhDe5XDj6tMv8kq1wjK+hITGIGUl60rj8oGLupF9poNsqIDkAJBXudZKcCdSyBZ7p6DLK2+0jSBthrb26tSYQ==

mongoose@~6.0.14:
version "6.0.14"
resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-6.0.14.tgz#8f4d45318bb5de08814a8a9b040dd53521246608"
integrity sha512-SZ0kBlHrz/G70yWdVXLfM/gH4NsY85+as4MZRdtWxBTDEcmoE3rCFAz1/Ho2ycg5mJAeOBwdGZw4a5sn/WrwUA==
mongoose@~6.1.3:
version "6.1.3"
resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-6.1.3.tgz#9534b39ecbb7a6a9e1b9108defb1345064080416"
integrity sha512-EK3IBmQcIZEhnX3HQYge82hF0ukAnrxnJovBUFwAEkoe3SZ3VJb2k1eMF4MOKEo5mF/h3auxzKJhItaXc3dfmg==
dependencies:
bson "^4.2.2"
kareem "2.3.2"
mongodb "4.1.4"
mongodb "4.2.2"
mpath "0.8.4"
mquery "4.0.0"
ms "2.1.2"
Expand Down

0 comments on commit 46076cd

Please sign in to comment.