Skip to content

Commit

Permalink
dependencies(mongoose): upgrade to 6.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hasezoey committed Dec 6, 2022
1 parent aad60d1 commit 8e8958f
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 19 deletions.
2 changes: 1 addition & 1 deletion docs/guides/error-warning-details.md
Expand Up @@ -7,7 +7,7 @@ title: 'Error & Warning Details'

### Mongoose Version [E001]

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

Error Class: `Error`

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/migration/migrate-10.md
Expand Up @@ -11,7 +11,7 @@ This Guide is written for migration from version `9.13.2` to `10.0.0`, for versi

## Requirements changed

- Mongoose `6.7.5` or higher is now required
- Mongoose `6.8.0` or higher is now required
- Typescript `4.9` or higher is now required to be used
- NodeJS 14 is now the lowest supported nodejs version

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

| Typegoose Version | Mongoose Version |
| ----------------- | ---------------- |
| 10.0.x | ~6.7.5 |
| 10.0.x | ~6.8.0 |
| 9.13.x | ~6.7.2 |
| 9.12.x | ~6.6.0 |
| 9.11.x | ~6.5.0 |
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.9` (since 10.0) is recommended, though older ones may also work
- NodeJS `^14.17.0`
- Mongoose `~6.7.5`
- Mongoose `~6.8.0`
- 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.7.5"
"mongoose": "~6.8.0"
},
"devDependencies": {
"@commitlint/cli": "^17.3.0",
Expand Down Expand Up @@ -66,7 +66,7 @@
"jest-runner-tsd": "^4.0.0",
"lint-staged": "^13.0.4",
"mongodb-memory-server": "^8.10.1",
"mongoose": "~6.7.5",
"mongoose": "~6.8.0",
"mongoose-findorcreate": "3.0.0",
"prettier": "^2.8.0",
"rimraf": "^3.0.2",
Expand Down
4 changes: 2 additions & 2 deletions src/typegoose.ts
Expand Up @@ -16,8 +16,8 @@ import {
if (!isNullOrUndefined(process?.version) && !isNullOrUndefined(mongoose?.version)) {
// for usage on client side
/* istanbul ignore next */
if (semver.lt(mongoose?.version, '6.7.5')) {
throw new Error(`Please use mongoose 6.7.5 or higher (Current mongoose: ${mongoose.version}) [E001]`);
if (semver.lt(mongoose?.version, '6.8.0')) {
throw new Error(`Please use mongoose 6.8.0 or higher (Current mongoose: ${mongoose.version}) [E001]`);
}

/* istanbul ignore next */
Expand Down
1 change: 1 addition & 0 deletions test/utils/connect.ts
Expand Up @@ -37,6 +37,7 @@ export async function connect(extraConfig: ExtraConnectionConfig = {}): Promise<
if (extraConfig.createNewConnection) {
connection = await mongooseInstance.createConnection(connectionString, options).asPromise();
} else {
mongoose.set('strictQuery', false); // TODO: remove in mongoose 7, disabled deprecation warning
await mongoose.connect(connectionString, options);
connection = mongooseInstance.connection;
}
Expand Down
34 changes: 23 additions & 11 deletions yarn.lock
Expand Up @@ -4651,10 +4651,10 @@ just-diff@^5.0.1:
resolved "https://registry.yarnpkg.com/just-diff/-/just-diff-5.1.1.tgz#8da6414342a5ed6d02ccd64f5586cbbed3146202"
integrity sha512-u8HXJ3HlNrTzY7zrYYKjNEfBlyjqhdBkoyTVdjtn7p02RJD5NvR8rIClzeGA7t+UYP1/7eAkWNLU0+P3QrEqKQ==

kareem@2.4.1:
version "2.4.1"
resolved "https://registry.yarnpkg.com/kareem/-/kareem-2.4.1.tgz#7d81ec518204a48c1cb16554af126806c3cd82b0"
integrity sha512-aJ9opVoXroQUPfovYP5kaj2lM7Jn02Gw13bL0lg9v0V7SaUc0qavPs0Eue7d2DcC3NjqI6QAUElXNsuZSeM+EA==
kareem@2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/kareem/-/kareem-2.5.0.tgz#9d2b2272609b0d5b981757fa5794d7ad0ac041b2"
integrity sha512-rVBUGGwvqg130iwYu8k7lutHuDBFj1yGRdnlE44wEhxAmFBad1zcL66PdWC1raw3tIObY6XWhtv3VL04xQb/cg==

kind-of@^6.0.3:
version "6.0.3"
Expand Down Expand Up @@ -5271,7 +5271,19 @@ mongodb-memory-server@^8.10.1:
mongodb-memory-server-core "8.10.1"
tslib "^2.4.1"

mongodb@4.11.0, mongodb@~4.11.0:
mongodb@4.12.1:
version "4.12.1"
resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-4.12.1.tgz#224eb39b8784af835b515aa687c6010cecaabb1a"
integrity sha512-koT87tecZmxPKtxRQD8hCKfn+ockEL2xBiUvx3isQGI6mFmagWt4f4AyCE9J4sKepnLhMacoCTQQA6SLAI2L6w==
dependencies:
bson "^4.7.0"
mongodb-connection-string-url "^2.5.4"
socks "^2.7.1"
optionalDependencies:
"@aws-sdk/credential-providers" "^3.186.0"
saslprep "^1.0.3"

mongodb@~4.11.0:
version "4.11.0"
resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-4.11.0.tgz#d28fdc7509f24d0d274f456529441fa3e570415c"
integrity sha512-9l9n4Nk2BYZzljW3vHah3Z0rfS5npKw6ktnkmFgTcnzaXH1DRm3pDl6VMHu84EVb1lzmSaJC4OzWZqTkB5i2wg==
Expand All @@ -5289,14 +5301,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.7.5:
version "6.7.5"
resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-6.7.5.tgz#3e97faabf71952020e6a528513ab63ead936cc18"
integrity sha512-3ppxBxDUIoQKYISVpAg7hjmV1lkGBN3tN9AkQr1Vqc68L5k+Bo+uyfOhpbCFpCf5JZLcEO4cmuB5YX+d9h3plw==
mongoose@~6.8.0:
version "6.8.0"
resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-6.8.0.tgz#24f32c751a6011d8fc7992af5792f706ca748eda"
integrity sha512-zlUfjcLya3pLfLTxwyH5S9bZUolJWGKF2M7PEV0118jv4VWHR/krjb6LIWu1RPQN2rwYmnmjjzJLVhbhmHqSmg==
dependencies:
bson "^4.7.0"
kareem "2.4.1"
mongodb "4.11.0"
kareem "2.5.0"
mongodb "4.12.1"
mpath "0.9.0"
mquery "4.0.3"
ms "2.1.3"
Expand Down

0 comments on commit 8e8958f

Please sign in to comment.