Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Automattic/mongoose
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 008560f6f9cc3c27576c468fc2271bdb92c22842
Choose a base ref
...
head repository: Automattic/mongoose
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 29f57c12caee006f2434a0ef9b21aace9b30fdcf
Choose a head ref

Commits on Nov 2, 2022

  1. Copy the full SHA
    d962724 View commit details
  2. test: add test for gh-11943

    maciasello committed Nov 2, 2022
    Copy the full SHA
    4608748 View commit details
  3. Copy the full SHA
    f81f462 View commit details

Commits on Nov 14, 2022

  1. Copy the full SHA
    1a2d7f8 View commit details
  2. Copy the full SHA
    9ca46d1 View commit details
  3. Copy the full SHA
    8b306eb View commit details
  4. Copy the full SHA
    0cd01da View commit details

Commits on Jan 17, 2023

  1. Copy the full SHA
    c03d3ab View commit details
  2. Copy the full SHA
    d8ed2a6 View commit details
  3. Copy the full SHA
    a65781a View commit details

Commits on Jan 24, 2023

  1. Copy the full SHA
    16072c2 View commit details

Commits on Jan 25, 2023

  1. Copy the full SHA
    264da04 View commit details
  2. Copy the full SHA
    f1393ce View commit details
  3. Copy the full SHA
    8d9df24 View commit details

Commits on Jan 26, 2023

  1. Copy the full SHA
    77c026c View commit details
  2. Copy the full SHA
    70782bc View commit details

Commits on Jan 31, 2023

  1. docs: update local hostname

    changed 127.0.0.1 to 0.0.0.0
    ankushknr19 authored Jan 31, 2023
    Copy the full SHA
    f56cc67 View commit details

Commits on Feb 1, 2023

  1. Update README.md : fixed typo

    Co-authored-by: Hafez <a.hafez852@gmail.com>
    ankushknr19 and AbdelrahmanHafez authored Feb 1, 2023
    Copy the full SHA
    d296be3 View commit details
  2. Merge pull request #12964 from ankushknr19/master

    update README.md: fixed typo
    AbdelrahmanHafez authored Feb 1, 2023
    Copy the full SHA
    eee909d View commit details
  3. chore(deps-dev): bump mkdirp from 1.0.4 to 2.1.3

    Bumps [mkdirp](https://github.com/isaacs/node-mkdirp) from 1.0.4 to 2.1.3.
    - [Release notes](https://github.com/isaacs/node-mkdirp/releases)
    - [Changelog](https://github.com/isaacs/node-mkdirp/blob/main/CHANGELOG.md)
    - [Commits](isaacs/node-mkdirp@v1.0.4...v2.1.3)
    
    ---
    updated-dependencies:
    - dependency-name: mkdirp
      dependency-type: direct:development
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Feb 1, 2023
    Copy the full SHA
    a713b53 View commit details
  4. chore(deps): bump actions/checkout from 3.2.0 to 3.3.0

    Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 3.3.0.
    - [Release notes](https://github.com/actions/checkout/releases)
    - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
    - [Commits](actions/checkout@755da8c...ac59398)
    
    ---
    updated-dependencies:
    - dependency-name: actions/checkout
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Feb 1, 2023
    Copy the full SHA
    32ba995 View commit details
  5. chore(deps): bump actions/setup-node from 3.5.1 to 3.6.0

    Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.5.1 to 3.6.0.
    - [Release notes](https://github.com/actions/setup-node/releases)
    - [Commits](actions/setup-node@8c91899...64ed1c7)
    
    ---
    updated-dependencies:
    - dependency-name: actions/setup-node
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Feb 1, 2023
    Copy the full SHA
    d686efa View commit details
  6. chore(deps-dev): bump @typescript-eslint/eslint-plugin

    Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.47.1 to 5.50.0.
    - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
    - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
    - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.50.0/packages/eslint-plugin)
    
    ---
    updated-dependencies:
    - dependency-name: "@typescript-eslint/eslint-plugin"
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Feb 1, 2023
    Copy the full SHA
    ba95087 View commit details
  7. chore(deps-dev): bump @typescript-eslint/parser from 5.47.1 to 5.50.0

    Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.47.1 to 5.50.0.
    - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
    - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
    - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.50.0/packages/parser)
    
    ---
    updated-dependencies:
    - dependency-name: "@typescript-eslint/parser"
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Feb 1, 2023
    Copy the full SHA
    814caf8 View commit details

Commits on Feb 2, 2023

  1. Merge pull request #12980 from Automattic/dependabot/github_actions/m…

    …aster/actions/setup-node-3.6.0
    
    chore(deps): bump actions/setup-node from 3.5.1 to 3.6.0
    AbdelrahmanHafez authored Feb 2, 2023
    Copy the full SHA
    49e0c45 View commit details
  2. Merge pull request #12978 from Automattic/dependabot/github_actions/m…

    …aster/actions/checkout-3.3.0
    
    chore(deps): bump actions/checkout from 3.2.0 to 3.3.0
    AbdelrahmanHafez authored Feb 2, 2023
    Copy the full SHA
    325266f View commit details
  3. Merge pull request #12982 from Automattic/dependabot/npm_and_yarn/mas…

    …ter/typescript-eslint/eslint-plugin-5.50.0
    
    chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.47.1 to 5.50.0
    AbdelrahmanHafez authored Feb 2, 2023
    Copy the full SHA
    8660503 View commit details
  4. Copy the full SHA
    8885325 View commit details
  5. Merge pull request #12985 from Automattic/dependabot/npm_and_yarn/mas…

    …ter/typescript-eslint/parser-5.50.0
    
    chore(deps-dev): bump @typescript-eslint/parser from 5.47.1 to 5.50.0
    AbdelrahmanHafez authored Feb 2, 2023
    Copy the full SHA
    e403fbf View commit details
  6. chore(deps-dev): bump @babel/core from 7.20.7 to 7.20.12

    Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.20.7 to 7.20.12.
    - [Release notes](https://github.com/babel/babel/releases)
    - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/babel/babel/commits/v7.20.12/packages/babel-core)
    
    ---
    updated-dependencies:
    - dependency-name: "@babel/core"
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Feb 2, 2023
    Copy the full SHA
    67aa976 View commit details
  7. Merge pull request #12983 from Automattic/dependabot/npm_and_yarn/mas…

    …ter/babel/core-7.20.12
    
    chore(deps-dev): bump @babel/core from 7.20.7 to 7.20.12
    AbdelrahmanHafez authored Feb 2, 2023
    Copy the full SHA
    1595d15 View commit details
  8. chore(deps-dev): bump eslint from 8.31.0 to 8.33.0

    Bumps [eslint](https://github.com/eslint/eslint) from 8.31.0 to 8.33.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](eslint/eslint@v8.31.0...v8.33.0)
    
    ---
    updated-dependencies:
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Feb 2, 2023
    Copy the full SHA
    8fdbbf2 View commit details
  9. chore(deps-dev): bump typescript from 4.9.4 to 4.9.5

    Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.9.4 to 4.9.5.
    - [Release notes](https://github.com/Microsoft/TypeScript/releases)
    - [Commits](microsoft/TypeScript@v4.9.4...v4.9.5)
    
    ---
    updated-dependencies:
    - dependency-name: typescript
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Feb 2, 2023
    Copy the full SHA
    ff2603b View commit details
  10. Merge pull request #12976 from Automattic/dependabot/npm_and_yarn/mas…

    …ter/typescript-4.9.5
    
    chore(deps-dev): bump typescript from 4.9.4 to 4.9.5
    AbdelrahmanHafez authored Feb 2, 2023
    Copy the full SHA
    e6b11fb View commit details
  11. Merge pull request #12979 from Automattic/dependabot/npm_and_yarn/mas…

    …ter/eslint-8.33.0
    
    chore(deps-dev): bump eslint from 8.31.0 to 8.33.0
    AbdelrahmanHafez authored Feb 2, 2023
    Copy the full SHA
    12e9e40 View commit details
  12. Merge pull request #12975 from Automattic/dependabot/npm_and_yarn/mas…

    …ter/mkdirp-2.1.3
    
    chore(deps-dev): bump mkdirp from 1.0.4 to 2.1.3
    AbdelrahmanHafez authored Feb 2, 2023
    Copy the full SHA
    0ebd706 View commit details
  13. chore(deps-dev): bump marked from 4.2.5 to 4.2.12

    Bumps [marked](https://github.com/markedjs/marked) from 4.2.5 to 4.2.12.
    - [Release notes](https://github.com/markedjs/marked/releases)
    - [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
    - [Commits](markedjs/marked@v4.2.5...v4.2.12)
    
    ---
    updated-dependencies:
    - dependency-name: marked
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Feb 2, 2023
    Copy the full SHA
    dd53871 View commit details
  14. Merge pull request #12987 from Automattic/dependabot/npm_and_yarn/mas…

    …ter/marked-4.2.12
    
    chore(deps-dev): bump marked from 4.2.5 to 4.2.12
    AbdelrahmanHafez authored Feb 2, 2023
    Copy the full SHA
    5970652 View commit details
  15. chore(deps-dev): bump mongodb-memory-server from 8.10.2 to 8.11.4

    Bumps [mongodb-memory-server](https://github.com/nodkz/mongodb-memory-server/tree/HEAD/packages/mongodb-memory-server) from 8.10.2 to 8.11.4.
    - [Release notes](https://github.com/nodkz/mongodb-memory-server/releases)
    - [Changelog](https://github.com/nodkz/mongodb-memory-server/blob/master/CHANGELOG.md)
    - [Commits](https://github.com/nodkz/mongodb-memory-server/commits/v8.11.4/packages/mongodb-memory-server)
    
    ---
    updated-dependencies:
    - dependency-name: mongodb-memory-server
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Feb 2, 2023
    Copy the full SHA
    d41d0ea View commit details
  16. Merge pull request #12986 from Automattic/dependabot/npm_and_yarn/mas…

    …ter/mongodb-memory-server-8.11.4
    
    chore(deps-dev): bump mongodb-memory-server from 8.10.2 to 8.11.4
    AbdelrahmanHafez authored Feb 2, 2023
    Copy the full SHA
    e616072 View commit details
  17. Copy the full SHA
    90f45cd View commit details
  18. fixed example id values

    lpizzinidev committed Feb 2, 2023
    Copy the full SHA
    9e10a5e View commit details

Commits on Feb 3, 2023

  1. fix(document): isModified should not be triggered when setting a nest…

    …ed boolean to the same value as previosly
    
    fix #12992
    lpizzinidev committed Feb 3, 2023
    Copy the full SHA
    b17db90 View commit details
  2. Update transactions.md

    Removed unnecessary 'or' from line 15.
    Parth86 authored Feb 3, 2023
    Copy the full SHA
    643b22e View commit details
  3. Merge pull request #12995 from Parth86/patch-1

    Update transactions.md
    vkarpov15 authored Feb 3, 2023
    Copy the full SHA
    e6f6308 View commit details
  4. Update document.js

    vkarpov15 authored Feb 3, 2023
    Copy the full SHA
    a69194f View commit details
  5. Merge pull request #12994 from lpizzinidev/gh-12992

    fix(document): isModified should not be triggered when setting a nested boolean to the same value as previosly
    vkarpov15 authored Feb 3, 2023
    Copy the full SHA
    7c6fbb2 View commit details
  6. Merge pull request #12990 from lpizzinidev/gh-12966

    fix(connection): handles unique autoincrement ID for connections
    vkarpov15 authored Feb 3, 2023
    Copy the full SHA
    748cb51 View commit details
  7. Merge pull request #12954 from Jokero/fixNearAggregateOperatorInputType

    Fix "near" aggregation operator input type
    vkarpov15 authored Feb 3, 2023
    Copy the full SHA
    e335cd3 View commit details
  8. Merge pull request #12952 from lpizzinidev/gh-12950

    types(expressions): added missing Top operator to `AccumulatorOperator` type declaration
    vkarpov15 authored Feb 3, 2023
    Copy the full SHA
    e3ed34f View commit details
Showing with 5,276 additions and 2,681 deletions.
  1. +232 −0 .eslintrc.js
  2. +0 −194 .eslintrc.json
  3. +2 −2 .github/workflows/benchmark.yml
  4. +1 −1 .github/workflows/codeql.yml
  5. +3 −2 .github/workflows/documentation.yml
  6. +20 −33 .github/workflows/test.yml
  7. +2 −2 .github/workflows/tidelift-alignment.yml
  8. +4 −4 .github/workflows/tsd.yml
  9. +5 −0 .gitignore
  10. +174 −0 CHANGELOG.md
  11. +17 −17 README.md
  12. +70 −38 benchmarks/get.js
  13. +55 −0 benchmarks/mapOfSubdocs.js
  14. +4 −4 docs/advanced_schemas.md
  15. +7 −7 docs/api.pug
  16. +11 −11 docs/api_split.pug
  17. +31 −31 docs/async-await.md
  18. +6 −6 docs/change-streams.md
  19. +34 −0 docs/check-version.md
  20. +1 −1 docs/compatibility.md
  21. +26 −26 docs/connections.md
  22. +0 −3 docs/contributing.md
  23. +4 −4 docs/customschematypes.md
  24. +10 −10 docs/defaults.md
  25. +4 −4 docs/deprecations.md
  26. +11 −11 docs/discriminators.md
  27. +6 −6 docs/documents.md
  28. +3 −3 docs/enterprise.md
  29. +12 −10 docs/faq.md
  30. +8 −14 docs/geojson.md
  31. +148 −144 docs/guide.md
  32. +9 −6 docs/guides.md
  33. +14 −13 docs/includes/favicon.pug
  34. +1 −1 docs/includes/native.pug
  35. +6 −6 docs/index.md
  36. +6 −0 docs/jest.md
  37. +29 −28 docs/js/api-bold-current-nav.js
  38. +0 −6 docs/js/cookies.min.js
  39. +11 −10 docs/js/mobile-navbar-toggle.js
  40. +6 −7 docs/js/navbar-search.js
  41. +17 −16 docs/js/search.js
  42. +0 −4 docs/js/zepto.min.js
  43. +3 −13 docs/lambda.md
  44. +71 −65 docs/layout.pug
  45. +14 −6 docs/loadSponsorData.js
  46. +29 −28 docs/middleware.md
  47. +91 −89 docs/migrating_to_5.md
  48. +51 −40 docs/migrating_to_6.md
  49. +6 −6 docs/migration.md
  50. +8 −8 docs/models.md
  51. +12 −12 docs/plugins.md
  52. +48 −47 docs/populate.md
  53. +0 −8 docs/prior.pug
  54. +10 −10 docs/promises.md
  55. +27 −27 docs/queries.md
  56. +88 −48 docs/schematypes.md
  57. +3 −3 docs/search.pug
  58. +107 −40 docs/source/api.js
  59. +5 −5 docs/source/home.js
  60. +75 −44 docs/source/index.js
  61. +8 −0 docs/source/tutorials.js
  62. +7 −0 docs/source/typescript.js
  63. +29 −0 docs/source/utils.js
  64. +0 −29 docs/splitApiDocs.js
  65. +3 −3 docs/sponsors.pug
  66. +21 −24 docs/subdocs.md
  67. +9 −9 docs/timestamps.md
  68. +26 −13 docs/transactions.md
  69. +3 −3 docs/tutorials/custom-casting.md
  70. +6 −6 docs/tutorials/dates.md
  71. +9 −9 docs/tutorials/findoneandupdate.md
  72. +23 −14 docs/tutorials/getters-setters.md
  73. +0 −15 docs/tutorials/index.js
  74. +10 −10 docs/tutorials/lean.md
  75. +10 −12 docs/tutorials/query_casting.md
  76. +4 −5 docs/tutorials/ssl.md
  77. +6 −6 docs/tutorials/virtuals.md
  78. +5 −5 docs/typescript.md
  79. +0 −14 docs/typescript/index.js
  80. +4 −4 docs/typescript/query-helpers.md
  81. +6 −6 docs/typescript/schemas.md
  82. +3 −2 docs/typescript/statics-and-methods.md
  83. +2 −2 docs/typescript/statics.md
  84. +5 −5 docs/typescript/virtuals.md
  85. +33 −32 docs/validation.md
  86. +27 −0 docs/version-support.md
  87. +1 −1 examples/aggregate/aggregate.js
  88. +1 −1 examples/geospatial/geospatial.js
  89. +2 −3 index.pug
  90. +42 −43 lib/aggregate.js
  91. +1 −8 lib/cast.js
  92. +16 −6 lib/connection.js
  93. +2 −2 lib/cursor/AggregationCursor.js
  94. +4 −1 lib/cursor/ChangeStream.js
  95. +3 −2 lib/cursor/QueryCursor.js
  96. +155 −85 lib/document.js
  97. +25 −6 lib/drivers/node-mongodb-native/collection.js
  98. +21 −10 lib/error/index.js
  99. +1 −1 lib/error/objectParameter.js
  100. +1 −1 lib/error/serverSelection.js
  101. +2 −1 lib/helpers/discriminator/mergeDiscriminatorSchema.js
  102. +17 −4 lib/helpers/document/applyDefaults.js
  103. +11 −1 lib/helpers/document/compile.js
  104. +0 −39 lib/helpers/path/flattenObjectWithDottedPaths.js
  105. +15 −11 lib/helpers/printJestWarning.js
  106. +4 −3 lib/helpers/processConnectionOptions.js
  107. +1 −0 lib/helpers/projection/hasIncludedChildren.js
  108. +8 −0 lib/helpers/projection/isNestedProjection.js
  109. +1 −1 lib/helpers/query/cast$expr.js
  110. +1 −12 lib/helpers/query/castUpdate.js
  111. +0 −1 lib/helpers/schema/getPath.js
  112. +38 −10 lib/index.js
  113. +210 −111 lib/model.js
  114. +206 −198 lib/query.js
  115. +80 −8 lib/schema.js
  116. +100 −0 lib/schema/DocumentArrayElement.js
  117. +7 −5 lib/schema/SubdocumentPath.js
  118. +2 −2 lib/schema/array.js
  119. +10 −19 lib/schema/documentarray.js
  120. +1 −1 lib/schema/operators/text.js
  121. +17 −12 lib/schema/uuid.js
  122. +5 −2 lib/schematype.js
  123. +1 −1 lib/types/ArraySubdocument.js
  124. +1 −1 lib/types/array/index.js
  125. +12 −13 lib/types/array/methods/index.js
  126. +1 −1 lib/types/buffer.js
  127. +25 −11 lib/types/map.js
  128. +3 −3 lib/types/subdocument.js
  129. +2 −0 lib/utils.js
  130. +1 −1 lib/virtualtype.js
  131. +37 −22 package.json
  132. +34 −25 docs/search.js → scripts/generateSearch.js
  133. +11 −2 scripts/static.js
  134. +230 −35 scripts/website.js
  135. +2 −1 test/.eslintrc.yml
  136. +1 −0 test/collection.capped.test.js
  137. +13 −0 test/collection.test.js
  138. +52 −15 test/connection.test.js
  139. +27 −31 test/deno.js
  140. +54 −0 test/deno_mocha.js
  141. +5 −5 test/docs/asyncIterator.test.js
  142. +30 −48 test/docs/cast.test.js
  143. +2 −2 test/docs/date.test.js
  144. +22 −4 test/docs/debug.test.js
  145. +2 −2 test/docs/defaults.test.js
  146. +5 −5 test/docs/discriminators.test.js
  147. +7 −7 test/docs/findoneandupdate.test.js
  148. +9 −6 test/docs/getters-setters.test.js
  149. +3 −3 test/docs/lean.test.js
  150. +24 −24 test/docs/promises.test.js
  151. +2 −2 test/docs/schemas.test.js
  152. +22 −23 test/docs/transactions.test.js
  153. +4 −4 test/docs/validation.test.js
  154. +5 −6 test/docs/virtuals.test.js
  155. +53 −0 test/document.modified.test.js
  156. +408 −7 test/document.test.js
  157. +32 −0 test/index.test.js
  158. +6 −0 test/mocha-fixtures.js
  159. +21 −0 test/model.discriminator.querying.test.js
  160. +69 −0 test/model.discriminator.test.js
  161. +0 −1 test/model.findOneAndReplace.test.js
  162. +10 −0 test/model.findOneAndUpdate.test.js
  163. +66 −0 test/model.indexes.test.js
  164. +60 −0 test/model.populate.test.js
  165. +179 −0 test/model.test.js
  166. +31 −2 test/model.update.test.js
  167. +24 −0 test/query.cursor.test.js
  168. +47 −13 test/query.test.js
  169. +95 −1 test/schema.test.js
  170. +50 −2 test/schema.uuid.test.js
  171. +68 −5 test/schema.validation.test.js
  172. +18 −0 test/types.documentarray.test.js
  173. +1 −0 test/types.map.test.js
  174. +8 −15 test/types.subdocument.test.js
  175. +2 −0 test/types/.eslintrc.yml
  176. +5 −5 test/types/PipelineStage.test.ts
  177. +7 −0 test/types/expressions.test.ts
  178. +1 −1 test/types/lean.test.ts
  179. +57 −3 test/types/models.test.ts
  180. +17 −0 test/types/mongo.test.ts
  181. +30 −0 test/types/populate.test.ts
  182. +8 −0 test/types/querycursor.test.ts
  183. +32 −0 test/types/subdocuments.test.ts
  184. +2 −2 test/virtualtype.test.js
  185. +4 −67 types/aggregate.d.ts
  186. +9 −0 types/augmentations.d.ts
  187. +4 −4 types/connection.d.ts
  188. +4 −4 types/cursor.d.ts
  189. +1 −1 types/document.d.ts
  190. +5 −0 types/error.d.ts
  191. +154 −153 types/expressions.d.ts
  192. +9 −6 types/index.d.ts
  193. +38 −11 types/models.d.ts
  194. +8 −1 types/mongooseoptions.d.ts
  195. +39 −35 types/pipelinestage.d.ts
  196. +10 −10 types/query.d.ts
  197. +1 −1 types/schematypes.d.ts
  198. +4 −4 types/session.d.ts
  199. +1 −1 types/types.d.ts
  200. +1 −0 types/validation.d.ts
232 changes: 232 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,232 @@
'use strict';

module.exports = {
extends: [
'eslint:recommended'
],
ignorePatterns: [
'tools',
'dist',
'website.js',
'test/files/*',
'benchmarks',
'*.min.js',
'docs/js/native.js'
],
overrides: [
{
files: [
'**/*.{ts,tsx}',
'**/*.md/*.ts',
'**/*.md/*.typescript'
],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended'
],
plugins: [
'@typescript-eslint'
],
rules: {
'@typescript-eslint/triple-slash-reference': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-empty-function': 'off',
'spaced-comment': [
'error',
'always',
{
block: {
markers: [
'!'
],
balanced: true
},
markers: [
'/'
]
}
],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/indent': [
'warn',
2,
{
SwitchCase: 1,
ignoredNodes: ['TSTypeParameterInstantiation']
}
],
'@typescript-eslint/prefer-optional-chain': 'error',
'@typescript-eslint/brace-style': 'error',
'@typescript-eslint/no-dupe-class-members': 'error',
'@typescript-eslint/no-redeclare': 'error',
'@typescript-eslint/type-annotation-spacing': 'error',
'@typescript-eslint/object-curly-spacing': [
'error',
'always'
],
'@typescript-eslint/semi': 'error',
'@typescript-eslint/space-before-function-paren': [
'error',
'never'
],
'@typescript-eslint/space-infix-ops': 'off'
}
},
{
files: [
'docs/js/**/*.js'
],
env: {
node: false,
browser: true
}
}
// // eslint-plugin-markdown has been disabled because of out-standing issues, see https://github.com/eslint/eslint-plugin-markdown/issues/214
// {
// files: ['**/*.md'],
// processor: 'markdown/markdown'
// },
// {
// files: ['**/*.md/*.js', '**/*.md/*.javascript', '**/*.md/*.ts', '**/*.md/*.typescript'],
// parserOptions: {
// ecmaFeatures: {
// impliedStrict: true
// },
// sourceType: 'module', // required to allow "import" statements
// ecmaVersion: 'latest' // required to allow top-level await
// },
// rules: {
// 'no-undef': 'off',
// 'no-unused-expressions': 'off',
// 'no-unused-vars': 'off',
// 'no-redeclare': 'off',
// '@typescript-eslint/no-redeclare': 'off'
// }
// }
],
plugins: [
'mocha-no-only'
// 'markdown'
],
parserOptions: {
ecmaVersion: 2020
},
env: {
node: true,
es6: true
},
rules: {
'comma-style': 'error',
indent: [
'error',
2,
{
SwitchCase: 1,
VariableDeclarator: 2
}
],
'keyword-spacing': 'error',
'no-whitespace-before-property': 'error',
'no-buffer-constructor': 'warn',
'no-console': 'off',
'no-constant-condition': 'off',
'no-multi-spaces': 'error',
'func-call-spacing': 'error',
'no-trailing-spaces': 'error',
'no-undef': 'error',
'no-unneeded-ternary': 'error',
'no-const-assign': 'error',
'no-useless-rename': 'error',
'no-dupe-keys': 'error',
'space-in-parens': [
'error',
'never'
],
'spaced-comment': [
'error',
'always',
{
block: {
markers: [
'!'
],
balanced: true
}
}
],
'key-spacing': [
'error',
{
beforeColon: false,
afterColon: true
}
],
'comma-spacing': [
'error',
{
before: false,
after: true
}
],
'array-bracket-spacing': 1,
'arrow-spacing': [
'error',
{
before: true,
after: true
}
],
'object-curly-spacing': [
'error',
'always'
],
'comma-dangle': [
'error',
'never'
],
'no-unreachable': 'error',
quotes: [
'error',
'single'
],
'quote-props': [
'error',
'as-needed'
],
semi: 'error',
'no-extra-semi': 'error',
'semi-spacing': 'error',
'no-spaced-func': 'error',
'no-throw-literal': 'error',
'space-before-blocks': 'error',
'space-before-function-paren': [
'error',
'never'
],
'space-infix-ops': 'error',
'space-unary-ops': 'error',
'no-var': 'warn',
'prefer-const': 'warn',
strict: [
'error',
'global'
],
'no-restricted-globals': [
'error',
{
name: 'context',
message: 'Don\'t use Mocha\'s global context'
}
],
'no-prototype-builtins': 'off',
'mocha-no-only/mocha-no-only': [
'error'
],
'no-empty': 'off',
'eol-last': 'warn',
'no-multiple-empty-lines': ['warn', { max: 2 }]
}
};
Loading