/node_modules/mongoose/History.md
https://bitbucket.org/coleman333/smartsite · Markdown · 4190 lines · 3568 code · 622 blank · 0 comment · 0 complexity · 095d0d73b30bce2f2fdc9559a60ce18c MD5 · raw file
Large files are truncated click here to view the full file
- 5.0.14 / 2018-04-09
- ===================
- * fix(schema): clone aliases and alternative option syntax correctly
- * fix(query): call utils.toObject in query.count like in query.find #6325 [lineus](https://github.com/lineus)
- * docs(populate): add middleware examples #6320 [BorntraegerMarc](https://github.com/BorntraegerMarc)
- * docs(compatibility): fix dead link #6319 [lacivert](https://github.com/lacivert)
- * docs(api): fix markdown parsing for parameters #6318 #6314 [lineus](https://github.com/lineus)
- * fix(populate): handle space-delimited paths in array populate #6296 #6284 [lineus](https://github.com/lineus)
- * fix(populate): support basic virtual populate underneath embedded discriminators #6273
- 5.0.13 / 2018-04-05
- ===================
- * docs(faq): add middleware to faq arrow function warning #6309 [lineus](https://github.com/lineus)
- * docs(schema): add example to loadClass() docs #6308
- * docs: clean up misc typos #6304 [sfrieson](https://github.com/sfrieson)
- * fix(document): apply virtuals when calling `toJSON()` on a nested path #6294
- * refactor(connection): use `client.db()` syntax rather than double-parsing the URI #6292 #6286
- * docs: document new behavior of required validator for arrays #6288 [daltones](https://github.com/daltones)
- * fix(schema): treat set() options as user-provided options #6274
- * fix(schema): clone discriminators correctly #6274
- * fix(update): make setDefaultsOnInsert not create subdoc if only default is id #6269
- * docs(discriminator): clarify 3rd argument to Model.discriminator() #2596
- 5.0.12 / 2018-03-27
- ===================
- * docs(query): updating model name in query API docs #6280 [lineus](https://github.com/lineus)
- * docs: fix typo in tests #6275 [styler](https://github.com/styler)
- * fix: add missing `.hint()` to aggregate #6272 #6251 [lineus](https://github.com/lineus)
- * docs(api): add headers to each API docs section for easer nav #6261
- * fix(query): ensure hooked query functions always run on next tick for chaining #6250
- * fix(populate): ensure populated array not set to null if it isn't set #6245
- * fix(connection): set readyState to disconnected if initial connection fails #6244 #6131
- * docs(model): make `create()` params show up correctly in docs #6242
- * fix(model): make error handlers work with MongoDB server errors and `insertMany()` #6228
- * fix(browser): ensure browser document builds defaults for embedded arrays correctly #6175
- * fix(timestamps): set timestamps when using `updateOne()` and `updateMany()` #6282 [gualopezb](https://github.com/gualopezb)
- 5.0.11 / 2018-03-19
- ===================
- * fix(update): handle $pull with $in in update validators #6240
- * fix(query): don't convert undefined to null when casting so driver `ignoreUndefined` option works #6236
- * docs(middleware): add example of using async/await with middleware #6235
- * fix(populate): apply justOne option before `completeMany()` so it works with lean() #6234
- * fix(query): ensure errors in user callbacks aren't caught in init #6195 #6178
- * docs(connections): document dbName option for Atlas connections #6179
- * fix(discriminator): make child schema nested paths overwrite parent schema paths #6076
- 4.13.12 / 2018-03-13
- ====================
- * fix(document): make virtual get() return undefined instead of null if no getters #6223
- * docs: fix url in useMongoClient error message #6219 #6217 [lineus](https://github.com/lineus)
- * fix(discriminator): don't copy `discriminators` property from base schema #6122 #6064
- 5.0.10 / 2018-03-12
- ===================
- * docs(schematype): add notes re: running setters on queries #6209
- * docs: fix typo #6208 [kamagatos](https://github.com/kamagatos)
- * fix(query): only call setters once on query filter props for findOneAndUpdate and findOneAndRemove #6203
- * docs: elaborate on connection string changes in migration guide #6193
- * fix(document): skip applyDefaults if subdoc is null #6187
- * docs: fix schematypes docs and link to them #6176
- * docs(faq): add FAQs re: array defaults and casting aggregation pipelines #6184 #6176 #6170 [lineus](https://github.com/lineus)
- * fix(document): ensure primitive defaults are set and built-in default functions run before setters #6155
- * fix(query): handle single embedded embedded discriminators in castForQuery #6027
- 5.0.9 / 2018-03-05
- ==================
- * perf: bump mongodb -> 3.0.4 to fix SSL perf issue #6065
- 5.0.8 / 2018-03-03
- ==================
- * docs: remove obsolete references to `emitIndexErrors` #6186 [isaackwan](https://github.com/isaackwan)
- * fix(query): don't cast findOne() until exec() so setters don't run twice #6157
- * fix: remove document_provider.web.js file #6186
- * fix(discriminator): support custom discriminator model names #6100 [wentout](https://github.com/wentout)
- * fix: support caching calls to `useDb()` #6036 [rocketspacer](https://github.com/rocketspacer)
- * fix(query): add omitUndefined option so setDefaultsOnInsert can kick in on undefined #6034
- * fix: upgrade mongodb -> 3.0.3 for reconnectTries: 0 blocking process exit fix #6028
- 5.0.7 / 2018-02-23
- ==================
- * fix: support eachAsync options with aggregation cursor #6169 #6168 [vichle](https://github.com/vichle)
- * docs: fix link to MongoDB compound indexes docs #6162 [br0p0p](https://github.com/br0p0p)
- * docs(aggregate): use eachAsync instead of incorrect `each()` #6160 [simllll](https://github.com/simllll)
- * chore: fix benchmarks #6158 [pradel](https://github.com/pradel)
- * docs: remove dead link to old blog post #6154 [markstos](https://github.com/markstos)
- * fix: don't convert dates to numbers when updating mixed path #6146 #6145 [s4rbagamble](https://github.com/s4rbagamble)
- * feat(aggregate): add replaceRoot, count, sortByCount helpers #6142 [jakesjews](https://github.com/jakesjews)
- * fix(document): add includedChildren flag to modifiedPaths() #6134
- * perf: don't create wrapper function if no hooks specified #6126
- * fix(schema): allow indexes on single nested subdocs for geoJSON #6113
- * fix(document): allow depopulating all fields #6073
- * feat(mongoose): add support for `useFindAndModify` option on singleton #5616
- 5.0.6 / 2018-02-15
- ==================
- * refactor(query.castUpdate): avoid creating error until necessary #6137
- * docs(api): fix missing api docs #6136 [lineus](https://github.com/lineus)
- * fix(schema): copy virtuals when using `clone()` #6133
- * fix(update): avoid digging into buffers with upsert and replaceOne #6124
- * fix(schema): support `enum` on arrays of strings #6102
- * fix(update): cast `$addToSet: [1, 2]` -> `$addToSet: { $each: [1, 2] }` #6086
- 5.0.5 / 2018-02-13
- ==================
- * docs: make > show up correctly in API docs #6114
- * fix(query): support `where()` overwriting primitive with object #6097
- * fix(schematype): don't run internal `resetId` setter on queries with _id #6093
- * fix(discriminator): don't copy `discriminators` property from base schema #6064
- * fix(utils): respect `valueOf()` when merging object for update #6059
- * docs(validation): fix typo 'maxLength' #4720
- * fix(document): apply defaults after setting initial value so default functions don't see empty doc #3781
- 5.0.4 / 2018-02-08
- ==================
- * docs: add lambda guide #6107
- * fix(connection): add `dbName` option to work around `mongodb+srv` not supporting db name in URI #6106
- * fix(schematype): fix regexp typo in ObjectId #6098 [JoshuaWise](https://github.com/JoshuaWise)
- * perf(document): re-use the modifiedPaths list #6092 [tarun1793](https://github.com/tarun1793)
- * fix: use console.info() instead of console.error() for debug output #6088 [yuristsepaniuk](https://github.com/yuristsepaniuk)
- * docs(validation): clean up runValidators and isAsync options docs for 5.x #6083
- * docs(model): use array instead of spread consistently for aggregate() #6070
- * fix(schema): make aliases handle mongoose-lean-virtuals #6069
- * docs(layout): add link to subdocs guide #6056
- * fix(query): make strictQuery: true strip out fields that aren't in the schema #6032
- * docs(guide): add notes for `strictQuery` option #6032
- 4.13.11 / 2018-02-07
- ====================
- * docs: fix links in 4.x docs #6081
- * chore: add release script that uses --tag for npm publish for 4.x releases #6063
- 5.0.3 / 2018-01-31
- ==================
- * fix: consistently use process.nextTick() to avoid sinon.useFakeTimers() causing ops to hang #6074
- * docs(aggregate): fix typo #6072 [adursun](https://github.com/adursun)
- * chore: add return type to `mongoose.model()` docs [bryant1410](https://github.com/bryant1410)
- * fix(document): depopulate push()-ed docs when saving #6048
- * fix: upgrade mongodb -> 3.0.2 #6019
- 5.0.2 / 2018-01-28
- ==================
- * fix(schema): do not overwrite default values in schema when nested timestamps are provided #6024 [cdeveas](https://github.com/cdeveas)
- * docs: fix syntax highlighting in models.jade, schematypes.jade, subdocs.jade #6058 [lineus](https://github.com/lineus)
- * fix: use lazy loading so we can build mongoose with webpack #5993 #5842
- * docs(connections): clarify multi-mongos with useMongoClient for 4.x docs #5984
- * fix(populate): handle populating embedded discriminator paths #5970
- 4.13.10 / 2018-01-28
- ====================
- * docs(model+query): add lean() option to Model helpers #5996 [aguyinmontreal](https://github.com/aguyinmontreal)
- * fix: use lazy loading so we can build mongoose with webpack #5993 #5842
- * docs(connections): clarify multi-mongos with useMongoClient for 4.x docs #5984
- * fix(populate): handle populating embedded discriminator paths #5970
- * docs(query+aggregate): add more detail re: maxTimeMS #4066
- 5.0.1 / 2018-01-19
- ==================
- * fix(document): make validate() not resolve to document #6014
- * fix(model): make save() not return DocumentNotFoundError if using fire-and-forget writes #6012
- * fix(aggregate): make options() work as advertised #6011 [spederiva](https://github.com/spederiva)
- * docs(queries): fix code samples #6008
- 5.0.0 / 2018-01-17
- ==================
- * test: refactor tests to use start fewer connections #5985 [fenanquin](https://github.com/fenanquin)
- * feat: add global bufferCommands option #5879
- * docs: new docs site and build system #5976
- * test: increase timeout on slow test cases #5968 [fenanquin](https://github.com/fenanquin)
- * fix: avoid casting out array filter elements #5965
- * feat: add Model.watch() wrapper #5964
- * chore: replace istanbul with nyc #5962 [ChristianMurphy](https://github.com/ChristianMurphy)
- 4.13.9 / 2018-01-07
- ===================
- * chore: update marked (dev dependency) re: security vulnerability #5951 [ChristianMurphy](https://github.com/ChristianMurphy)
- * fix: upgrade mongodb -> 2.2.34 for ipv6 and autoReconnect fixes #5794 #5760
- * docs: use useMongooseAggCursor for aggregate docs #2955
- 5.0.0-rc2 / 2018-01-04
- ======================
- * fix: add cleaner warning about no longer needing `useMongoClient` in 5.x #5961
- * chore: update acquit -> 0.5.1 for minor security patch #5961 [ChristianMurphy](https://github.com/ChristianMurphy)
- * docs: add docs for mongoose 4.x at http://mongoosejs.com/docs/4.x #5959
- * docs: add link to migration guide #5957
- * chore: update eslint to version 4.14.0 #5955 [ChristianMurphy](https://github.com/ChristianMurphy)
- * chore: update mocha to version 4.1.0 [ChristianMurphy](https://github.com/ChristianMurphy)
- 5.0.0-rc1 / 2018-01-02
- ======================
- * fix(index): use pluralize correctly for `mongoose.model()` #5958
- * fix: make mquery use native promises by default #5945
- * fix(connection): ensure 'joined' and 'left' events get bubbled up #5944
- 5.0.0-rc0 / 2017-12-28
- ======================
- * BREAKING CHANGE: always use mongoose aggregation cursor when using `.aggregate().cursor()` #5941
- * BREAKING CHANGE: attach query middleware when compiling model #5939
- * BREAKING CHANGE: `emitIndexErrors` is on by default, failing index build will throw uncaught error if not handled #5910
- * BREAKING CHANGE: remove precompiled browser bundle #5895
- * feat: add `mongoose.pluralize()` function #5877
- * BREAKING CHANGE: remove `passRawResult` option for `findOneAndUpdate`, use `rawResult` #5869
- * BREAKING CHANGE: implicit async validators (based on number of function args) are removed, return a promise instead #5824
- * BREAKING CHANGE: fail fast if user sets a unique index on `_id` #5820 [varunjayaraman](https://github.com/varunjayaraman)
- * BREAKING CHANGE: mapReduce resolves to an object with 2 keys rather than 2 separate args #5816
- * BREAKING CHANGE: `mongoose.connect()` returns a promise, removed MongooseThenable #5796
- * BREAKING CHANGE: query stream removed, use `cursor()` instead #5795
- * BREAKING CHANGE: use MongoDB driver 3.0.0, drop support for MongoDB server < 3.0.0 #5791 #4740
- * BREAKING CHANGE: remove support for `$pushAll`, remove `usePushEach` option #5670
- * BREAKING CHANGE: make date casting use native Date #5395 [varunjayaraman](https://github.com/varunjayaraman)
- * BREAKING CHANGE: remove `runSettersOnQuery`, always run setters on query #5340
- * BREAKING CHANGE: array of length 0 now satisfies `required: true` for arays #5139 [wlingke](https://github.com/wlingke)
- * BREAKING CHANGE: remove `saveErrorIfNotFound`, always error out if `save()` did not update a document #4973
- * BREAKING CHANGE: don't execute getters in reverse order #4835
- * BREAKING CHANGE: make boolean casting more strict #4245
- * BREAKING CHANGE: `toObject()` and `toJSON()` option parameter merges with defaults rather than overwriting #4131
- * feat: allow setting `default` on `_id` #4069
- * BREAKING CHANGE: `deleteX()` and `remove()` promise resolves to the write object result #4013
- * feat: support returning a promise from middleware functions #3779
- * BREAKING CHANGE: don't return a promise if callback specified #3670
- * BREAKING CHANGE: only cast `update()`, `updateX()`, `replaceOne()`, `remove()`, `deleteX()` in exec #3529
- * BREAKING CHANGE: sync errors in middleware functions are now handled #3483
- * BREAKING CHANGE: post hooks get flow control #3232
- * BREAKING CHANGE: deduplicate hooks when merging discriminator schema #2945
- * BREAKING CHANGE: use native promises by default, remove support for mpromise #2917
- * BREAKING CHANGE: remove `retainKeyOrder`, always use forward order when iterating through objects #2749
- * BREAKING CHANGE: `aggregate()` no longer accepts a spread #2716
- 4.13.8 / 2017-12-27
- ===================
- * docs(guide): use more up-to-date syntax for autoIndex example #5933
- * docs: fix grammar #5927 [abagh0703](https://github.com/abagh0703)
- * fix: propagate lean options to child schemas #5914
- * fix(populate): use correct model with discriminators + nested populate #5858
- 4.13.7 / 2017-12-11
- ===================
- * docs(schematypes): fix typo #5889 [gokaygurcan](https://github.com/gokaygurcan)
- * fix(cursor): handle `reject(null)` with eachAsync callback #5875 #5874 [ZacharyRSmith](https://github.com/ZacharyRSmith)
- * fix: disallow setting `mongoose.connection` to invalid values #5871 [jinasonlin](https://github.com/jinasonlin)
- * docs(middleware): suggest using `return next()` to stop middleware execution #5866
- * docs(connection): improve connection string query param docs #5864
- * fix(document): run validate hooks on array subdocs even if not directly modified #5861
- * fix(discriminator): don't treat $meta as defining projection when querying #5859
- * fix(types): handle Decimal128 when using bson-ext on server side #5850
- * fix(document): ensure projection with only $slice isn't treated as inclusive for discriminators #4991
- * fix(model): throw error when passing non-object to create() #2037
- 4.13.6 / 2017-12-02
- ===================
- * fix(schema): support strictBool option in schema #5856 [ekulabuhov](https://github.com/ekulabuhov)
- * fix(update): make upsert option consistently handle truthy values, not just booleans, for updateOne() #5839
- * refactor: remove unnecessary constructor check #2057
- * docs(query): correct function signature for .mod() helper #1806
- * fix(query): report ObjectParameterError when passing non-object as filter to find() and findOne() #1698
- 4.13.5 / 2017-11-24
- ===================
- * fix(model): handle update cast errors correctly with bulkWrite #5845 [Michael77](https://github.com/Michael77)
- * docs: add link to bufferCommands option #5844 [ralphite](https://github.com/ralphite)
- * fix(model): allow virtual ref function to return arrays #5834 [brunohcastro](https://github.com/brunohcastro)
- * fix(query): don't throw uncaught error if query filter too big #5812
- * fix(document): if setting unselected nested path, don't overwrite nested path #5800
- * fix(document): support calling `populate()` on nested document props #5703
- * fix: add `strictBool` option for schema type boolean #5344 #5211 #4245
- * docs(faq): add faq re: typeKey #1886
- * docs(query): add more detailed docs re: options #1702
- 4.13.4 / 2017-11-17
- ===================
- * fix(aggregate): add chainable .option() helper for setting arbitrary options #5829
- * fix(aggregate): add `.pipeline()` helper to get the current pipeline #5825
- * docs: grammar fixes for `unique` FAQ #5823 [mfluehr](https://github.com/mfluehr)
- * chore: add node 9 to travis #5822 [superheri](https://github.com/superheri)
- * fix(model): fix infinite recursion with recursive embedded discriminators #5821 [Faibk](https://github.com/Faibk)
- 4.13.3 / 2017-11-15
- ===================
- * chore: add node 8 to travis #5818 [superheri](https://github.com/superheri)
- * fix(document): don't apply transforms to nested docs when updating already saved doc #5807
- 4.13.2 / 2017-11-11
- ===================
- * feat(buffer): add support for subtype prop #5530
- 4.13.1 / 2017-11-08
- ===================
- * fix: accept multiple paths or array of paths to depopulate #5798 #5797 [adamreisnz](https://github.com/adamreisnz)
- * fix(document): pass default array as actual array rather than taking first element #5780
- * fix(model): increment version when $set-ing it in a save() that requires a version bump #5779
- * fix(query): don't explicitly project in discriminator key if user projected in parent path #5775 #5754
- * fix(model): cast query option to geoNear() #5765
- * fix(query): don't treat projection with just $slice as inclusive #5737
- * fix(discriminator): defer applying embedded discriminator hooks until top-level model is compiled #5706
- * docs(discriminator): add warning to always attach hooks before calling discriminator() #5706
- 4.13.0 / 2017-11-02
- ===================
- * feat(aggregate): add $addFields helper #5740 [AyushG3112](https://github.com/AyushG3112)
- * feat(connection): add connection-level bufferCommands #5720
- * feat(connection): add createCollection() helper #5712
- * feat(populate): support setting localField and foreignField to functions #5704 #5602
- * feat(query): add multipleCastError option for aggregating cast errors when casting update #5609
- * feat(populate): allow passing a function to virtual ref #5602
- * feat(schema): add excludeIndexes option to optionally prevent collecting indexes from nested schemas #5575
- * feat(model): report validation errors from `insertMany()` if using `ordered: false` and `rawResult: true` #5337
- * feat(aggregate): add pre/post aggregate middleware #5251
- * feat(schema): allow using `set` as a schema path #1939
- 4.12.6 / 2017-11-01
- ===================
- * fix(schema): make clone() copy query helpers correctly #5752
- * fix: undeprecate `ensureIndex()` and use it by default #3280
- 4.12.5 / 2017-10-29
- ===================
- * fix(query): correctly handle `$in` and required for $pull and update validators #5744
- * feat(aggegate): add $addFields pipeline operator #5740 [AyushG3112](https://github.com/AyushG3112)
- * fix(document): catch sync errors in document pre hooks and report as error #5738
- * fix(populate): handle slice projections correctly when automatically selecting populated fields #5737
- * fix(discriminator): fix hooks for embedded discriminators #5706 [wlingke](https://github.com/wlingke)
- * fix(model): throw sane error when customer calls `mongoose.Model()` over `mongoose.model()` #2005
- 4.12.4 / 2017-10-21
- ===================
- * test(plugins): add coverage for idGetter with id as a schema property #5713 [wlingke](https://github.com/wlingke)
- * fix(model): avoid copying recursive $$context object when creating discriminator after querying #5721
- * fix(connection): ensure connection promise helpers are removed before emitting 'connected' #5714
- * docs(schema): add notes about runSettersOnQuery to schema setters #5705
- * fix(collection): ensure queued operations run on the next tick #5562
- 4.12.3 / 2017-10-16
- ===================
- * fix(connection): emit 'reconnect' event as well as 'reconnected' for consistency with driver #5719
- * fix: correctly bubble up left/joined events for replica set #5718
- * fix(connection): allow passing in `autoIndex` as top-level option rather than requiring `config.autoIndex` #5711
- * docs(connection): improve docs regarding reconnectTries, autoReconnect, and bufferMaxEntries #5711
- * fix(query): handle null with addToSet/push/pull/pullAll update validators #5710
- * fix(model): handle setDefaultsOnInsert option for bulkWrite updateOne and updateMany #5708
- * fix(query): avoid infinite recursion edge case when cloning a buffer #5702
- 4.12.2 / 2017-10-14
- ===================
- * docs(faq): add FAQ about using arrow functions for getters/setters, virtuals, and methods #5700
- * docs(schema): document the childSchemas property and add to public API #5695
- * fix(query): don't project in populated field if parent field is already projected in #5669
- * fix: bump mongodb -> 2.2.33 for issue with autoReconnect #4513
- 4.12.1 / 2017-10-08
- ===================
- * fix(document): create new doc when setting single nested, no more set() on copy of priorVal #5693
- * fix(model): recursively call applyMethods on child schemas for global plugins #5690
- * docs: fix bad promise lib example on home page #5686
- * fix(query): handle false when checking for inclusive/exclusive projection #5685
- * fix(discriminator): allow reusing child schema #5684
- * fix: make addToSet() on empty array with subdoc trigger manual population #5504
- 4.12.0 / 2017-10-02
- ===================
- * docs(validation): add docs coverage for ValidatorError.reason #5681
- * feat(discriminator): always add discriminatorKey to base schema to allow updating #5613
- * fix(document): make nested docs no longer inherit parent doc's schema props #5586 #5546 #5470
- * feat(query): run update validators on $pull and $pullAll #5555
- * feat(query): add .error() helper to query to error out in pre hooks #5520
- * feat(connection): add dropCollection() helper #5393
- * feat(schema): add schema-level collation option #5295
- * feat(types): add `discriminator()` function for single nested subdocs #5244
- * feat(document): add $isDeleted() getter/setter for better support for soft deletes #4428
- * feat(connection): bubble up reconnectFailed event when driver gives up reconnecting #4027
- * fix(query): report error if passing array or other non-object as filter to update query #3677
- * fix(collection): use createIndex() instead of deprecated ensureIndex() #3280
- 4.11.14 / 2017-09-30
- ====================
- * chore: add nsp check to the CI build #5679 [hairyhenderson](https://github.com/hairyhenderson)
- * fix: bump mquery because of security issue with debug package #5677 #5675 [jonathanprl](https://github.com/jonathanprl)
- * fix(populate): automatically select() populated()-ed fields #5669
- * fix(connection): make force close work as expected #5664
- * fix(document): treat $elemMatch as inclusive projection #5661
- * docs(model/query): clarify which functions fire which middleware #5654
- * fix(model): make `init()` public and return a promise that resolves when indexes are done building #5563
- 4.11.13 / 2017-09-24
- ====================
- * fix(query): correctly run replaceOne with update validators #5665 [sime1](https://github.com/sime1)
- * fix(schema): replace mistype in setupTimestamp method #5656 [zipp3r](https://github.com/zipp3r)
- * fix(query): avoid throwing cast error for strict: throw with nested id in query #5640
- * fix(model): ensure class gets combined schema when using class syntax with discriminators #5635
- * fix(document): handle setting doc array to array of top-level docs #5632
- * fix(model): handle casting findOneAndUpdate() with overwrite and upsert #5631
- * fix(update): correctly handle $ in updates #5628
- * fix(types): handle manual population consistently for unshift() and splice() #5504
- 4.11.12 / 2017-09-18
- ====================
- * docs(model): asterisk should not render as markdown bullet #5644 [timkinnane](https://github.com/timkinnane)
- * docs: use useMongoClient in connection example #5627 [GabrielNicolasAvellaneda](https://github.com/GabrielNicolasAvellaneda)
- * fix(connection): call callback when initial connection failed #5626
- * fix(query): apply select correctly if a given nested schema is used for 2 different paths #5603
- * fix(document): add graceful fallback for setting a doc array value and `pull()`-ing a doc #3511
- 4.11.11 / 2017-09-10
- ====================
- * fix(connection): properly set readyState in response to driver 'close' and 'reconnect' events #5604
- * fix(document): ensure single embedded doc setters only get called once, with correct value #5601
- * fix(timestamps): allow enabling updatedAt without createdAt #5598
- * test: improve unique validator test by making create run before ensureIndex #5595 #5562
- * fix(query): ensure find callback only gets called once when post init hook throws error #5592
- 4.11.10 / 2017-09-03
- ====================
- * docs: add KeenIO tracking #5612
- * fix(schema): ensure validators declared with `.validate()` get copied with clone() #5607
- * fix: remove unnecessary jest warning #5480
- * fix(discriminator): prevent implicit discriminator schema id from clobbering base schema custom id #5591
- * fix(schema): hide schema objectid warning for non-hex strings of length 24 #5587
- * docs(populate): use story schema defined key author instead of creator #5578 [dmric](https://github.com/dmric)
- * docs(document): describe usage of `.set()` #5576
- * fix(document): ensure correct scope in single nested validators #5569
- * fix(populate): don't mark path as populated until populate() is done #5564
- * fix(document): make push()-ing a doc onto an empty array act as manual population #5504
- * fix(connection): emit timeout event on socket timeout #4513
- 4.11.9 / 2017-08-27
- ===================
- * fix(error): avoid using arguments.callee because that breaks strict mode #5572
- * docs(schematypes): fix spacing #5567
- * fix(query): enforce binary subtype always propagates to mongodb #5551
- * fix(query): only skip castForQuery for mongoose arrays #5536
- * fix(browser): rely on browser entrypoint to decide whether to use BrowserDocument or NodeDocument #5480
- 4.11.8 / 2017-08-23
- ===================
- * feat: add warning about using schema ObjectId as type ObjectId #5571 [efkan](https://github.com/efkan)
- * fix(schema): allow setting `id` property after schema was created #5570 #5548
- * docs(populate): remove confusing _ from populate docs #5560
- * fix(connection): expose parsed uri fields (host, port, dbname) when using openUri() #5556
- * docs: added type boolean to options documentation #5547 [ndabAP](https://github.com/ndabAP)
- * test: add test coverage for stopping/starting server #5524
- * fix(aggregate): pull read preference from schema by default #5522
- 4.11.7 / 2017-08-14
- ===================
- * fix: correct properties when calling toJSON() on populated virtual #5544 #5442 [davidwu226](https://github.com/davidwu226)
- * docs: fix spelling #5535 [et](https://github.com/et)
- * fix(error): always set name before stack #5533
- * fix: add warning about running jest in jsdom environment #5532 #5513 #4943
- * fix(document): ensure overwriting a doc array cleans out individual docs #5523
- * fix(schema): handle creating arrays of single nested using type key #5521
- * fix: upgrade mongodb -> 2.2.31 to support user/pass options #5419
- 4.11.6 / 2017-08-07
- ===================
- * fix: limiting number of async operations per time in insertMany #5529 [andresattler](https://github.com/andresattler)
- * fix: upgrade mongodb -> 2.2.30 #5517
- * fix(browserDocument): prevent stack overflow caused by double-wrapping embedded doc save() in jest #5513
- * fix(document): clear single nested doc when setting to empty object #5506
- * fix(connection): emit reconnected and disconnected events correctly with useMongoClient #5498
- * fix(populate): ensure nested virtual populate gets set even if top-level property is null #5431
- 4.11.5 / 2017-07-30
- ===================
- * docs: fix link to $lookup #5516 [TalhaAwan](https://github.com/TalhaAwan)
- * fix: better parallelization for eachAsync #5502 [lchenay](https://github.com/lchenay)
- * docs(document): copy docs for save from model to doc #5493
- * fix(document): handle dotted virtuals in toJSON output #5473
- * fix(populate): restore user-provided limit after mutating so cursor() works with populate limit #5468
- * fix(query): don't throw StrictModeError if geo query with upsert #5467
- * fix(populate): propagate readPreference from query to populate queries by default #5460
- * docs: warn not to use arrow functions for statics and methods #5458
- * fix(query): iterate over all condition keys for setDefaultsOnInsert #5455
- * docs(connection): clarify server/replset/mongos option deprecation with useMongoClient #5442
- 4.11.4 / 2017-07-23
- ===================
- * fix: handle next() errors in `eachAsync()` #5486 [lchenay](https://github.com/lchenay)
- * fix(schema): propagate runSettersOnQuery option to implicitly created schemas #5479 [https://github.com/ValYouW]
- * fix(query): run castConditions() correctly in update ops #5477
- * fix(query): ensure castConditions called for findOne and findOneAnd* #5477
- * docs: clarify relationship between $lookup and populate #5475 [TalhaAwan](https://github.com/TalhaAwan)
- * test: add coverage for arrays of arrays [zbjornson](https://github.com/zbjornson)
- * fix(middleware): ensure that error handlers for save get doc as 2nd param #5466
- * fix: handle strict: false correctly #5454 #5453 [wookieb](https://github.com/wookieb)
- * fix(query): apply schema excluded paths if only projection is a $slice #5450
- * fix(query): correct discriminator handling for schema `select: false` fields in schema #5448
- * fix(cursor): call next() in series when parallel option used #5446
- * chore: load bundled driver first to avoid packaging problem #5443 [prototypeme](https://github.com/prototypeme)
- * fix(query): defer condition casting until final exec #5434
- * fix(aggregate): don't rely on mongodb aggregate to put a cursor in the callback #5394
- * docs(aggregate): add useMongooseAggCursor docs #5394
- * docs(middleware): clarify context for document, query, and model middleware #5381
- 4.11.3 / 2017-07-14
- ===================
- * fix(connection): remove .then() before resolving to prevent infinite recursion #5471
- 4.11.2 / 2017-07-13
- ===================
- * docs: fix comment typo in connect example #5435 [ConnorMcF](https://github.com/ConnorMcF)
- * fix(update): correctly cast document array in update validators with exec() #5430
- * fix(connection): handle autoIndex with useMongoClient #5423
- * fix(schema): handle `type: [Array]` in schemas #5416
- * fix(timestamps): if overwrite is set and there's a $set, use $set instead of top-level update #5413
- * fix(document): don't double-validate deeply nested doc array elements #5411
- * fix(schematype): clone default objects so default not shared across object instances unless `shared` specified #5407
- * fix(document): reset down the nested subdocs when resetting parent doc #5406
- * fix: don't pass error arg twice to error handlers #5405
- * fix(connection): make openUri() return connection decorated with then() and catch() #5404
- * fix: enforce $set on an array must be an array #5403
- * fix(document): don't crash if calling `validateSync()` after overwriting doc array index #5389
- * fix(discriminator): ensure discriminator key doesn't count as user-selected field for projection #4629
- 4.11.1 / 2017-07-02
- ===================
- * docs: populate virtuals fix justOne description #5427 [fredericosilva](https://github.com/fredericosilva)
- * fix(connection): make sure to call onOpen in openUri() #5404
- * docs(query): justOne is actually single, and it default to false #5402 [zbjornson](https://github.com/zbjornson)
- * docs: fix small typo in lib/schema.js #5398 #5396 [pjo336](https://github.com/pjo336)
- * fix: emit remove on single nested subdocs when removing parent #5388
- * fix(update): handle update with defaults and overwrite but no update validators #5384
- * fix(populate): handle undefined refPath values in middle of array #5377
- * fix(document): ensure consistent setter context for single nested #5363
- * fix(query): support runSettersOnQuery as query option #5350
- 4.11.0 / 2017-06-25
- ===================
- * feat(query): execute setters with query as context for `runSettersOnQuery` #5339
- * feat(model): add translateAliases function #5338 [rocketspacer](https://github.com/rocketspacer)
- * feat(connection): add `useMongoClient` and `openUri` functions, deprecate current connect logic #5304
- * refactor(schema): make id virtual not access doc internals #5279
- * refactor: handle non-boolean lean #5279
- * feat(cursor): add addCursorFlag() support to query and agg cursors #4814
- * feat(cursor): add parallel option to eachAsync #4244
- * feat(schema): allow setting custom error constructor for custom validators #4009
- 4.10.8 / 2017-06-21
- ===================
- * docs: fix small formatting typo on schematypes #5374 [gianpaj](https://github.com/gianpaj)
- * fix(model): allow null as an _id #5370
- * fix(populate): don't throw async uncaught exception if model not found in populate #5364
- * fix: correctly cast decimals in update #5361
- * fix(error): don't use custom getter for ValidationError message #5359
- * fix(query): handle runSettersOnQuery in built-in _id setter #5351
- * fix(document): ensure consistent context for nested doc custom validators #5347
- 4.10.7 / 2017-06-18
- ===================
- * docs(validation): show overriding custom validator error with 2nd cb arg #5358
- * fix: `parseOption` mutates user passed option map #5357 [igwejk](https://github.com/igwejk)
- * docs: fix guide.jade typo #5356 [CalebAnderson2014](https://github.com/CalebAnderson2014)
- * fix(populate): don't set populate virtual to ids when match fails #5336
- * fix(query): callback with cast error if remove and delete* args have a cast error #5323
- 4.10.6 / 2017-06-12
- ===================
- * fix(cursor): handle custom model option for populate #5334
- * fix(populate): handle empty virtual populate with Model.populate #5331
- * fix(model): make ensureIndexes() run with autoIndex: false unless called internally #5328 #5324 #5317
- * fix: wait for all connections to close before resolving disconnect() promise #5316
- * fix(document): handle setting populated path with custom typeKey in schema #5313
- * fix(error): add toJSON helper to ValidationError so `message` shows up with JSON.stringify #5309
- * feat: add `getPromiseConstructor()` to prevent need for `mongoose.Promise.ES6` #5305
- * fix(document): handle conditional required with undefined props #5296
- * fix(model): clone options before inserting in save() #5294
- * docs(populate): clarify that multiple populate() calls on same path overwrite #5274
- 4.10.5 / 2017-06-06
- ===================
- * chore: improve contrib guide for building docs #5312
- * fix(populate): handle init-ing nested virtuals properly #5311
- * fix(update): report update validator error if required path under single nested doc not set
- * fix(schema): remove default validate pre hook that was causing issues with jest #4943
- 4.10.4 / 2017-05-29
- ===================
- * chore: dont store test data in same directory #5303
- * chore: add data dirs to npmignore #5301 [Starfox64](https://github.com/Starfox64)
- * docs(query): add docs about runSettersOnQuery #5300
- 4.10.3 / 2017-05-27
- ===================
- * docs: correct inconsistent references to updateOne and replaceOne #5297 [dhritzkiv](https://github.com/dhritzkiv)
- * docs: fix dropdowns in docs #5292 [nathanallen](https://github.com/nathanallen)
- * docs: add description of alias option #5287
- * fix(document): prevent infinite loop if validating nested array #5282
- * fix(schema): correctly handle ref ObjectIds from different mongoose libs #5259
- * fix(schema): load child class methods after base class methods to allow override #5227
- 4.10.2 / 2017-05-22
- ===================
- * fix: bump ms -> 2.0.0 and mquery -> 2.3.1 for minor security vulnerability #5275
- 4.10.1 / 2017-05-21
- ===================
- * fix(aggregate): handle sorting by text score correctly #5258
- * fix(populate): handle doc.populate() with virtuals #5240
- * fix(schema): enforce that `_id` is never null #5236
- 4.10.0 / 2017-05-18
- ===================
- * fix(schema): update clone method to include indexes #5268 [clozanosanchez](https://github.com/clozanosanchez)
- * feat(schema): support aliases #5184 [rocketspacer](https://github.com/rocketspacer)
- * feat(aggregate): add mongoose-specific aggregation cursor option #5145
- * refactor(model): make sharding into a plugin instead of core #5105
- * fix(document): make nested doc mongoose internals not enumerable again #5078
- * feat(model): pass params to pre hooks #5064
- * feat(timestamps): support already defined timestamp paths in schema #4868
- * feat(query): add runSettersOnQuery option #4569
- * fix(query): add strictQuery option that throws when not querying on field not in schema #4136
- * fix(update): more complete handling for overwrite option with update validators #3556
- * feat: support `unique: true` in arrays via the mongoose-unique-array plugin #3347
- * fix(model): always emit 'index', even if no indexes #3347
- * fix(schema): set unique indexes on primitive arrays #3347
- * feat(validation): include failed paths in error message and inspect output #3064 #2135
- * fix(model): return saved docs when create() fails #2190
- 4.9.10 / 2017-05-17
- ===================
- * fix(connection): ensure callback arg to openSet() is handled properly #5249
- * docs: remove dead plugins repo and add content links #5247
- * fix(model): skip index build if connecting after model init and autoIndex false #5176
- 4.9.9 / 2017-05-13
- ==================
- * docs: correct value for Query#regex() #5230
- * fix(connection): don't throw if .catch() on open() promise #5229
- * fix(schema): allow update with $currentDate for updatedAt to succeed #5222
- * fix(model): versioning doesn't fail if version key undefined #5221 [basileos](https://github.com/basileos)
- * fix(document): don't emit model error if callback specified for consistency with docs #5216
- * fix(document): handle errors in subdoc pre validate #5215
- 4.9.8 / 2017-05-07
- ==================
- * docs(subdocs): rewrite subdocs guide #5217
- * fix(document): avoid circular JSON if error in doc array under single nested subdoc #5208
- * fix(document): set intermediate empty objects for deeply nested undefined paths before path itself #5206
- * fix(schema): throw error if first param to schema.plugin() is not a function #5201
- * perf(document): major speedup in validating subdocs (50x in some cases) #5191
- 4.9.7 / 2017-04-30
- ==================
- * docs: fix typo #5204 [phutchins](https://github.com/phutchins)
- * fix(schema): ensure correct path for deeply nested schema indexes #5199
- * fix(schema): make remove a reserved name #5197
- * fix(model): handle Decimal type in insertMany correctly #5190
- * fix: upgrade kareem to handle async pre hooks correctly #5188
- * docs: add details about unique not being a validator #5179
- * fix(validation): handle returning a promise with isAsync: true #5171
- 4.9.6 / 2017-04-23
- ==================
- * fix: update `parentArray` references when directly assigning document arrays #5192 [jhob](https://github.com/jhob)
- * docs: improve schematype validator docs #5178 [milesbarr](https://github.com/milesbarr)
- * fix(model): modify discriminator() class in place #5175
- * fix(model): handle bulkWrite updateMany casting #5172 [tzellman](https://github.com/tzellman)
- * docs(model): fix replaceOne example for bulkWrite #5168
- * fix(document): don't create a new array subdoc when creating schema array #5162
- * fix(model): merge query hooks from discriminators #5147
- * fix(document): add parent() function to subdocument to match array subdoc #5134
- 4.9.5 / 2017-04-16
- ==================
- * fix(query): correct $pullAll casting of null #5164 [Sebmaster](https://github.com/Sebmaster)
- * docs: add advanced schemas docs for loadClass #5157
- * fix(document): handle null/undefined gracefully in applyGetters() #5143
- * fix(model): add resolveToObject option for mapReduce with ES6 promises #4945
- 4.9.4 / 2017-04-09
- ==================
- * fix(schema): clone query middleware correctly #5153 #5141 [clozanosanchez](https://github.com/clozanosanchez)
- * docs(aggregate): fix typo #5142
- * fix(query): cast .$ update to underlying array type #5130
- * fix(populate): don't mutate populate result in place #5128
- * fix(query): handle $setOnInsert consistent with $set #5126
- * docs(query): add strict mode option for findOneAndUpdate #5108
- 4.9.3 / 2017-04-02
- ==================
- * docs: document.js fixes for functions prepended with `$` #5131 [krmannix](https://github.com/krmannix)
- * fix: Avoid exception on constructor check #5129 [monkbroc](https://github.com/monkbroc)
- * docs(schematype): explain how to use `isAsync` with validate() #5125
- * docs(schematype): explain custom message with required function #5123
- * fix(populate): only apply refPath duplicate id optimization if not array #5114
- * fix(document): copy non-objects to doc when init() #5111
- * perf(populate): dont clone whole options every time #5103
- * feat(document): add isDirectSelected() to minimize isSelected() changes #5063
- * docs(schematypes): explain some subtleties with arrays #5059
- 4.9.2 / 2017-03-26
- ==================
- * fix(discriminator): handle class names consistently #5104
- * fix(schema): make clone() work with reusing discriminator schemas #5098
- * fix(querycursor): run pre find hooks with .cursor() #5096
- * fix(connection): throw error if username:password includes @ or : #5091
- * fix(timestamps): handle overwriting createdAt+updatedAt consistently #5088
- * fix(document): ensure subdoc post save runs after parent save #5085
- * docs(model): improve update docs #5076 [bertolo1988](https://github.com/bertolo1988)
- 4.9.1 / 2017-03-19
- ==================
- * fix(query): handle $type for arrays #5080 #5079 [zoellner](https://github.com/zoellner)
- * fix(model): handle ordered param for `insertMany` validation errors #5072 [sjorssnoeren](https://github.com/sjorssnoeren)
- * fix(populate): avoid duplicate ids in dynref queries #5054
- * fix(timestamps): dont set timestamps in update if user set it #5045
- * fix(update): dont double-call setters on arrays #5041
- * fix: upgrade driver -> 2.2.25 for jest fix #5033
- * fix(model): get promise each time save() is called rather than once #5030
- * fix(connection): make connect return value consistent #5006
- 4.9.0 / 2017-03-13
- ==================
- * feat(document): return this from `depopulate()` #5027
- * fix(drivers): stop emitting timeouts as errors #5026
- * feat(schema): add a clone() function for schemas #4983
- * feat(query): add rawResult option to replace passRawResult, deprecate passRawResult #4977 #4925
- * feat(schematype): support isAsync validator option and handle returning promises from validators, deprecate implicit async validators #4290
- * feat(query): add `replaceOne()`, `deleteOne()`, `deleteMany()` #3998
- * feat(model): add `bulkWrite()` #3998
- 4.8.7 / 2017-03-12
- ==================
- * fix(model): if last arg in spread is falsy, treat it as a callback #5061
- * fix(document): use $hook instead of hook to enable 'hook' as a path name #5047
- * fix(populate): dont select foreign field if parent field is selected #5037
- * fix(populate): handle passing no args to query.populate #5036
- * fix(update): use correct method for casting nested arrays #5032
- * fix(discriminator): handle array discriminators when casting $push #5009
- 4.8.6 / 2017-03-05
- ==================
- * docs(document): remove text that implies that transform is false by default #5023
- * fix(applyHooks): dont wrap a function if it is already wrapped #5019
- * fix(document): ensure nested docs' toObject() clones #5008
- 4.8.5 / 2017-02-25
- ==================
- * fix: check for empty schemaPath before accessing property $isMongooseDocumentArray #5017 [https://github.com/randyhoulahan](randyhoulahan)
- * fix(discriminators): handle create() and push() for embedded discriminators #5001
- * fix(querycursor): ensure close emitted after last data event #4998
- * fix(discriminators): remove fields not selected in child when querying by base model #4991
- 4.8.4 / 2017-02-19
- ==================
- * docs(discriminators): explain embedded discriminators #4997
- * fix(query): fix TypeError when findOneAndUpdate errors #4990
- * fix(update): handle nested single embedded in update validators correctly #4989
- * fix(browser): make browser doc constructor not crash #4987
- 4.8.3 / 2017-02-15
- ==================
- * chore: upgrade mongodb driver -> 2.2.24
- * docs(connections): addd some details about callbacks #4986
- * fix: ensure class is created with new keyword #4972 #4947 [benhjames](https://github.com/benhjames)
- * fix(discriminator): add applyPluginsToDiscriminators option #4965
- * fix(update): properly cast array subdocs when casting update #4960
- * fix(populate): ensure foreign field is selected for virtual populate #4959
- * docs(query): document some query callback params #4949
- * fix(document): ensure errors in validators get caught #2185
- 4.8.2 / 2017-02-10
- ==================
- * fix(update): actually run validators on addToSet #4953
- * fix(update): improve buffer error handling #4944 [ValYouW](https://github.com/ValYouW)
- * fix(discriminator): handle subclassing with loadClass correctly #4942
- * fix(query): allow passing Map to sort() #4941
- * fix(document): handle setting discriminator doc #4935
- * fix(schema): return correct value from pre init hook #4928
- * fix(query): ensure consistent params in error handlers if pre hook errors #4927
- 4.8.1 / 2017-01-30
- ==================
- * fix(query): handle $exists for arrays and embedded docs #4937
- * fix(query): handle passing string to hint() #4931
- 4.8.0 / 2017-01-28
- ==================
- * feat(schema): add saveErrorIfNotFound option and $where property #4924 #4004
- * feat(query): add $in implicitly if passed an array #4912 [QuotableWater7](https://github.com/QuotableWater7)
- * feat(aggregate): helper for $facet #4904 [varunjayaraman](https://github.com/varunjayaraman)
- * feat(query): add collation method #4839
- * feat(schema): propogate strict option to implicit array subschemas #4831 [dkrosso](https://github.com/dkrosso)
- * feat(aggregate): add helper for graphLookup #4819 [varunjayaraman](https://github.com/varunjayaraman)
- * feat(types): support Decimal128 #4759
- * feat(aggregate): add eachAsync() to aggregate cursor #4300
- * feat(query): add updateOne and updateMany #3997
- * feat(model): support options for insertMany #3893
- * fix(document): run validation on single nested docs if not directly modified #3884
- * feat(model): use discriminator constructor based on discriminatorKey in create() #3624
- * feat: pass collection as context to debug function #3261
- * feat(query): support push and addToSet for update validators #2933
- * perf(document): refactor registerHooksFromSchema so hooks are defined on doc prototype #2754
- * feat(types): add discriminator() function to doc arrays #2723 #1856
- * fix(populate): return an error if sorting underneath a doc array #2202
- 4.7.9 / 2017-01-27
- ==================
- * fix(query): handle casting $exists under $not #4933
- * chore: upgrade mongodb -> 2.2.22 re: #4931
- 4.7.8 / 2017-01-23
- ==================
- * fix(populate): better handling for virtual populate under arrays #4923
- * docs: upgrade contributors count #4918 [AdamZaczek](https://github.com/AdamZaczek)
- * fix(query): don't set nested path default if setting parent path #4911
- * docs(promise): add missing bracket #4907
- * fix(connection): ensure error handling is consistently async #4905
- * fix: handle authMechanism in query string #4900
- * fix(document): ensure error handlers run for validate #4885
- 4.7.7 / 2017-01-15
- ==================
- * fix(utils): don't crash if to[key] is null #4881
- * fix: upgrade mongodb -> 2.2.21 #4867
- * fix: add a toBSON to documents for easier querying #4866
- * fix: suppress bluebird warning #4854 [davidwu226](https://github.com/davidwu226)
- * fix(populate): handle nested virtuals in virtual populate #4851
- 4.7.6 / 2017-01-02
- ==================
- * fix(model): allow passing non-array to insertMany #4846
- * fix(populate): use base model name if no discriminator for backwards compat #4843
- * fix: allow internal validate callback to be optional #4842 [arciisine](https://github.com/arciisine)
- * fix(document): don't skip pointCut if save not defined (like in browser doc) #4841
- * chore: improve benchmarks #4838 [billouboq](https://github.com/billouboq)
- * perf: remove some unused parameters #4837 [billouboq](https://github.com/billouboq)
- * fix(query): don't call error handler if passRawResult is true and no error occurred #4836
- 4.7.5 / 2016-12-26
- ==================
- * docs(model): fix spelling mistake #4828 [paulinoj](https://github.com/paulinoj)
- * fix(aggregate): remove unhandled rejection when using aggregate.then() #4824
- * perf: remove try/catch that kills optimizer #4821
- * fix(model): handles populating with discriminators that may not have a ref #4817
- * fix(document): handle setting array of discriminators #3575
- 4.7.4 / 2016-12-21
- ==================
- * docs: fix typo #4810 [GEEKIAM](https://github.com/GE…