mongoose 8.12.2 → 8.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -78,7 +78,12 @@ function assignRawDocsToIdStructure(rawIds, resultDocs, resultOrder, options, re
|
|
|
78
78
|
continue;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
if (id?.constructor?.name === 'Binary' && id.sub_type === 4 && typeof id.toUUID === 'function') {
|
|
82
|
+
// Workaround for gh-15315 because Mongoose UUIDs don't use BSON UUIDs yet.
|
|
83
|
+
sid = String(id.toUUID());
|
|
84
|
+
} else {
|
|
85
|
+
sid = String(id);
|
|
86
|
+
}
|
|
82
87
|
doc = resultDocs[sid];
|
|
83
88
|
// If user wants separate copies of same doc, use this option
|
|
84
89
|
if (options.clone && doc != null) {
|
package/lib/mongoose.js
CHANGED
|
@@ -179,6 +179,10 @@ Mongoose.prototype.setDriver = function setDriver(driver) {
|
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
+
if (driver.SchemaTypes != null) {
|
|
183
|
+
Object.assign(mongoose.Schema.Types, driver.SchemaTypes);
|
|
184
|
+
}
|
|
185
|
+
|
|
182
186
|
const Connection = driver.Connection;
|
|
183
187
|
const oldDefaultConnection = _mongoose.connections[0];
|
|
184
188
|
_mongoose.connections = [new Connection(_mongoose)];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mongoose",
|
|
3
3
|
"description": "Mongoose MongoDB ODM",
|
|
4
|
-
"version": "8.
|
|
4
|
+
"version": "8.13.1",
|
|
5
5
|
"author": "Guillermo Rauch <guillermo@learnboost.com>",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"mongodb",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"bson": "^6.10.3",
|
|
24
24
|
"kareem": "2.6.3",
|
|
25
|
-
"mongodb": "~6.
|
|
25
|
+
"mongodb": "~6.15.0",
|
|
26
26
|
"mpath": "0.9.0",
|
|
27
27
|
"mquery": "5.0.0",
|
|
28
28
|
"ms": "2.1.3",
|
package/types/schematypes.d.ts
CHANGED
|
@@ -97,7 +97,7 @@ declare module 'mongoose' {
|
|
|
97
97
|
* The default value for this path. If a function, Mongoose executes the function
|
|
98
98
|
* and uses the return value as the default.
|
|
99
99
|
*/
|
|
100
|
-
default?: DefaultType<T> | ((this: EnforcedDocType, doc: any) => DefaultType<T>) | null;
|
|
100
|
+
default?: DefaultType<T> | ((this: EnforcedDocType, doc: any) => DefaultType<T> | null | undefined) | null;
|
|
101
101
|
|
|
102
102
|
/**
|
|
103
103
|
* The model that `populate()` should use if populating this path.
|