Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@typegoose/typegoose

Package Overview
Dependencies
Maintainers
1
Versions
225
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@typegoose/typegoose - npm Package Versions

1
23

7.1.2

Diff

Changelog

Source

7.1.2

  • @prop options types now work again
  • BasePropOptions.type is now unknown instead of any
  • All aliases of BasePropOptions.type now inherit the types from there
  • Fix bug where autopopulate (or any other plugin) wouldn't pick up on virtuals [typegoose#274]
  • [IC] refType is now moved to prop
hasezoey
published 7.1.1 •

Changelog

Source

7.1.1

  • Remove empty interface PropOptions
  • Remove type PropOptionsWithValidate
  • Rename type PropOptionsWithNumberValidate to PropOptionsForNumber
  • Rename type PropOptionsWithStringValidate to PropOptionsForString
  • Add options options & match for VirtualOptions
  • Add option enum for ValidateNumberOptions
  • arrayProp & mapProp are now just an alias for prop
  • Set TSDoc option @deprecated for arrayProp and mapProp
  • Detect mongoose.Types.Array & mongoose.Schema.Types.Array as Array in @prop
  • Detect mongoose.Types.Map & mongoose.Schema.Types.Map as Map in @prop
  • Add Overloads to @prop
  • PascalCased decorators now have the TSDoc of the original function
  • Default class Base's __v & __t are now optional (with ?)
  • Fix mentioned bug from typegoose#181, to allow mongoose.Schema.Types.String & mongoose.Schema.Types.Number as valid enum types
  • Options of & items are now mapped to type and get called when buildSchema is called
  • [IC] DeDuplicate code in prop.ts
hasezoey
published 7.1.0 •

Changelog

Source

7.1.0

  • Update Dependencies
    • mongoose to 5.9.14
    • @types/mongoose to 5.7.19
    • tslib to 2.0.0
    • typescript to 3.9.2
  • Fix duplicate hooks / virtuals / queryMethods / plugins / indices via inheritance [typegoose#218]
  • improve TSDoc of some functions
  • Fix queryMethod reflection
  • Set proper function type for queryMethod
  • Added the ability to define option ref with an arrow-function (ref: () => type)
  • All Decorators are now exported PascalCased & camelCased
  • Actually export the @queryMethod decorator
  • The @queryMethod decorator now has correct types [typegoose#247]
  • The functions addModelToTypegoose, getModelForClass, buildSchema, deleteModelWithClass, getDiscriminatorModelForClass now have the T generic removed (it was unnecessary)
  • The functions addModelToTypegoose, getModelForClass, getDiscriminatorModelForClass now have an new optional generic QueryHelpers
  • The Type ReturnModelType now has the T generic removed (it was unnecessary)
  • The Type ReturnModelType now has an second optional generic QueryHelpers
  • Fix bug where ref: Class didn't execute getName when Virtual-Populate was used
  • Allow use of @prop for arrays & maps (In preparation for 8.0), it is now auto-detected based on design:type
  • The Decorator @plugin now automatically infers the options if the plugin & function have typings and use options
  • [IC] add some tslint rules & apply them
  • [IC] enable "strictNullChecks" & fix accordingly
hasezoey
published 7.1.0-1 •

hasezoey
published 7.1.0-0 •

hasezoey
published 7.0.0 •

Changelog

Source

7.0.0

To Migrate, please look at the migration guide

  • Update Dependencies
    • mongoose to 5.9.10
    • @types/mongoose to 5.7.12
  • Minimal NodeJS version is now 10.15
  • Minimal Typescript version is now 3.8.3
  • Typegoose class got completely removed
  • All Deprecated arrayProp options got remove
    • itemsRef replaced with plain ref
    • itemsRefPath replaced with plain refPath
    • itemsRefType replaced with plain refType
  • All enums got moved from src/types to src/internal/constants
  • All things from src/types now get exported as type
  • All Errors now get exported as errors
  • All non-essential types get exported as types
  • utils's getName function now gets exported
  • Add PropOption addNullToEnum
  • Remove Deprecated value overwrite for VirtualOptions
  • Remove instance properties from Model type (remove & T from ModelType)
  • Add class decorator queryMethod
  • [IC] rename file optionsProp to modelOptions
  • [IC] Replace mocha & chai with jest
  • [IC] Completely remove TG_USE_NEW_ENUM from documentation & code
  • [IC] Replace almost all if-throw with the internal assertion function
  • [IC] Move VirtualPopulate cache to Reflection
  • [IC] Move Plugins cache to Reflection
  • [IC] Move Hooks cache to Reflection
  • [IC] All remaining test's models now get exported with an name (not being exported as model anymore)
hasezoey
published 7.0.0-3 •

hasezoey
published 6.5.0 •

Changelog

Source

6.5.0

  • Update Dependencies
    • semver to 7.3.2
    • tslib to 1.11.1
    • loglevel to 1.6.8
  • Remove useNewEnum type from types
  • Add warning when value is an primitive and will result in an Mixed (fixes typegoose#152)
  • Add option language_override to IndexOptions
  • Fix spelling errors in documentation
  • [IC] Replace deprecated arrayProp options with proper ones in all tests & test-models
hasezoey
published 7.0.0-2 •

hasezoey
published 7.0.0-1 •

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc