Mongoose 是设计用于异步环境的 MongoDB 对象模型工具,支持 promises 和 callbacks。
Mongoose 6.3.3 已正式发布,带来如下改动:
- perf:在使用QueryCursor时避免内存泄漏,因为使用_docs时重用了填充选项 #11641
- fix(types):为LeanDocument添加_id #11769 #11761
- fix(model):为bulkWrite()添加skipValidation选项,以允许跳过insertOne和replaceOne的验证 #11663
- fix(document):修正 $__reset() 嵌套路径下的子文档 #11672
- fix(query):在查询中处理将 BSONRegExp 实例转换为 RegExps #11597
- fix:正确转换 $not in $expr #11689
- perf:优化浏览器包的大小,使用 buffer v.5.7.1 包来匹配浏览器包中 mongodb 的缓冲包 #11765
- docs::Query.populate 文档不使用字符串数组作为路径参数 #11768 #11641
- chore:删除 Makefile 对编译文档的依赖 #11751
更新公告:https://github.com/Automattic/mongoose/releases/tag/6.3.3