typegoose

Typegoose - Define Mongoose models using TypeScript classes.

MIT License

Downloads
403.8K
Stars
2.1K
Committers
105

Bot releases are hidden (Show)

typegoose - v7.6.1

Published by hasezoey over 3 years ago

7.6.1 (2021-05-31)

Fixes

  • processProp: add error code E023 for '"ref" is not supported for "${propKind}"!' (8bdfcd7)

Note: this is an manual release, because semantic-release somehow failed and cannot be reverted without force-push

typegoose - Release 7.4.8

Published by hasezoey over 3 years ago

  • Fix when using get/set option to use the schema instead of the class [typegoose#478]

https://typegoose.github.io/typegoose/docs/changelog#748

typegoose - Release 7.4.7

Published by hasezoey over 3 years ago

  • Renamed type QueryMethod to AsQueryMethod to not conflict with the PascalCase export for decorator @queryMethod [typegoose#465]
  • Add aggregate hook [typegoose#471]

https://typegoose.github.io/typegoose/docs/changelog#747

typegoose - Release 7.4.6

Published by hasezoey almost 4 years ago

  • add param for existingMongoose/existingConnection to addModelToTypegoose [typegoose#436]
  • add mongoose version diagnostic info [typegoose#458]
  • update mongoose version error to currently supported range (from 5.9.x to 5.10.x)
  • add warning when using higher mongoose version than 5.10.18

https://typegoose.github.io/typegoose/docs/changelog#746

typegoose - Release 7.4.5

Published by hasezoey almost 4 years ago

  • Rename type NDA to NumberOrDocumentOrDocumentArray to be more understandable
  • Fix Argument of type 'string[]' is not assignable to parameter of type '"insertMany"'.ts(2769) [typegoose#422]

https://typegoose.github.io/typegoose/docs/changelog#745

typegoose - Release 7.4.4

Published by hasezoey almost 4 years ago

  • Apply correct processing with WhatIsIt when options "get/set" are provided [typegoose#422]

https://typegoose.github.io/typegoose/docs/changelog#744

typegoose - Release 7.4.3

Published by hasezoey almost 4 years ago

https://typegoose.github.io/typegoose/docs/changelog#743

typegoose - Release 7.4.2

Published by hasezoey almost 4 years ago

  • Default to mongoose.Schema.Types.Mixed if Type is still *Array [typegoose#300]

https://typegoose.github.io/typegoose/docs/changelog#742

typegoose - Release 7.4.1

Published by hasezoey almost 4 years ago

typegoose - Release 7.4.0

Published by hasezoey about 4 years ago

  • Update Dependencies
    • mongoose to 5.10.4
    • lodash to 4.17.20
    • loglevel to 1.7.0
    • tslib to 2.0.1
    • @types/mongoose to 5.7.36
  • Add warning if justOne is defined, but no Virtual Populate Options
  • Allow any argument to DeferredFunc
  • Add Type DynamicStringFunc
  • Allow definition of functions for localField & foreignField
  • Allow returning an function in ref (ref: () => (doc) => doc.someProp)
  • Allow the NestJS / Type-GraphQl way of defining arrays (type: () => [String] (and nested too))
  • [IC] Fix that dim is included as an option in the schema [typegoose#366]

https://typegoose.github.io/typegoose/docs/changelog#740

typegoose -

Published by hasezoey about 4 years ago

Includes since last pre-release:

  • fix failing builds

https://typegoose.github.io/typegoose/docs/changelog#740

typegoose -

Published by hasezoey about 4 years ago

Includes since last pre-release:

  • Allow any argument to DeferredFunc
  • Add Type DynamicStringFunc
  • Allow definition of functions for localField & foreignField
  • Allow returning an function in ref (ref: () => (doc) => doc.someProp)

https://typegoose.github.io/typegoose/docs/changelog#740

typegoose -

Published by hasezoey about 4 years ago

Includes since last pre-release:

  • Update Dependencies
    • mongoose to 5.10.4
    • lodash to 4.17.20
    • loglevel to 1.7.0
    • tslib to 2.0.1
    • @types/mongoose to 5.7.36

https://typegoose.github.io/typegoose/docs/changelog#740

typegoose -

Published by hasezoey about 4 years ago

Includes since last pre-release:

  • Allow the NestJS / Type-GraphQl way of defining arrays (type: () => [String] (and nested too))
  • [IC] Fix that dim is included as an option in the schema [typegoose#366]

https://typegoose.github.io/typegoose/docs/changelog#740

typegoose - Release 7.3.5

Published by hasezoey about 4 years ago

  • Add Error Codes Errors & Warnings Details
  • Remove never triggered Error InvalidPropError
  • Change "Options-not-for-current-type" Errors into warnings (with actual information on what options are included) [typegoose#363]
  • [IC] Assing schemaOptions in src/internal/schema.ts to an black object [typegoose#357]

https://typegoose.github.io/typegoose/docs/changelog#735

typegoose - Release 7.3.4

Published by hasezoey about 4 years ago

typegoose - Release 7.3.3

Published by hasezoey about 4 years ago

  • Dont assume that the plugin function has an name [typegoose#353]
  • Only check mongoose & nodejs version if process is defined
  • [IC] replace all util.format with template strings [typegoose#348]
  • [IC] add wrapper & polyfill for util.deprecate[typegoose#344]

https://typegoose.github.io/typegoose/docs/changelog#733

typegoose - Release 7.3.2

Published by hasezoey about 4 years ago

  • Update @prop tsdoc to show it supports Maps and Arrays
  • Update dead documentation links
  • Update enum-error to better reflect what the error is about

https://typegoose.github.io/typegoose/docs/changelog#732

typegoose - Release 7.3.1

Published by hasezoey about 4 years ago

  • Update Dependencies
    • typescript to 3.9.7
  • Add hook-typings for countDocuments, estimatedDocumentCount, deleteMany, findOneAndDelete, deleteOne

https://typegoose.github.io/typegoose/docs/changelog#731

typegoose - Release 7.3.0

Published by hasezoey over 4 years ago

  • Update Dependencies
    • mongoose to 5.9.22
    • lodash to 4.17.19
    • @types/mongoose to 5.7.30
    • @types/lodash to 4.14.157
    • @types/semver to 7.3.1
    • typescript to 3.9.6
  • TimeStamps's (Default Class) properties are not marked as Readonly anymore
  • All Typeguards now accept undefined as the first parameter too (if an type was OR with undefined, the function would give an type-error)
  • Add option discriminators for embedded Discriminators [#248]
  • Set correct Decorator Return type (ClassDecorator & PropertyDecorator)
  • Change warning message for warnMixed
  • If an SchemaType dosnt extend SchemaTypeOptions, the options are now defaulted to the outer-layer
  • innerOptions and outerOptions can now be used for Maps too
  • Custom Validators now support message being an function
  • Automatically convert mongoose.Types.Buffer to mongoose.Schema.Types.Buffer
  • Fix Types when extending default class Base with other than ObjectId [#316]
  • [IC] mapOptions now always errors if the given type dosnt extend mongoose.SchemaTypeOptions
  • [IC] Moved function _buildPropMetadata to its own file (processProp) and renamed it to processProp [#286]
  • [IC] Moved pre-processing in function prop into processProp [#286]
  • [IC] Removed error NoMetadataError
  • [IC] Removed check that Type needs to be defined in prop / processProp

https://typegoose.github.io/typegoose/docs/changelog#730