Skip to content

[backend] Update mongoose: 6.0.8 → 6.1.4 (minor)#85

Closed
depfu[bot] wants to merge 1 commit intomainfrom
depfu/update/backend/npm/mongoose-6.1.4
Closed

[backend] Update mongoose: 6.0.8 → 6.1.4 (minor)#85
depfu[bot] wants to merge 1 commit intomainfrom
depfu/update/backend/npm/mongoose-6.1.4

Conversation

@depfu
Copy link
Contributor

@depfu depfu bot commented Dec 28, 2021

Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ mongoose (6.0.8 → 6.1.4) · Repo · Changelog

Release Notes

6.1.4

6.1.4 / 2021-12-27

  • 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

6.1.3

6.1.3 / 2021-12-21

  • 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

6.1.2

6.1.2 / 2021-12-14

  • 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

6.1.1

6.1.1 / 2021-12-09

  • fix(document): allow setting nested path to instance of document #11011
  • fix(update): respect strict option when casting array filters #11062
  • fix(index.d.ts): allow SchemaTypes.Mixed for all schema definition properties to allow using union types #10900
  • fix(index.d.ts): correct types for Schema.prototype.obj and Model.schema #10895
  • docs(migrating_to_6): add note about Types.ObjectId() being a class and requiring new #10960

6.1.0

6.1.0 / 2021-12-07

  • feat(populate): support ref on subdocuments #10856
  • feat(document): add ownerDocument() method to top-level document for consistency with subdocs #10884 IslandRhythms
  • fix: upgrade to mongodb driver 4.2.1 #11032 #10985 lorand-horvath has-n
  • feat(schema): support timeseries option for MongoDB 5 time series collections support #10611
  • feat(mongoose): add global strictPopulate option #10694 IslandRhythms
  • feat(mongoose+connection): add global mongoose.syncIndexes() and Connection.prototype.syncIndexes() #10893 IslandRhythms
  • feat(query): support removing fields from projections #10630 canac
  • feat(aggregate): add unionWith method to aggregate #10961 saeidasadi
  • fix(index.d.ts): types for aggregation pipeline stages #10971 jeremyben

6.0.15 (from changelog)

  • 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

6.0.14 (from changelog)

  • 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

6.0.13 (from changelog)

  • 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

6.0.12

6.0.12 / 2021-10-21

  • 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

6.0.11 (from changelog)

  • 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

6.0.10 (from changelog)

  • 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

6.0.9 (from changelog)

  • 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() call more strict to improve VS Code autocomplete perf #10801 traverse1984
  • fix(index.d.ts): allow calling depopulate with 0 args #10793
  • fix(index.d.ts): Add type definitions for allowDiskUse #10791 coyotte508
  • docs(populate): expand virtual populate docs with info on principle of least cardinality and other info #10558
  • docs: add migration guide to side bar #10769
  • docs(connections+api): clarify that maxPoolSize is now 100 by default #10809
  • docs(schema): add Schema#virtuals to docs as a public property #10829
  • docs: remove array indexes section from FAQ #10784 Duchynko
  • docs(model): fix broken example #10831 Okekeprince1
  • docs: fix markdown issue with schemas.md #10839 aseerkt

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.


👉 No CI detected

You don't seem to have any Continuous Integration service set up!

Without a service that will test the Depfu branches and pull requests, we can't inform you if incoming updates actually work with your app. We think that this degrades the service we're trying to provide down to a point where it is more or less meaningless.

This is fine if you just want to give Depfu a quick try. If you want to really let Depfu help you keep your app up-to-date, we recommend setting up a CI system:

  • Circle CI, Semaphore and Travis-CI are all excellent options.
  • If you use something like Jenkins, make sure that you're using the Github integration correctly so that it reports status data back to Github.
  • If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with depfu/.

Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu
Copy link
Contributor Author

depfu bot commented Jan 5, 2022

Closed in favor of #86.

@depfu depfu bot closed this Jan 5, 2022
@depfu depfu bot deleted the depfu/update/backend/npm/mongoose-6.1.4 branch January 5, 2022 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants