mongoose 6.3.0 → 6.3.3

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.
Files changed (42) hide show
  1. package/.eslintrc.json +157 -157
  2. package/README.md +2 -2
  3. package/dist/browser.umd.js +1 -1
  4. package/lib/collection.js +0 -7
  5. package/lib/connection.js +2 -1
  6. package/lib/document.js +65 -68
  7. package/lib/error/cast.js +8 -2
  8. package/lib/helpers/common.js +0 -8
  9. package/lib/helpers/immediate.js +3 -1
  10. package/lib/helpers/isAsyncFunction.js +19 -7
  11. package/lib/helpers/model/castBulkWrite.js +12 -0
  12. package/lib/helpers/populate/getModelsMapForPopulate.js +13 -10
  13. package/lib/helpers/query/cast$expr.js +4 -1
  14. package/lib/helpers/schematype/handleImmutable.js +4 -1
  15. package/lib/helpers/timestamps/setupTimestamps.js +2 -2
  16. package/lib/index.js +1 -1
  17. package/lib/internal.js +0 -1
  18. package/lib/model.js +42 -28
  19. package/lib/query.js +7 -3
  20. package/lib/queryhelpers.js +11 -1
  21. package/lib/schema/SubdocumentPath.js +3 -15
  22. package/lib/schema/documentarray.js +7 -7
  23. package/lib/schema/number.js +1 -5
  24. package/lib/schema/objectid.js +2 -4
  25. package/lib/schema/string.js +3 -6
  26. package/lib/schema.js +1 -1
  27. package/lib/schematype.js +2 -2
  28. package/lib/types/DocumentArray/methods/index.js +9 -1
  29. package/lib/types/array/methods/index.js +8 -9
  30. package/lib/utils.js +4 -0
  31. package/package.json +39 -19
  32. package/tsconfig.json +2 -2
  33. package/types/aggregate.d.ts +1 -2
  34. package/types/connection.d.ts +4 -5
  35. package/types/cursor.d.ts +3 -2
  36. package/types/document.d.ts +18 -15
  37. package/types/error.d.ts +124 -124
  38. package/types/index.d.ts +182 -154
  39. package/types/mongooseoptions.d.ts +1 -2
  40. package/types/schemaoptions.d.ts +1 -2
  41. package/CHANGELOG.md +0 -7249
  42. package/History.md +0 -1
@@ -1,6 +1,5 @@
1
- import stream = require('stream');
2
-
3
1
  declare module 'mongoose' {
2
+ import stream = require('stream');
4
3
 
5
4
  interface MongooseOptions {
6
5
  /**
@@ -1,6 +1,5 @@
1
- import mongodb = require('mongodb');
2
-
3
1
  declare module 'mongoose' {
2
+ import mongodb = require('mongodb');
4
3
 
5
4
  interface SchemaTimestampsConfig {
6
5
  createdAt?: boolean | string;