- types: add VirtualsForModel helper to make it easier to set the correct type overrides for lean()
- BREAKING CHANGE: test on node v16+, drop support for Node v14
- BREAKING CHANGE: remove array.prototype.flat polyfill
- feat: add
enabledByDefault
option #68 #52 - fix: allow calling
parent()
on parent, allow accessing parent's virtual from child subdoc #73
- fix(types): allow default import, named import, wildcard import #60 IslandRhythms
- fix: set populate virtuals to
null
or[]
if no results based onjustOne
for Mongoose 6 Automattic/mongoose#10816
- fix: upgrade to mpath ^0.8.4 to fix security warnings #54
- fix: handle calling
parent()
in virtual when usingfind()
with multiple results #51 - fix: require Mongoose >= 5.11.10 for fix to #48
- fix: propagate
virtuals: true
to subdocuments #47 #43
- fix: fix .length invalid property access on null #44 maximilianschmid
- fix: support nested virtuals #43 rdougan
- fix: skip non-existent virtuals when passing a list of virtual names to
lean()
#42
- fix: make
parent()
tracking support case where array of subdocs contains primitives #41
- fix: avoid WeakMap error when using arrays with
null
elements #41
- feat: add top-level
parent()
function that lets you get the subdocument's parent even though the subdoc is lean #40
- fix: avoid TypeError when there are multiple discriminators #39
- fix: apply virtuals in doubly nested document arrays #38
- fix build for node v6 and v4
- fix: discriminators when the query result is an array #37 #36 FERNman
- fix: avoid infinite recursion on recursive schemas with virtuals #33
- fix: allow explicitly selecting subdocument virtuals #35 #34 ChrisLahaye
- fix: skip checking discriminators if result is null #32
- fix: correctly pass existing field value to applyGetters #31 makinde
- fix: get virtuals from discriminator schema if discriminator key set #30 makinde
- feat: attach lean virtuals to result of
findOneAndRemove()
andfindOneAndDelete()
#29 isaacdecoded
- fix: use post order traversal so child schema virtuals are set before parent schema #28
- fix: check for empty path #26 thoglen
- fix: avoid trying to virtualize undefined doc #24 AlexandreGymlib
- fix: handle virtuals in nested schemas with find() #22
- fix: support Mongoose 5.x cursors #21
- feat: support virtuals in nested schemas #20
- fix: support
ref
in virtual options #19 linusbrolin
- fix: attach all virtuals as opposed to just one #14 artemkobets
- fix: fix one more issue with
eachAsync()
#12 nico29
- fix: support Mongoose cursor's
eachAsync()
#9
- docs: link to new docs site on plugins.mongoosejs.io
- fix: delay checking virtuals until the middleware for 5.0 support #6