monastery 1.40.0 → 1.40.2

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/changelog.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.40.2](https://github.com/boycce/monastery/compare/1.40.1...1.40.2) (2022-12-15)
6
+
7
+ ### [1.40.1](https://github.com/boycce/monastery/compare/1.40.0...1.40.1) (2022-12-14)
8
+
5
9
  ## [1.40.0](https://github.com/boycce/monastery/compare/1.39.2...1.40.0) (2022-12-14)
6
10
 
7
11
  ### [1.39.2](https://github.com/boycce/monastery/compare/1.39.1...1.39.2) (2022-09-12)
package/lib/index.js CHANGED
@@ -93,7 +93,7 @@ let models = async function(pathname, waitForIndexes) {
93
93
  let filepath = path.join(pathname, filename)
94
94
  let definition = (await import(filepath)).default
95
95
  let name = filename.replace('.js', '')
96
- if (waitForIndexes) out[name] = out[name] = this.model(name, { ...definition, waitForIndexes })
96
+ if (waitForIndexes) out[name] = await this.model(name, { ...definition, waitForIndexes })
97
97
  else out[name] = this.model(name, definition)
98
98
  }
99
99
  return out
package/lib/model-crud.js CHANGED
@@ -298,7 +298,6 @@ module.exports = {
298
298
  }
299
299
  try {
300
300
  opts = await this._queryObject(opts, 'remove')
301
- if (util.isEmpty(opts.query)) throw new Error('Please specify opts.query')
302
301
 
303
302
  // Remove
304
303
  await util.runSeries(this.beforeRemove.map(f => f.bind(opts)))
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "monastery",
3
3
  "description": "⛪ A straight forward MongoDB ODM built around Monk",
4
4
  "author": "Ricky Boyce",
5
- "version": "1.40.0",
5
+ "version": "1.40.2",
6
6
  "license": "MIT",
7
7
  "repository": "github:boycce/monastery",
8
8
  "homepage": "https://boycce.github.io/monastery/",