teamplay 0.2.1 → 0.2.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/package.json +8 -8
- package/utils/setDiffDeep.js +5 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "teamplay",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Full-stack signals ORM with multiplayer",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@nx-js/observer-util": "^4.1.3",
|
|
26
|
-
"@teamplay/backend": "^0.2.
|
|
27
|
-
"@teamplay/cache": "^0.2.
|
|
28
|
-
"@teamplay/channel": "^0.2.
|
|
29
|
-
"@teamplay/debug": "^0.2.
|
|
30
|
-
"@teamplay/schema": "^0.2.
|
|
31
|
-
"@teamplay/utils": "^0.2.
|
|
26
|
+
"@teamplay/backend": "^0.2.2",
|
|
27
|
+
"@teamplay/cache": "^0.2.2",
|
|
28
|
+
"@teamplay/channel": "^0.2.2",
|
|
29
|
+
"@teamplay/debug": "^0.2.2",
|
|
30
|
+
"@teamplay/schema": "^0.2.2",
|
|
31
|
+
"@teamplay/utils": "^0.2.2",
|
|
32
32
|
"diff-match-patch": "^1.0.5",
|
|
33
33
|
"events": "^3.3.0",
|
|
34
34
|
"json0-ot-diff": "^1.1.2",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
]
|
|
64
64
|
},
|
|
65
65
|
"license": "MIT",
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "a3c17b5956a4ff67393906cf5421b3101771b39f"
|
|
67
67
|
}
|
package/utils/setDiffDeep.js
CHANGED
|
@@ -8,6 +8,10 @@ export default function setDiffDeep (existing, updated) {
|
|
|
8
8
|
return updated
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
// If the referenced value is the same it means that nothing has changed
|
|
12
|
+
// so we just return the original reference
|
|
13
|
+
if (existing === updated) return existing
|
|
14
|
+
|
|
11
15
|
// Handle arrays
|
|
12
16
|
if (Array.isArray(updated)) {
|
|
13
17
|
existing.length = updated.length
|
|
@@ -19,9 +23,7 @@ export default function setDiffDeep (existing, updated) {
|
|
|
19
23
|
|
|
20
24
|
// Handle non-plain objects - just return them as-is to fully overwrite
|
|
21
25
|
// and don't try to update an old object in-place
|
|
22
|
-
if (!isPlainObject(updated))
|
|
23
|
-
return updated
|
|
24
|
-
}
|
|
26
|
+
if (!isPlainObject(updated)) return updated
|
|
25
27
|
|
|
26
28
|
// Handle objects
|
|
27
29
|
for (const key in existing) {
|