Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency mongoose to v6 #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Sep 29, 2021

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
mongoose (source) ^5.3.2 -> ^6.0.0 age adoption passing confidence

Release Notes

Automattic/mongoose

v6.3.1

Compare Source

==================

  • perf: improve perf of key order #​11639 Uzlopak
  • fix(timestamps): set createdAt when creating new single nested subdocuments #​11603
  • fix: improve CastError message when throwing StrictModeError #​11506
  • fix: upgrade bson to match [email protected] #​11676
  • fix(populate): avoid populating single nested subdocs underneath arrays if there's no ref #​11538
  • fix: handle { capped: number } in schema definition with createCollection() #​11539
  • fix: call markModified before setting changes in Array and in DocumentArray methods #​11660 josegl
  • fix: only allow using minus path to remove auto-selected discriminatorKey from projection #​11546
  • fix(types): set context on virtual getters/setters by default #​11543
  • fix(types): correct return type for Connection.prototype.transaction #​9919
  • fix(types): allow model as document interface key when using extends Document #​11629
  • docs: improve populate typing #​11690 onichandame
  • docs: add information regarding typings-tests #​11691 Uzlopak
  • docs: fix jsdoc for mongoose.createConnection #​11693 Uzlopak

v6.3.0

Compare Source

==================

v6.2.11

Compare Source

===================

  • fix(document): handle validation with triply nested document arrays #​11564
  • fix(query): skip applying string schema setters on $regex #​11426
  • fix: skip findOneAndReplace() validation if runValidators = false #​11559
  • fix(model): correctly handle schema-level collations in syncIndexes() #​7621
  • fix(types): correct populate query return type with lean #​11560 mohammad0-0ahmad
  • fix(types): allow using { type: Mixed } as schema type definition for any path #​10900
  • docs: fix example on Schema.prototype.post() #​11648 EmilienLeroy
  • docs: fix typo in methods/index.js #​11651 eltociear

v6.2.10

Compare Source

===================

v6.2.9

Compare Source

==================

v6.2.8

Compare Source

==================

  • fix(document): handle casting array of spread docs #​11522
  • fix(document): avoid setting nested properties on top-level document when initing with strict: false #​11526
  • fix(document): correctly handle deeply nested subdocuments when getting paths to validate #​11501
  • fix(types): avoid making TInstanceMethods any by default leading to this = any in middleware #​11435
  • fix(types): allow defining array default if using Types.Array<> in document interface #​11391
  • docs(migrating_to_6): describe breaking change in Mongoose 6 about default query populate model #​11289
  • docs(middleware): fix typo #​11537 x1489

v6.2.7

Compare Source

==================

  • perf(document): avoid running validation on every array element if there's no validators to run #​11380
  • fix(cursor): correctly populate in batches when batchSize is set #​11509
  • fix(connection): avoid setting MongoClient on useDb() connections until after setting on base connection #​11445
  • fix(schema): throw more helpful error when using schema from a different version of Mongoose module #​10453
  • fix: add missing timeseries expiration handling #​11489 #​11229 Uzlopak
  • docs: correct Model.findOneAndReplace docs param naming #​11524 anatolykopyl

v6.2.6

Compare Source

==================

  • fix(types): correct reference to cursor TypeScript bindings #​11513 SimonHausdorf
  • fix(types): allow calling Query.prototype.populate() with array of strings #​11518
  • fix(types): export and refactor types of PreMiddlewareFunction, PreSaveMiddlewareFunction, PostMiddlewareFunction, ErrorHandlingMiddlewareFunction #​11485 Uzlopak

v6.2.5

Compare Source

==================

  • fix(mongoose): add isObjectIdOrHexString() to better capture the most common use case for isValidObjectId() #​11419
  • fix(query): prevent modifying discriminator key in updates using operators other than $set #​11456
  • fix(populate+types): call foreignField functions with doc as 1st param, better typings for localField and foreignField functions #​11321
  • fix(populate): return an array when using populate count on an array localField #​11307
  • fix(query): avoid error when using $not with arrays #​11467
  • perf: only deep clone validators if necessary #​11412 Uzlopak
  • fix(types): rename definition files to lowercase to avoid typescript bug #​11469
  • fix(types): aggregate.sort() accepts a string but also { field: 'asc'|'ascending'|'desc'|'descending' } #​11479 simonbrunel
  • fix(types): extract and refactor aggregationcursor and querycursor #​11488 Uzlopak
  • fix(types): extract and refactor schemaoptions #​11484 Uzlopak
  • fix(types): make first param to Query.prototype.populate() a string #​11475 minhthinhls
  • fix(types): improve type checking for doc arrays in schema definitions #​11241
  • docs: fix length comparaison in lean.test.js #​11493 zazapeta
  • docs(timestamps): fix typo #​11481 saibbyweb
  • docs: fix broken link to rawResult #​11459 chhiring90

v6.2.4

Compare Source

==================

  • fix(query): correctly return full deleteOne(), deleteMany() result #​11211
  • fix(query): handle update validators on deeply nested subdocuments #​11455 #​11394
  • fix(discriminator): handle modifying multiple nested paths underneath a discriminator #​11428
  • perf: improve isAsyncFunction #​11408 Uzlopak
  • fix(index.d.ts): add typedefs for Schema pick() #​11448 Moisei-Shkil
  • fix(index.d.ts): allow type override for distinct() #​11306
  • fix(index.d.ts): allow array of validators in schema definition #​11355
  • fix(index.d.ts): improve connection typings #​11418 Uzlopak
  • docs: add timestamps docs #​11336
  • docs(timestamps): explain how timestamps works under the hood #​11336
  • docs(migrating_to_6): add model.exists breaking change returning doument instead of boolean #​11407 AbdelrahmanHafez
  • docs(index.d.ts): add docs for FilterQuery, UpdateQuery, and LeanDocument #​11457 Moisei-Shkil

v6.2.3

Compare Source

==================

  • fix(model): avoid dropping base model indexes when using discriminators with Connection.prototype.syncIndexes() #​11424 #​11421 AbdelrahmanHafez
  • fix(document): handle array defaults when selecting element underneath array #​11376
  • fix(populate): correctly handle depopulating populated subdocuments #​11436
  • fix(utils): improve deepEqual() handling for comparing objects with non-objects #​11417
  • fix(schema): allow declaring array of arrays using [{ type: [String] }] #​11252
  • perf: improve validation sync and async by replacing forEach with classic for loops #​11414 Uzlopak
  • perf: make hasDollarKeys faster #​11401 Uzlopak
  • fix(index.d.ts): ValidationError errors only contains CastError or ValidationError #​11369 Uzlopak
  • fix(index.d.ts): make InsertManyResult.insertedIds return an array of Types.ObjectId by default #​11197
  • fix(index.d.ts): allow pre('save') middleware with pre options #​11257
  • fix(index.d.ts): add supressReservedKeysWarning option to schema #​11439 hiukky
  • docs(connections): improve replica set hostname docs with correct error message and info about err.reason.servers #​11200
  • docs(populate): add virtual populate match option documentation #​11411 remirobichet
  • docs(document): add note to API docs that flattenMaps defaults to true for toJSON() but not toObject() #​11213
  • docs(document+model): add populate option to populate() API docs #​11170
  • docs(migrating_to_6): add additional info about removing omitUndefined #​11038
  • docs(migrating_to_6): add model.exists breaking change returning doument instead of boolean AbdelrahmanHafez

v6.2.2

Compare Source

==================

v6.2.1

Compare Source

===================

  • fix(document): handle validation with triply nested document arrays #​11564
  • fix(query): skip applying string schema setters on $regex #​11426
  • fix: skip findOneAndReplace() validation if runValidators = false #​11559
  • fix(model): correctly handle schema-level collations in syncIndexes() #​7621
  • fix(types): correct populate query return type with lean #​11560 mohammad0-0ahmad
  • fix(types): allow using { type: Mixed } as schema type definition for any path #​10900
  • docs: fix example on Schema.prototype.post() #​11648 EmilienLeroy
  • docs: fix typo in methods/index.js #​11651 eltociear

v6.2.0

Compare Source

==================

  • feat: upgrade MongoDB driver to 4.3.1
  • feat(connection+mongoose): add support for continueOnError for syncIndexes #​11266 AbdelrahmanHafez
  • feat(query): cast literals in $expr where possible #​10663
  • feat(schema+mongoose): add pluginTags to allow applying global plugins to only schemas with matching tags #​9780
  • feat(discriminator): support overwriteModels:true to reuse discriminator names #​11244 #​10931 IslandRhythms
  • feat(index.d.ts): add DocType generic param to Model functions that return queries to better support projections #​11156
  • feat(error): export MongooseServerSelectionError #​11202
  • feat(schematype): add validators, path, isRequired to public API and TypeScript types #​11139
  • fix(model): make exists(...) return lean document with _id or null instead of boolean #​11142 AbdelrahmanHafez
  • fix(model): support storing versionKey in nested paths #​10980
  • fix(index.d.ts): add options to bulkSave() type def #​11201 Uzlopak
  • fix(index.d.ts): better support for query projections #​11210 EugeneKorshenko

v6.1.10

Compare Source

===================

  • fix(mongoose): correctly handle destructured isValidObjectId #​11304
  • fix(mongoose): defer to MongoDB driver isValid() for isValidObjectId() #​11227

v6.1.9

Compare Source

==================

  • fix(query): respect nested schema strict as default when casting query filters #​11291
  • fix(mongoose): make isValidObjectId() consistent with isValid(), make ObjectId() casting more flexible #​11209
  • fix(setDefaultsOnInsert): ignore defaults underneath maps #​11235
  • fix(query): avoid setting nested schema properties that are stripped out by strictQuery to undefined in query filter #​11291
  • fix: check for all flags in a regex deepequal #​11242 Uzlopak
  • fix: replace substr with substring #​11278 Uzlopak
  • docs: port for documentation testing in CONTRIBUTING.md #​11273 Uzlopak

v6.1.8

Compare Source

==================

v6.1.7

Compare Source

==================

  • fix(model): correct handling for $push on a nested array #​11108
  • fix(update): correctly apply timestamps to update pipelines #​11151
  • fix(document): correctly handle modifying array subdocument after setting array subdocument to itself #​11172
  • fix(index.d.ts): allow passing options to model() in place of removed skipInit #​11137
  • fix(aggregate): allow passing verbosity to Aggregate.prototype.explain() #​11144
  • fix(index.d.ts): avoid TypeScript inferring _id as any type with HydratedDocument #​11085
  • docs: fix Node.js Driver compat link #​11214 wesbos
  • docs: remove extraneous backquote #​11204 joebowbeer

v6.1.6

Compare Source

==================

  • perf(document): delay creating document event emitter until used to improve memory usage, several small improvements to improve initing docs with large arrays #​10400
  • fix(model): avoid bulkSave() error when versionKey: false #​11186 #​11071 IslandRhythms
  • fix(model): revert #​11079: findByIdAndUpdate(undefined) breaking change #​11149
  • fix(index.d.ts): support strings in deep populate #​11181 ivalduan
  • fix(index.d.ts): rename map() -> transform() to line up with change in v6.0 #​11161
  • fix(index.d.ts): allow new Model(obj) for stricter type checks #​11148
  • fix(index.d.ts): make Schema.prototype.pre() and post() generics default to HydratedDocument #​11180
  • docs: improve autoCreate docs #​11116
  • docs(schematype): add missing parameter to example #​11185 kerolloz
  • docs(connections): use updated link to list of MongoDB Node driver connect() options #​11184 splinter
  • docs(aggregate): fix formatting #​11191 enieber
  • docs: fix broken link #​11179 khairnarsaurabh23

v6.1.5

Compare Source

==================

  • perf(index.d.ts): simplify Schema typedef for query helpers and methods to significantly reduce TS compiler overhead #​10349
  • fix(document): allow populating deeply nested models as strings #​11168 #​11160 AbdelrahmanHafez
  • fix(query): allow calling limit() and skip() with a string #​11017
  • fix(cursor): propery apply selected fields when loading discriminator docs with query cursor #​11130
  • fix(mongoose+connection): clone schema correctly when passing instance of another Mongoose instance's Schema to Connection.prototype.model() #​11047
  • fix(index.d.ts): handle primitives with FlattenMaps #​11117
  • fix(index.d.ts): enforce id on lean query result type #​11118
  • fix(index.d.ts): export facet stage type #​11150 mhoc
  • fix(index.d.ts): correct return type of projection method #​11176 EugeneKorshenko
  • fix(index.d.ts): additional fix for $group pipeline stage #​11140 #​11067 EugeneKorshenko
  • docs: update CONTRIBUTING.md for TS tests #​11164 ahmedelshenawy25
  • docs: use es6 object destructuring instead of regular dot operator for accessing value in object #​11147 Shivaansh-Agarwal

v6.1.4

Compare Source

==================

  • fix(document): handle save with undefined nested doc under subdoc #​11110
  • fix(document): allow manually populating subdocument refs with create() #​10856
  • fix(populate): handles refPath underneath map of subdocuments #​9359
  • fix(update): throw error when calling findByIdAndUpdate with undefined id #​11079 gramliu
  • fix(mongoose): export ConnectionStates #​11133 orgads
  • fix(index.d.ts): unpack array when using generic type override with populate() #​11027
  • fix(index.d.ts): fix typings in Merge stage #​11132
  • fix(index.d.ts): PipelineStage.Merge interface definition is wrong #​11109
  • docs(typescript): add note about Schema.Types.ObjectId vs Types.ObjectId in document definition #​10949
  • docs(connection): clarify that "connected" and "open" are different #​10886
  • docs(populate): correct refPath example to not use on as a schema path name #​11113
  • docs: fix strictQuery example #​11135 MontgomeryWatts

v6.1.3

Compare Source

==================

  • perf(populate): avoid duplicate model names when using refPath to avoid O(n^2) memory growth with number of array elements #​10983
  • fix(schema+model): cast paths marked with ref when hydrating #​11052
  • fix(schema): handle default function that returns null on document arrays #​11058
  • fix(document): clean modified paths when setting deeply nested subdocument #​11060
  • fix(populate): report full path when throwing strictPopulate error with deep populate #​10923
  • fix(connection): allow calling setClient() when disconnected #​11114 hustxiaoc
  • fix(index.d.ts): fix typings in Group stage #​11124 DavideViolante
  • fix(index.d.ts): add Mongoose.prototype.trusted() function to type defs #​10957
  • fix(index.d.ts): allow use type string in $unset update with aggregation pipeline #​11107 rpenido
  • fix(index.d.ts) treat _id like other fields in $project #​11102
  • docs(migrating_to_6): add omitUndefined to Mongoose 6 migration guide #​10672
  • docs: add MongooseDocumentArray to API docs #​10998
  • docs: fix typo in model.js #​11121 eltociear
  • docs: fix typo in validation.md #​11103 warlock1996

v6.1.2

Compare Source

==================

  • fix: upgrade mongodb driver to 4.2.2 #​11092 lorand-horvath
  • fix(model): respect discriminators when calling Model.watch() #​11007
  • fix(populate): allow referencing parent connection models by name when using useDb() #​11003
  • fix(query): support options param to Query.prototype.countDocuments() #​11037
  • fix(query): correctly use awaitData instead of awaitdata in Query.prototype.tailable() #​10875
  • fix(index.d.ts): fix replaceRoot type #​11098 alibehroozi
  • fix(index.d.ts): add missing syncIndexes() definition to Mongoose global and Connection class #​11065
  • fix(index.d.ts): add boolean type for transform option #​11057 AliYusuf95
  • docs(model.estimatedDocumentCount): add await into example to get value from the Query #​11044 olecom
  • docs: fix broken build from awaitdata comment #​11096 medolino
  • docs: correct Query.prototype.transform() docs #​11094 medolino

v6.1.1

Compare Source

===================

  • fix(mongoose): correctly handle destructured isValidObjectId #​11304
  • fix(mongoose): defer to MongoDB driver isValid() for isValidObjectId() #​11227

v6.1.0

Compare Source

==================

v6.0.15

Compare Source

===================

  • fix(document): avoid overwriting schema methods when creating a new document with new Model() and strict: false #​11001
  • fix(document): avoid overwriting top-level document _id with nested _id when strict = false #​10934
  • fix(collection): avoid double-calling callback on sync error #​10956
  • fix(connection): handle direct connection to uninitialized replica set that then becomes initialized #​10948
  • fix(index.d.ts): allow partial updates on subdocuments for defaults #​10947
  • fix(index.d.ts): handle buffer type in schema definitions #​11026

v6.0.14

Compare Source

===================

  • fix(document): catch errors in required functions #​10968
  • fix(connection): clone schema when passing a schema from a different copy of Mongoose to Connection#model() #​10904
  • fix(populate): set empty array [] on virtual populate with no result #​10992
  • fix(query): handle orFail() with replaceOne() #​10963
  • fix(populate): use Model by default when using Model.populate() on a POJO #​10978
  • fix(document): throw VersionError if saving a document with version bump and document isn't found #​10974
  • fix(index.d.ts): make populate type param optional #​10989 mohd-akram
  • docs(migrating_to_6): add a note about minimize and toObject() behavior change in v5.10.5 #​10827
  • docs: remove duplicate path in docs #​11020 ItWorksOnMyMachine
  • docs: fix typo in populate docs #​11015 gavi-shandler
  • docs: fix typo in model.js #​10982 eltociear

v6.0.13

Compare Source

===================

  • fix(document): allows validating doc again if pre validate errors out #​10830
  • fix: upgrade to mongodb driver 4.1.4 #​10955 mohd-akram
  • fix(schema): handle functions with accidental type properties in schema definitions #​10807
  • fix(path): add check to avoid flattening dotted paths on Mongoose docs, improve error when flattening dotted paths causes conflicts #​10825
  • fix(index.d.ts): rename EnforceDocument -> HydratedDocument, export HydratedDocument for easier typing for users #​10843
  • fix(index.d.ts): handle maps in TypeScript schema definitions #​10838
  • fix(index.d.ts): add clone to query #​10943 asportnoy
  • fix(index.d.ts): add strictQuery global option #​10933
  • fix(index.d.ts): add generic to allow overriding Schema#clone() return type #​10951 StefanoA1
  • docs(typescript): add quick guide to virtuals in TypeScript #​10754
  • docs(aggregate): remove exec() from AggregationCursor example, no longer correct for Mongoose 6 #​10862
  • docs(document.js): fix link leading to old github pages site #​10958 PuneetGopinath
  • docs: fixed typo in document.js #​10950 Haosik

v6.0.12

Compare Source

===================

  • fix(cursor): remove the logic for emitting close, rely on autoDestroy option for Node 12 support #​10906 iovanom
  • fix(map): support passing flattenMaps: false to Map toJSON(), make toJSON() flatten maps by default in TypeScript #​10872
  • fix: upgrade to mongodb driver 4.1.3 #​10911 orgads
  • fix(index.d.ts): correct TS function signature for SchemaType.prototype.set() #​10799
  • fix(index.d.ts): support implicit $in in FilterQuery #​10826
  • fix(index.d.ts): More precise type for Schema.clone() #​10899 coyotte508
  • fix(index.d.ts): add caster property to schema arrays and document arrays #​10865
  • docs: update updateMany() and deleteMany() docs to reflect new matchedCount, modifiedCount, deletedCount properties #​10908 IslandRhythms
  • docs: fix broken links to populate virtuals #​10870 IslandRhythms
  • docs: updated docs to have returnOriginal, removed new and returnDocument #​10887 IslandRhythms

v6.0.11

Compare Source

===================

  • perf(index.d.ts): remove some unnecessary definitions, streamline some union types to reduce number of instantiations #​10349
  • fix(cursor): use stream destroy method on close to prevent emitting duplicate 'close' #​10878 #​10876 iovanom
  • fix: create indexes when readPreference=primary is set #​10861 #​10855 gemyero
  • fix(document): avoid depopulating when setting array of subdocs from different doc #​10819
  • fix(index.d.ts): allow modifying properties of UpdateQuery instances #​10786
  • fix(index.d.ts): add generic Paths to populate() to allow overriding path types #​10758

v6.0.10

Compare Source

===================

  • fix(query): add back strictQuery option to avoid empty filter issues, tie it to strict by default for compatibility #​10781 #​10763
  • fix(model): avoid unnecessarily dropping text indexes in syncIndexes() #​10851 #​10850 IslandRhythms
  • fix(query): avoid trying to call toArray() on cursor if find() error occurred #​10845
  • fix: accepts uppercase values in mongoose.isValidObjectId #​10846 foxadb
  • perf(document): further reduce unnecessary objects and keys to minimize document memory overhead #​10400
  • fix(index.d.ts): restore unpacked type and avoid distributive conditional types #​10859 dbellavista
  • fix(index.d.ts): add correct null typings for findOneAndUpdate() and findByIdAndUpdate() #​10820
  • fix(index.d.ts): make insertMany() correctly return Promise if passing single document to insertMany() #​10802
  • fix(index.d.ts): avoid weird issue where TypeScript 4.3.x and 4.4.x makes string extend Function #​10746
  • fix(index.d.ts): allow type: SchemaTypeOptions[] when defining schema #​10789
  • fix(index.d.ts): allow using $in with enum fields #​10757 #​10734
  • fix(index.d.ts): add missing fields and options params to Model constructor #​10817
  • fix(index.d.ts): support extending type for mongoose.models #​10806 MunifTanjim
  • docs: enhance docs section linking #​10779 saveman71
  • docs(middleware): add missing query middleware #​10721
  • docs: fix typo #​10853 mdatif796
  • docs: add missing to #​10848 digidub

v6.0.9

Compare Source

==================

  • fix(document): init non-schema values if strict is set to false #​10828
  • fix(document): correctly track saved state for deeply nested objects #​10773
  • fix(array): avoid mutating arrays passed into Model() constructor #​10766
  • fix(cursor): allow using find().cursor() before connecting, report errors in pre('find') hooks when using .cursor() #​10785
  • fix(populate): support ref: Model with virtual populate #​10695
  • fix(schema): support type: { subpath: String } in document array definitions and improve schema interpretAsType error messages if type name is undefined #​10750
  • fix: upgrade to mongodb driver 4.1.2 #​10810 orgads
  • fix(subdocument): add extra precaution to throw an error if a subdocument is a parent of itself in ownerDocument() #​9259
  • perf(index.d.ts): make model()

Configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by WhiteSource Renovate. View repository job log here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant