mongoose 5.13.2 → 5.13.6
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.
- package/History.md +44 -0
- package/dist/browser.umd.js +129 -126
- package/index.d.ts +188 -51
- package/lib/aggregate.js +2 -1
- package/lib/cast.js +2 -1
- package/lib/connection.js +1 -1
- package/lib/cursor/QueryCursor.js +10 -2
- package/lib/document.js +4 -1
- package/lib/drivers/node-mongodb-native/collection.js +12 -9
- package/lib/error/validation.js +2 -1
- package/lib/helpers/document/compile.js +7 -7
- package/lib/helpers/getConstructorName.js +15 -0
- package/lib/helpers/populate/getModelsMapForPopulate.js +2 -2
- package/lib/helpers/query/castUpdate.js +2 -1
- package/lib/helpers/topology/allServersUnknown.js +3 -2
- package/lib/helpers/topology/isAtlas.js +3 -2
- package/lib/helpers/topology/isSSLError.js +3 -2
- package/lib/helpers/update/applyTimestampsToChildren.js +41 -28
- package/lib/index.js +1 -1
- package/lib/model.js +20 -11
- package/lib/query.js +3 -3
- package/lib/schema/array.js +1 -1
- package/lib/schema/date.js +2 -1
- package/lib/schema/objectid.js +2 -1
- package/lib/schema.js +29 -5
- package/lib/types/embedded.js +1 -1
- package/lib/types/map.js +4 -2
- package/package.json +4 -3
package/History.md
CHANGED
|
@@ -1,3 +1,47 @@
|
|
|
1
|
+
5.13.6 / 2021-08-09
|
|
2
|
+
===================
|
|
3
|
+
* fix: upgrade mongodb driver -> 3.6.11 #10543 [maon-fp](https://github.com/maon-fp)
|
|
4
|
+
* fix(schema): throw more helpful error when defining a document array using a schema from a different copy of the Mongoose module #10453
|
|
5
|
+
* fix: add explicit check on constructor property to avoid throwing an error when checking objects with null prototypes #10512
|
|
6
|
+
* fix(cursor): make sure to clear stack every 1000 docs when calling `next()` to avoid stack overflow with large batch size #10449
|
|
7
|
+
* fix(index.d.ts): allow calling new Model(...) with generic Model param #10526
|
|
8
|
+
* fix(index.d.ts): update type declarations of Schema.index method #10538 #10530 [Raader](https://github.com/Raader)
|
|
9
|
+
* fix(index.d.ts): add useNewUrlParser and useUnifiedTopology to ConnectOptions #10500
|
|
10
|
+
* fix(index.d.ts): add missing type for diffIndexes #10547 [bvgusak](https://github.com/bvgusak)
|
|
11
|
+
* fix(index.d.ts): fixed incorrect type definition for Query's .map function #10544 [GCastilho](https://github.com/GCastilho)
|
|
12
|
+
* docs(schema): add more info and examples to Schema#indexes() docs #10446
|
|
13
|
+
* chore: add types property to package.json #10557 [thiagokisaki](https://github.com/thiagokisaki)
|
|
14
|
+
|
|
15
|
+
5.13.5 / 2021-07-30
|
|
16
|
+
===================
|
|
17
|
+
* perf(index.d.ts): improve typescript type checking performance #10515 [andreialecu](https://github.com/andreialecu)
|
|
18
|
+
* fix(index.d.ts): fix debug type in MongooseOptions #10510 [thiagokisaki](https://github.com/thiagokisaki)
|
|
19
|
+
* docs(api): clarify that `depopulate()` with no args depopulates all #10501 [gfrancz](https://github.com/gfrancz)
|
|
20
|
+
|
|
21
|
+
5.13.4 / 2021-07-28
|
|
22
|
+
===================
|
|
23
|
+
* fix: avoid pulling non-schema paths from documents into nested paths #10449
|
|
24
|
+
* fix(update): support overwriting nested map paths #10485
|
|
25
|
+
* fix(update): apply timestamps to subdocs that would be newly created by `$setOnInsert` #10460
|
|
26
|
+
* fix(map): correctly clone subdocs when calling toObject() on a map #10486
|
|
27
|
+
* fix(cursor): cap parallel batchSize for populate at 5000 #10449
|
|
28
|
+
* fix(index.d.ts): improve autocomplete for new Model() by making `doc` an object with correct keys #10475
|
|
29
|
+
* fix(index.d.ts): add MongooseOptions interface #10471 [thiagokisaki](https://github.com/thiagokisaki)
|
|
30
|
+
* fix(index.d.ts): make LeanDocument work with PopulatedDoc #10494
|
|
31
|
+
* docs(mongoose+connection): correct default value for bufferTimeoutMS #10476
|
|
32
|
+
* chore: remove unnecessary 'eslint-disable' comments #10466 [thiagokisaki](https://github.com/thiagokisaki)
|
|
33
|
+
|
|
34
|
+
5.13.3 / 2021-07-16
|
|
35
|
+
===================
|
|
36
|
+
* fix(model): avoid throwing error when bulkSave() called on a document with no changes #10437
|
|
37
|
+
* fix(timestamps): apply timestamps when creating new subdocs with `$addToSet` and with positional operator #10447
|
|
38
|
+
* fix(schema): allow calling Schema#loadClass() with class that has a static getter with no setter #10436
|
|
39
|
+
* fix(model): handle re-applying object defaults after explicitly unsetting #10442 [semirturgay](https://github.com/semirturgay)
|
|
40
|
+
* fix: bump mongodb driver -> 3.6.10 #10440 [AbdelrahmanHafez](https://github.com/AbdelrahmanHafez)
|
|
41
|
+
* fix(index.d.ts): consistently use NativeDate instead of Date for Date validators and timestamps functions #10426
|
|
42
|
+
* fix(index.d.ts): allow calling `discriminator()` with non-document #10452 #10421 [DouglasGabr](https://github.com/DouglasGabr)
|
|
43
|
+
* fix(index.d.ts): allow passing ResultType generic to Schema#path() #10435
|
|
44
|
+
|
|
1
45
|
5.13.2 / 2021-07-03
|
|
2
46
|
===================
|
|
3
47
|
* fix: hardcode @types/node version for now to avoid breaking changes from DefinitelyTyped/DefinitelyTyped#53669 #10415
|