10.0.0-beta.1 (2022-12-01)
⚠ BREAKING CHANGES
- typegoose::buildSchema: "buildSchema" now only accepts 2 parameters instead of 3 (the last 2 got merged)
- Option "runSyncIndexes" has been removed, if still wanting to continue to use it, run "model.syncIndexes()" manually
- File "index(.ts|.js)" got renamed to "indexes(.ts|.js)" to lessen confusion
- utils: Function "getClassForDocument" is removed, use "getClass" directly
- types::IndexOptions: Anyone using "@index" or "IndexOptions" directly with a generic will have to remove the generic
- "DecoratedPropertyMetadata::whatis" got renamed to "DecoratedPropertyMetadata::propType" for anyone using it
- tsconfig.json: tsconfig "target" is now "es2020" which could be potentially be breaking
- NodeJS 14.0 is now the lowest required node version
- types::Ref: "Ref" now transparently uses "DocumentType", which could lead ot breaking changes.
"isDocumentType" and "isRefType" now narrow out the type that is tested, which could be a breaking change.
- tsconfig.json: tsconfig "target" is now "es2019" which could be potentially be breaking
Features
Refactor
-
hooks: dont define empty hooks options if not provided (89b9416)
-
hooks: use mongoose's array looping over methods over typegoose's (ca2a03a), closes typegoose/typegoose#587
-
utils::initProperty: simplify paths (37ca83e)
-
update minimal NodeJS version to 14.0.0 (fcffbd8)
Fixes
- plugin: actually print "anonymous" if function name is empty (ae124bc)
- typegoose: lessen the amount of "merge*" calls (e30f4ae)
Style
- biguser.test: fix type error for "toMatchSnapshot" missing property "_id" (b7e86eb)
- hooks: update types to more closely match mongoose's (62e1f2b), closes typegoose/typegoose#587
- schema: update comment explaining on why "as any" is used for hooks (3e0386b)
- typegoose: rename some internal variables (fc04892)
- types::DecoratedPropertyMetadata: change "options" to have proper type instead of "any" (845c5e0)
- types::EmptyVoidFn: remove unused type (2e79801)
- types::IndexOptions: remove unused generic (5ed9f25)
- types: fix typescript complaining about a tsdoc link (90fca45)
- types: remove deprecated temporary options from "ICustomOptions" (932cce5)
- types: remove type "IObjectWithTypegooseName" (67e8350)
- utils::getClass: update types to better reflect what it is doing (a9a23f6)
- utils::getClass: update types to use less duplicate types (5435d88)
- utils: remove unused imports (4b79a49)
Dependencies
- @semantic-release/changelog: upgrade to 6.0.2 (91ef4b4)
- @semantic-release/github: upgrade to 8.0.7 (ece0c7e)
- @types/lodash: upgrade to 4.14.190 (57233c9)
- @types/lodash: upgrade to 4.14.191 (99df11d)
- @types/node: upgrade to 14.14.31 (9f150d4)
- @typescript-eslint/*: upgrade to 5.44.0 (70ab1bb)
- @typescript-eslint/*: upgrade to 5.45.0 (58f19ca)
- commitlint: upgrade to 17.3.0 (ee9fc80)
- eslint: upgrade to 8.28.0 (ddcd191)
- husky: upgrade to 8.0.2 (4e1c894)
- jest: upgrade to 29.0.3 (4252897)
- lint-staged: upgrade to 13.0.4 (31f082c)
- mongodb-memory-server: upgrade to 8.10.1 (287dda8)
- mongoose: upgrade to 6.7.3 (f3870ff)
- mongoose: upgrade to 6.7.5 (f68226e)
- prettier: upgrade to 2.8.0 (9328043)
- semantic-release: upgrade to 19.0.5 (3d9175e)
- typescript: upgrade to 4.9.3 (cfca616)