mongoose 7.0.4 → 7.1.0

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 (43) hide show
  1. package/.eslintrc.js +4 -3
  2. package/README.md +1 -1
  3. package/dist/browser.umd.js +1 -1
  4. package/lib/aggregate.js +13 -13
  5. package/lib/browser.js +12 -12
  6. package/lib/cast/bigint.js +31 -0
  7. package/lib/connection.js +45 -8
  8. package/lib/cursor/AggregationCursor.js +1 -1
  9. package/lib/cursor/QueryCursor.js +1 -1
  10. package/lib/document.js +44 -44
  11. package/lib/error/createCollectionsError.js +26 -0
  12. package/lib/error/index.js +13 -13
  13. package/lib/index.js +40 -40
  14. package/lib/model.js +102 -95
  15. package/lib/options/SchemaNumberOptions.js +1 -1
  16. package/lib/options/SchemaObjectIdOptions.js +1 -1
  17. package/lib/options/SchemaStringOptions.js +1 -1
  18. package/lib/options/SchemaTypeOptions.js +1 -1
  19. package/lib/options/VirtualOptions.js +1 -1
  20. package/lib/query.js +87 -71
  21. package/lib/schema/SubdocumentPath.js +1 -1
  22. package/lib/schema/bigint.js +221 -0
  23. package/lib/schema/boolean.js +4 -0
  24. package/lib/schema/date.js +2 -2
  25. package/lib/schema/documentarray.js +1 -1
  26. package/lib/schema/index.js +8 -19
  27. package/lib/schema/number.js +3 -3
  28. package/lib/schema/string.js +7 -7
  29. package/lib/schema/uuid.js +10 -8
  30. package/lib/schema.js +49 -47
  31. package/lib/schematype.js +17 -16
  32. package/lib/types/array/methods/index.js +12 -12
  33. package/lib/types/index.js +2 -0
  34. package/lib/types/uuid.js +13 -0
  35. package/lib/utils.js +2 -0
  36. package/lib/virtualtype.js +2 -2
  37. package/package.json +3 -3
  38. package/scripts/generateSearch.js +2 -1
  39. package/scripts/tsc-diagnostics-check.js +1 -1
  40. package/types/index.d.ts +68 -28
  41. package/types/inferschematype.d.ts +2 -3
  42. package/types/middlewares.d.ts +10 -3
  43. package/types/query.d.ts +2 -1
package/.eslintrc.js CHANGED
@@ -11,7 +11,7 @@ module.exports = {
11
11
  'test/files/*',
12
12
  'benchmarks',
13
13
  '*.min.js',
14
- 'docs/js/native.js'
14
+ '**/docs/js/native.js'
15
15
  ],
16
16
  overrides: [
17
17
  {
@@ -77,7 +77,7 @@ module.exports = {
77
77
  },
78
78
  {
79
79
  files: [
80
- 'docs/js/**/*.js'
80
+ '**/docs/js/**/*.js'
81
81
  ],
82
82
  env: {
83
83
  node: false,
@@ -116,7 +116,8 @@ module.exports = {
116
116
  },
117
117
  env: {
118
118
  node: true,
119
- es6: true
119
+ es6: true,
120
+ es2020: true
120
121
  },
121
122
  rules: {
122
123
  'comma-style': 'error',
package/README.md CHANGED
@@ -61,7 +61,7 @@ import mongoose from 'mongoose';
61
61
  Or, using [Deno's `createRequire()` for CommonJS support](https://deno.land/std@0.113.0/node/README.md?source=#commonjs-modules-loading) as follows.
62
62
 
63
63
  ```javascript
64
- import { createRequire } from 'https://deno.land/std/node/module.ts';
64
+ import { createRequire } from 'https://deno.land/std@0.177.0/node/module.ts';
65
65
  const require = createRequire(import.meta.url);
66
66
 
67
67
  const mongoose = require('mongoose');