@coaction/redux 1.0.1 → 1.2.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/dist/index.js +7 -2
- package/dist/index.mjs +7 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -47,7 +47,7 @@ function stripFunctions(value) {
|
|
|
47
47
|
}
|
|
48
48
|
if (typeof value === "object" && value !== null) {
|
|
49
49
|
const next = {};
|
|
50
|
-
for (const key
|
|
50
|
+
for (const key of Object.keys(value)) {
|
|
51
51
|
const child = value[key];
|
|
52
52
|
if (typeof child === "function") {
|
|
53
53
|
continue;
|
|
@@ -79,7 +79,7 @@ var bindRedux = (reduxStore) => {
|
|
|
79
79
|
if (coactionStore.share === "client") {
|
|
80
80
|
throw new Error("client redux store cannot be updated");
|
|
81
81
|
}
|
|
82
|
-
reduxStore.subscribe(() => {
|
|
82
|
+
const unsubscribe = reduxStore.subscribe(() => {
|
|
83
83
|
if (isCoactionUpdating) {
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
@@ -90,6 +90,11 @@ var bindRedux = (reduxStore) => {
|
|
|
90
90
|
isReduxUpdating = false;
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
|
+
const baseDestroy = coactionStore.destroy;
|
|
94
|
+
coactionStore.destroy = () => {
|
|
95
|
+
unsubscribe();
|
|
96
|
+
baseDestroy();
|
|
97
|
+
};
|
|
93
98
|
internal.updateImmutable = (nextState) => {
|
|
94
99
|
if (isReduxUpdating) {
|
|
95
100
|
return;
|
package/dist/index.mjs
CHANGED
|
@@ -45,7 +45,7 @@ function stripFunctions(value) {
|
|
|
45
45
|
}
|
|
46
46
|
if (typeof value === "object" && value !== null) {
|
|
47
47
|
const next = {};
|
|
48
|
-
for (const key
|
|
48
|
+
for (const key of Object.keys(value)) {
|
|
49
49
|
const child = value[key];
|
|
50
50
|
if (typeof child === "function") {
|
|
51
51
|
continue;
|
|
@@ -77,7 +77,7 @@ var bindRedux = (reduxStore) => {
|
|
|
77
77
|
if (coactionStore.share === "client") {
|
|
78
78
|
throw new Error("client redux store cannot be updated");
|
|
79
79
|
}
|
|
80
|
-
reduxStore.subscribe(() => {
|
|
80
|
+
const unsubscribe = reduxStore.subscribe(() => {
|
|
81
81
|
if (isCoactionUpdating) {
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
@@ -88,6 +88,11 @@ var bindRedux = (reduxStore) => {
|
|
|
88
88
|
isReduxUpdating = false;
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
|
+
const baseDestroy = coactionStore.destroy;
|
|
92
|
+
coactionStore.destroy = () => {
|
|
93
|
+
unsubscribe();
|
|
94
|
+
baseDestroy();
|
|
95
|
+
};
|
|
91
96
|
internal.updateImmutable = (nextState) => {
|
|
92
97
|
if (isReduxUpdating) {
|
|
93
98
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coaction/redux",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "A Coaction integration tool for Redux Toolkit",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"state",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@reduxjs/toolkit": "^2.0.0",
|
|
42
|
-
"coaction": "^1.0
|
|
42
|
+
"coaction": "^1.2.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependenciesMeta": {
|
|
45
45
|
"coaction": {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@reduxjs/toolkit": "^2.10.1",
|
|
54
|
-
"coaction": "
|
|
54
|
+
"coaction": "1.2.0"
|
|
55
55
|
},
|
|
56
56
|
"publishConfig": {
|
|
57
57
|
"access": "public",
|