Releases: Automattic/mongoose
Releases · Automattic/mongoose
8.20.0
8.20.0 / 2025-11-17
- feat: cast id parameter based on schema _id type in DocumentArray.id() #15733 #15725 #15724 Lex-Ashu
- fix: pass parent schema to SchemaType constructors in interpretAsType to make implementing custom container types easier #15700
- types(models): default _id type to ObjectId for Document #15688 Catwallon
- docs: add FAQ entry about DivergentArrayError #15743 Mario5T
- docs: update browser.md with Mongoose limitations #15744 YashSharma64
- chore: add benchmark for large nested array documents (related to #9588) #15742 Kundan-CR7
8.19.4
8.19.4 / 2025-11-14
- fix(schema): avoid throwing error on array of unions #15720 #15718
- fix: store original index on insertMany validation errors #15735 Jadu07
- types: correct return type of discriminator to Model #15726 twentytwo777
- docs: improve Next.js integration guide with comprehensive examples #15730 adarsh-priydarshi-5646
- docs: add documentation for Union Schema Type #15721 TechGenie-awake
- docs: removed the outdated callback and replaced them with async/await pattern #15723 hk2166
- docs: fix lingering remove() call in statics docs #15737 Gautam-Bharadwaj
- docs: fix inline doc typo in schematypes.d.ts #15738 hagid786
8.19.3
8.19.2
8.19.2 / 2025-10-20
- perf(setDefaultsOnInsert): avoid computing all modified paths when running setDefaultsOnInsert and update validators, only calculate if there are defaults to set #15691 #15672
- fix: correct handling of relative vs absolute paths with maps and subdocuments #15682 #15678 #15350
- ci: add publish script with provenance #15684 #15680
8.19.1
8.19.1 / 2025-10-06
- perf: avoid getting all modified paths in update when checking if versionKey needs to be set #15677 #15672
- perf: Avoid needless path translation #15679 orgads
- fix(query): throw error if using update operator with modifier and no path #15670 #15642
- types: avoid making FilterQuery a conditional type because of how typescript handles distributed conditional unions #15676 #15671
- docs: update installation instructions #15675 aalok-y
8.19.0
8.19.0 / 2025-10-02
- feat: upgrade mongodb driver to 6.20.0 #15651 #15656
- feat(model): add virtuals option to Model.hydrate() to set virtuals #15638 #15627
- fix(schema): handle casting array filters underneath maps of Mixed #15655 #15653
- types: optimize InferRawDocType #15588 ssalbdivad
- types(schema): add lean schema option to TypeScript types #15646 #15583 #10090
8.18.3
8.18.3 / 2025-09-29
- fix(update): avoid throwing error if update has a top-level $addToSet with no path #15648 #15642
- types(query): allow passing arbitrary options #15644 #15643
- docs(connection+mongoose): correct mongodb option name user -> username #15650 #15647
- test: add tests covering vector search and text search using Atlas CLI #15649 #15645
8.18.2
8.18.2 / 2025-09-22
- fix(document): prevent $clone() from converting mongoose arrays into vanilla arrays #15633 #15625
- fix(connection): use correct collection name for model when using useConnection() #15637
- fix(connection): propagate changes to _lastHeartbeatAt to useDb() child connections #15640 #15635
- types: fix schema property type definition in SchemaType #15631
8.18.1
8.18.1 / 2025-09-08
- types: correct type inference for maps of maps #15602
- types(model): copy base model statics onto discriminator model #15623 #15600
- types: fix types for a string of enums #15605 ruiaraujo
- types(SchemaOptions): disallow versionKey: true, which fails at runtime #15606
- docs(typescript): add example explaining how to use query helper overrides for handling lean() #15622 #15601
- docs(transactions): add note about nested transactions #15624
8.18.0
8.18.0 / 2025-08-22
- feat(schema): support for union types #15574 #10894
- fix: trim long strings in minLength and maxLength error messages and display the string length #15571 #15550
- types(connection+collection): make BaseCollection and BaseConnection usable as values #15575 #15548
- types: remove logic that omits timestamps when virtuals, methods, etc. options set #15577 #12807