Releases: Automattic/mongoose
Releases · Automattic/mongoose
7.0.5
7.0.5 / 2023-04-24
- fix(schema): correctly handle uuids with populate() #13317 #13267
- fix(schema): add clusteredIndex to schema options #13286 jakesjews
- fix(document): use collection.findOne() for saving docs with no changes to avoid firing findOne middleware #13298
- types(schema): avoid circular constraint in TSchemaOptions with --incremental by deferring ResolveSchemaOptions<> #13291 #13129
- docs(subdocs): fix mention of subdocument ".remove" function #13312 hasezoey
- docs: add mongoose.Promise removal to migrating to 7 guide #13295
- docs: updated formatting of Error Handling section to better highlight the two kinds of possible errors #13279 Ankit-Mandal
- docs: fix broken link #13301 #13281
7.0.4
7.0.4 / 2023-04-17
- fix(schema): fix dangling reference to virtual in tree after removeVirtual() #13255 #13085
- fix(query): cast query filters on
findOneAndUpdate()
#13220 #13219 dermasmid - types(model): aligned watch() type for mongodb 4.6.0 #13208 #13206
- docs: fix async function anchors #13226 hasezoey
- docs: fix schema syntax in exemple #13262 c-marc
- docs: rework scripts to allow easier setting of current and past versions #13222
#13148 hasezoey
7.0.3
7.0.3 / 2023-03-23
- fix(query): avoid executing transforms if query wasn't executed #13185 #13165
- fix(schema): make creating top-level virtual underneath subdocument equivalent to creating virtual on the subdocument #13197 #13189
- fix(timestamps): set timestamps on empty replaceOne() #13196 #13170
- fix(types): change return type of lean() to include null if nullable #13155 #13151 lpizzinidev
- fix(types): fixed type of DocumentArray constructor parameter #13183 #13087 lpizzinidev
- docs: refactor header naming to lessen conflicts #12901 hasezoey
- docs: change header levels to be consistent across files #13173 hasezoey
7.0.2
7.0.2 / 2023-03-15
- fix: validate array elements when passing array path to validateSync() in pathsToValidate #13167 #13159
- fix(schema): propagate typeKey down to implicitly created subdocuments #13164 #13154
- fix(types): add index param to eachAsync fn #13153 krosenk729
- fix(types/documentarray): type DocumentArray constructor parameter as object #13089 #13087 lpizzinidev
- fix(types): type query
select()
as string, string[], or record; notany
#13146 #13142 rbereziuk - fix(types/query): change QueryOptions lean type to Record<string, any> #13150 lpizzinidev
- docs: add and run eslint-plugin-markdown #13156 hasezoey
- docs(generateSearch): fix search generation for API #13161 hasezoey
- docs(generateSearch): move config missing error to require #13160 hasezoey
- chore: remove unused docs libraries #13172 hasezoey
7.0.1
7.0.1 / 2023-03-06
- fix(aggregate): added await to prevent exception in aggregate exec #13126 lpizzinidev
- fix(types): handle Record<string, never> as value for HydratedDocument TOverrides parameter #13123 #13094
- fix(types): remove "update" function #13120 hasezoey
- docs(compatibility): added mongoDB server compatibility for mongoose 7 #13102 lpizzinidev
- docs: Updated callback method for Model.findOne() #13096 Arghyahub
- chore: update github actions to not use ubuntu-18.04 anymore #13137 hasezoey
6.10.1
6.10.1 / 2023-03-03
- fix: avoid removing empty query filters in
$and
and$or
#13086 #12898 - fix(schematype): fixed validation for required UUID field #13018 lpizzinidev
- fix(types): add missing Paths generic param to
Model.populate()
#13070 - docs(migrating_to_6): added info about removal of reconnectTries and reconnectInterval options #13083 lpizzinidev
- docs: fix code in headers for migrating_to_5 #13077 hasezoey
- docs: backport misc documentation changes into 6.x #13091 hasezoey
7.0.0
7.0.0 / 2023-02-27
- BREAKING CHANGE: copy schema options when merging schemas using new Schema() or Schema.prototype.add() #13092
- feat(types): export mongodb types more robustly #12948 simon-abbott
- docs: fix populate docs #13090 hasezoey
- docs(migrating_to_6): added info about removal of reconnectTries and reconnectInterval options #13083 lpizzinidev
7.0.0-rc0
7.0.0-rc0 / 2023-02-23
- BREAKING CHANGE: remove support for callbacks #11431
- BREAKING CHANGE: upgrade to MongoDB node driver 5.x, bson 5.x #12955
- BREAKING CHANGE: make
strictQuery: false
by default #11861 #11807 #11514 - BREAKING CHANGE: remove support for setting schema path definitions to primitives, except
_id: false
#12832 #7558 lpizzinidev - BREAKING CHANGE: discriminator schemas now inherit base schema options by default #12928 #12135
- BREAKING CHANGE: orFail() now throws on updateOne() and updateMany() if matchedCount === 0, not modifiedCount === 0 #11620
- BREAKING CHANGE: remove support for custom promise libraries #12878 #12872 lpizzinidev
- BREAKING CHANGE: select('name -path') behaves as select('name') if path has schema-level select: true #11694
- BREAKING CHANGE(types): remove support for document interfaces that extends Document #11615
- BREAKING CHANGE: pluralize 'human' as 'humans', not 'humen' #13037
- BREAKING CHANGE: renamed schema option supressReservedKeysWarning -> suppressReservedKeysWarning #11495
- BREAKING CHANGE: remove unused DisconnectedError #13028 lpizzinidev
- BREAKING CHANGE: remove unsupported query options maxScan and snapshot #13023 #13022 hasezoey
6.10.0
6.10.0 / 2023-02-22
- feat: upgrade to mongodb driver 4.14.0 #13036
- feat: added Schema.prototype.omit() function #12939 #12931 lpizzinidev
- feat(index): added createInitialConnection option to Mongoose constructor #13021 #12965 lpizzinidev
6.9.3
6.9.3 / 2023-02-22
- fix(connection): delay calculating
autoCreate
andautoIndex
until after initial connection established #13007 #12940 lpizzinidev - fix(discriminator): allows update doc with discriminatorKey #13056 #13055 abarriel
- fix(query): avoid sending unnecessary empty projection to MongoDB server #13059 #13050
- fix(model): avoid sending null session option with document operations #13053 #13052 lpizzinidev
- fix(types): use MergeTypes for type overrides in HydratedDocument #13066 #13040
- docs(middleware): list validate as a potential query middleware #13057 #12680
- docs(getters-setters): explain that getters do not run by default on toJSON() #13058 #13049
- docs: refactor docs generation scripts #13044 hasezoey