@cocreate/indexeddb 1.19.0 → 1.20.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 +15 -0
- package/package.json +2 -2
- package/src/index.js +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# [1.20.0](https://github.com/CoCreate-app/CoCreate-indexeddb/compare/v1.19.1...v1.20.0) (2023-11-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* upgrade dependencies for latest features and fixes ([f66d85a](https://github.com/CoCreate-app/CoCreate-indexeddb/commit/f66d85aaadf061f519820508e7cca866ff7d99bf))
|
|
7
|
+
|
|
8
|
+
## [1.19.1](https://github.com/CoCreate-app/CoCreate-indexeddb/compare/v1.19.0...v1.19.1) (2023-11-22)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* handle object value string ([bf09800](https://github.com/CoCreate-app/CoCreate-indexeddb/commit/bf098005b0d9e494a6a5bb8941774516c3163c0b))
|
|
14
|
+
* let operator ([9e577f7](https://github.com/CoCreate-app/CoCreate-indexeddb/commit/9e577f73bc57f283eb813a4b936d0c1d795fec44))
|
|
15
|
+
|
|
1
16
|
# [1.19.0](https://github.com/CoCreate-app/CoCreate-indexeddb/compare/v1.18.0...v1.19.0) (2023-11-19)
|
|
2
17
|
|
|
3
18
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/indexeddb",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.20.0",
|
|
4
4
|
"description": "A simple indexeddb component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"indexeddb",
|
|
@@ -58,6 +58,6 @@
|
|
|
58
58
|
"webpack-log": "^3.0.1"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@cocreate/utils": "^1.
|
|
61
|
+
"@cocreate/utils": "^1.28.0"
|
|
62
62
|
}
|
|
63
63
|
}
|
package/src/index.js
CHANGED
|
@@ -414,7 +414,9 @@ async function processObject(data, newData, database, array, type) {
|
|
|
414
414
|
try {
|
|
415
415
|
if (!data[type])
|
|
416
416
|
data[type] = []
|
|
417
|
-
if (data[type]
|
|
417
|
+
else if (typeof data[type] === 'string')
|
|
418
|
+
data[type] = [{ _id: data[type] }]
|
|
419
|
+
else if (!Array.isArray(data[type]))
|
|
418
420
|
data[type] = [data[type]]
|
|
419
421
|
|
|
420
422
|
let isFilter
|
|
@@ -788,8 +790,9 @@ function dotNotationToObjectUpdate(data, object = {}) {
|
|
|
788
790
|
let oldObject = new Object(newObject)
|
|
789
791
|
let keys = key.replace(/\[(\d+)\]/g, '.$1').split('.');
|
|
790
792
|
let value = data[key]
|
|
793
|
+
let operator
|
|
791
794
|
if (keys[0].startsWith('$'))
|
|
792
|
-
|
|
795
|
+
operator = keys.shift()
|
|
793
796
|
|
|
794
797
|
let length = keys.length - 1
|
|
795
798
|
for (let i = 0; i < keys.length; i++) {
|