Releases: mernxl/mongoose-id-assigner
v4.0.1
v3.1.0
v3.0.0-err
Version number issues with semantic versioning
v3.0.0
3.0.0 (2019-05-12)
Bug Fixes
document must have an _id before saving
issue (e6a854c)- flow-types: change typescript Schema to flow MongooseSchema (c4c9f86)
- flow-types: update flow types with latest changes (2c2a675)
BREAKING CHANGES
@see Automattic/mongoose#5073
MongooseIdAssigner WILL NOT BE initialised using Models.
Plugin can now only be used by calling schema.plugin(MongooseIdAssigner, options)
or schema.plugin(MongooseIdAssigner.plugin, options)
To get IdAssigner Instance,
1: Get from localStateStore.getIdAssigner(schema)
2: Use const IA = MongooseIdAssigner.plugin(schema, options)
3: Use const IA = new MongooseIdAssigner(schema, options)
v2.0.2
2.0.2 (2019-05-11)
Bug Fixes
-
dependencies:
document must have an _id before saving
issue (2fec767)
@see Automattic/mongoose#5073pre-save
hooks not triggered if set after initialising model for mongoose >= 4.8.0, so all models whose Assigner was initialised using MongooseIdAssigner constructor will fail, but those with MongooseIdAssigner.plugin is ok. -
typings: use
FieldConfigTypes
on FieldConfigtype
field instead of hard-coding (af56d13)
v2.0.1
v2.0.0
2.0.0 (2018-08-11)
Performance Improvements
- initialise:
MongooseIdAssigner
constructor now takes aModelInstance
(bba5a1c)
BREAKING CHANGES
- initialise:
MongooseIdAssigner.plugin
will NOT return IdAssigner instance. It is intended to be used only with like so ->schema.plugin(MongooseIdAssigner.plugin, options)
.
UseMongooseIdAssigner Constructor
to get Instance. It takes parametersModelInstance
andAssignerOptions
. The interfaceAssignerOptions
also changed, modelName not needed. UseAssignerPluginOptions
when working withschema.plugin(..., options)
.