@cocreate/mongodb 1.13.0 → 1.14.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [1.14.0](https://github.com/CoCreate-app/CoCreate-mongodb/compare/v1.13.1...v1.14.0) (2023-11-25)
2
+
3
+
4
+ ### Features
5
+
6
+ * upgrade dependencies for latest features and fixes ([138490f](https://github.com/CoCreate-app/CoCreate-mongodb/commit/138490f9f73880dae73d4f0895aa84648f6d0418))
7
+
8
+ ## [1.13.1](https://github.com/CoCreate-app/CoCreate-mongodb/compare/v1.13.0...v1.13.1) (2023-11-19)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * handle object value string ([a97f529](https://github.com/CoCreate-app/CoCreate-mongodb/commit/a97f529b6991d6e7bf9967b7cd4bb6e7a0d6178d))
14
+
1
15
  # [1.13.0](https://github.com/CoCreate-app/CoCreate-mongodb/compare/v1.12.3...v1.13.0) (2023-11-19)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/mongodb",
3
- "version": "1.13.0",
3
+ "version": "1.14.0",
4
4
  "description": "A simple mongodb component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "mongodb",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "main": "./src/index.js",
47
47
  "dependencies": {
48
- "@cocreate/utils": "^1.27.4",
48
+ "@cocreate/utils": "^1.28.0",
49
49
  "mongodb": "^4.12.1"
50
50
  }
51
51
  }
package/src/index.js CHANGED
@@ -272,7 +272,9 @@ function object(method, data) {
272
272
 
273
273
  if (!data[type])
274
274
  data[type] = []
275
- if (data[type] && !Array.isArray(data[type]))
275
+ else if (typeof data[type] === 'string')
276
+ data[type] = [{ _id: data[type] }]
277
+ else if (!Array.isArray(data[type]))
276
278
  data[type] = [data[type]]
277
279
 
278
280
  let isFilter