Skip to content

Commit

Permalink
fix(formio): update mongoose to v8.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Romakita committed Oct 5, 2024
1 parent e84876f commit 2a419da
Show file tree
Hide file tree
Showing 4 changed files with 241 additions and 193 deletions.
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
"merge-istanbul": "1.1.4",
"micromatch": "4.0.8",
"moment": "2.30.1",
"mongoose": "^8.7.0",
"prettier": "3.3.3",
"semantic-release": "24.1.2",
"semantic-release-slack-bot": "4.0.2",
Expand Down Expand Up @@ -173,9 +174,6 @@
"tools/*"
]
},
"resolutions": {
"mongoose": "6.5.1"
},
"lint-staged": {
"**/*.{ts,js}": [
"eslint --fix"
Expand Down
2 changes: 1 addition & 1 deletion packages/orm/mongoose/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@tsed/testcontainers-mongo": "workspace:*",
"@tsed/typescript": "workspace:*",
"eslint": "9.12.0",
"mongoose": "6.13.3",
"mongoose": "8.7.0",
"typescript": "5.4.5",
"vitest": "2.1.2"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/orm/mongoose/src/utils/createSchema.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {cleanObject, nameOf, Store, Type} from "@tsed/core";
import {deserialize, serialize} from "@tsed/json-mapper";
import {getProperties, JsonEntityStore, JsonSchema} from "@tsed/schema";
import {getProperties, JsonEntityStore} from "@tsed/schema";
import {pascalCase} from "change-case";
import mongoose, {Schema, SchemaDefinition, SchemaOptions, SchemaTypeOptions} from "mongoose";

Expand All @@ -19,7 +19,7 @@ export interface MongooseSchemaMetadata {
* @ignore
*/
function setUpSchema({schema, virtuals}: MongooseSchemaMetadata, options?: SchemaOptions) {
const mongooseSchema = new mongoose.Schema(schema, options);
const mongooseSchema = new mongoose.Schema(schema, options as never);

for (const [key, options] of virtuals.entries()) {
mongooseSchema.virtual(key, options);
Expand Down
Loading

0 comments on commit 2a419da

Please sign in to comment.