Skip to content

Commit

Permalink
deps(mongoose): upgrade to 8.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hasezoey committed Jan 17, 2024
1 parent dcadd1e commit 99b3eca
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 16 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.1 or higher (Current mongoose: x.x.x) [E001]`
Error: `Please use mongoose 8.1.0 or higher (Current mongoose: x.x.x) [E001]`

Error Class: `Error`

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

| Typegoose Version | Mongoose Version |
| ----------------- | ---------------- |
| 12.1.x | ~8.1.0 |
| 12.0.x | ~8.0.1 |
| 11.7.x | ~7.6.3 |
| 11.6.x | ~7.6.1 |
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.3` is recommended, though older ones may also work
- NodeJS `>=16.20.1` (and `@types/node@16`)
- Mongoose `~8.0.1`
- Mongoose `~8.1.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
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
],
"license": "MIT",
"peerDependencies": {
"mongoose": "~8.0.1"
"mongoose": "~8.1.0"
},
"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.1.5",
"mongoose": "~8.0.1",
"mongoose": "~8.1.0",
"prettier": "^3.2.4",
"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.1')) {
throw new Error(`Please use mongoose 8.0.1 or higher (Current mongoose: ${mongoose.version}) [E001]`);
if (semver.lt(mongoose?.version, '8.1.0')) {
throw new Error(`Please use mongoose 8.1.0 or higher (Current mongoose: ${mongoose.version}) [E001]`);
}

/* istanbul ignore next */
Expand Down
55 changes: 45 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1566,6 +1566,13 @@
resolved "https://registry.yarnpkg.com/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz#e33bc8ea812a01f63f90481c666334844b12a09e"
integrity sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q==

"@types/whatwg-url@^11.0.2":
version "11.0.4"
resolved "https://registry.yarnpkg.com/@types/whatwg-url/-/whatwg-url-11.0.4.tgz#ffed0dc8d89d91f62e3f368fcbda222a487c4f63"
integrity sha512-lXCmTWSHJvf0TRSO58nm978b8HJ/EdsSsEKLd3ODHFjo+3VGAyyTp4v50nWvwtzBxSMQrVOK7tcuN0zGPLICMw==
dependencies:
"@types/webidl-conversions" "*"

"@types/whatwg-url@^8.2.1":
version "8.2.1"
resolved "https://registry.yarnpkg.com/@types/whatwg-url/-/whatwg-url-8.2.1.tgz#f1aac222dab7c59e011663a0cb0a3117b2ef05d4"
Expand Down Expand Up @@ -4851,6 +4858,14 @@ mongodb-connection-string-url@^2.6.0:
"@types/whatwg-url" "^8.2.1"
whatwg-url "^11.0.0"

mongodb-connection-string-url@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.0.tgz#b4f87f92fd8593f3b9365f592515a06d304a1e9c"
integrity sha512-t1Vf+m1I5hC2M5RJx/7AtxgABy1cZmIPQRMXw+gEIPn/cZNF3Oiy+l0UIypUwVB5trcWHq3crg2g3uAR9aAwsQ==
dependencies:
"@types/whatwg-url" "^11.0.2"
whatwg-url "^13.0.0"

mongodb-memory-server-core@9.1.5:
version "9.1.5"
resolved "https://registry.yarnpkg.com/mongodb-memory-server-core/-/mongodb-memory-server-core-9.1.5.tgz#c5a06955f9ae2349edcbaf4f78c78ef98f470308"
Expand All @@ -4877,14 +4892,14 @@ mongodb-memory-server@^9.1.5:
mongodb-memory-server-core "9.1.5"
tslib "^2.6.2"

mongodb@6.2.0:
version "6.2.0"
resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-6.2.0.tgz#2c9dcb3eeaf528ed850e94b3df392de6c6b0d7ab"
integrity sha512-d7OSuGjGWDZ5usZPqfvb36laQ9CPhnWkAGHT61x5P95p/8nMVeH8asloMwW6GcYFeB0Vj4CB/1wOTDG2RA9BFA==
mongodb@6.3.0:
version "6.3.0"
resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-6.3.0.tgz#ec9993b19f7ed2ea715b903fcac6171c9d1d38ca"
integrity sha512-tt0KuGjGtLUhLoU263+xvQmPHEGTw5LbcNC73EoFRYgSHwZt5tsoJC110hDyO1kjQzpgNrpdcSza9PknWN4LrA==
dependencies:
"@mongodb-js/saslprep" "^1.1.0"
bson "^6.2.0"
mongodb-connection-string-url "^2.6.0"
mongodb-connection-string-url "^3.0.0"

mongodb@^5.9.1:
version "5.9.1"
Expand All @@ -4897,14 +4912,14 @@ mongodb@^5.9.1:
optionalDependencies:
"@mongodb-js/saslprep" "^1.1.0"

mongoose@~8.0.1:
version "8.0.1"
resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-8.0.1.tgz#27dee7cf9cf9b31c7b0536017700290f2b1a1135"
integrity sha512-O3TJrtLCt4H1eGf2HoHGcnOcCTWloQkpmIP3hA9olybX3OX2KUjdIIq135HD5paGjZEDJYKn9fw4eH5N477zqQ==
mongoose@~8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-8.1.0.tgz#25be9a39295c0cbffc971fdd4fb6302dceeb2ded"
integrity sha512-kOA4Xnq2goqNpN9EmYElGNWfxA9H80fxcr7UdJKWi3UMflza0R7wpTihCpM67dE/0MNFljoa0sjQtlXVkkySAQ==
dependencies:
bson "^6.2.0"
kareem "2.5.1"
mongodb "6.2.0"
mongodb "6.3.0"
mpath "0.9.0"
mquery "5.0.0"
ms "2.1.3"
Expand Down Expand Up @@ -5635,6 +5650,11 @@ punycode@^2.1.1:
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==

punycode@^2.3.0:
version "2.3.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5"
integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==

pure-rand@^6.0.0:
version "6.0.1"
resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.0.1.tgz#31207dddd15d43f299fdcdb2f572df65030c19af"
Expand Down Expand Up @@ -6458,6 +6478,13 @@ tr46@^3.0.0:
dependencies:
punycode "^2.1.1"

tr46@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/tr46/-/tr46-4.1.1.tgz#281a758dcc82aeb4fe38c7dfe4d11a395aac8469"
integrity sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==
dependencies:
punycode "^2.3.0"

tr46@~0.0.3:
version "0.0.3"
resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a"
Expand Down Expand Up @@ -6707,6 +6734,14 @@ whatwg-url@^11.0.0:
tr46 "^3.0.0"
webidl-conversions "^7.0.0"

whatwg-url@^13.0.0:
version "13.0.0"
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-13.0.0.tgz#b7b536aca48306394a34e44bda8e99f332410f8f"
integrity sha512-9WWbymnqj57+XEuqADHrCJ2eSXzn8WXIW/YSGaZtb2WKAInQ6CHfaUUcTyyver0p8BDg5StLQq8h1vtZuwmOig==
dependencies:
tr46 "^4.1.1"
webidl-conversions "^7.0.0"

whatwg-url@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d"
Expand Down

0 comments on commit 99b3eca

Please sign in to comment.