Skip to content

Releases: mernxl/mongoose-id-assigner

v4.0.1

25 Sep 23:02
Compare
Choose a tag to compare

Features

  • package now supports uuid v8.x.x

BREAKING CHANGE:

  • drop support for uuid v7.x.x and less

v3.1.0

05 Dec 08:55
e9489ac
Compare
Choose a tag to compare

Features

  • optimise and test code for various versions of MongoDB i.e. v3.4, v3.6, v4.0, v4.2

Code base optimized and tested against

MongoDB v3.4, v3.6, v4.0, v4.2
Node version v8, v10 and v12

There was an issue why publishing from previous pull #2 . Redo to ensure correct semver numbers set

v3.0.0-err

05 Dec 08:05
215de33
Compare
Choose a tag to compare

Version number issues with semantic versioning

v3.0.0

12 May 01:47
Compare
Choose a tag to compare

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

11 May 22:42
Compare
Choose a tag to compare

2.0.2 (2019-05-11)

Bug Fixes

  • dependencies: document must have an _id before saving issue (2fec767)
    @see Automattic/mongoose#5073 pre-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 FieldConfig type field instead of hard-coding (af56d13)

v2.0.1

11 Aug 10:01
Compare
Choose a tag to compare

2.0.1 (2018-08-11)

Bug Fixes

v2.0.0

11 Aug 03:09
Compare
Choose a tag to compare

2.0.0 (2018-08-11)

Performance Improvements

  • initialise: MongooseIdAssigner constructor now takes a ModelInstance (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).
    Use MongooseIdAssigner Constructor to get Instance. It takes parameters ModelInstance and AssignerOptions. The interface AssignerOptions also changed, modelName not needed. Use AssignerPluginOptions when working with schema.plugin(..., options).

v1.3.0

11 Aug 01:46
Compare
Choose a tag to compare

1.3.0 (2018-08-11)

Breaking Changes, Unstable

Features

  • next-id: minimal implementation of getNextId, using getOnly (89679b9)

v1.2.1

27 Jul 11:01
Compare
Choose a tag to compare

1.2.1 (2018-07-27)

Bug Fixes

  • next-id: wrap string-incrementer error in throw-plugin-error (c4bd451)
  • fix Stored Options not Found for Ready Model! when assigner not manually initialised (2a31a18)

v1.2.0

26 Jul 21:09
Compare
Choose a tag to compare

1.2.0 (2018-07-26)

Bug Fixes

  • give collection() error on read model from LocalStateStore more context (ab51ade)
  • assigner-options: fix _id field not defaulting to objectId (abe1174)

Features

  • assigner-options: enforce latest app options overrides db-options (1488398)