@modern-js/plugin-state 1.0.0-rc.4 → 1.0.0-rc.5
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,5 +1,15 @@
|
|
|
1
1
|
# @modern-js/plugin-state
|
|
2
2
|
|
|
3
|
+
## 1.0.0-rc.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 224f7fe: fix server route match
|
|
8
|
+
- 204c626: feat: initial
|
|
9
|
+
- Updated dependencies [224f7fe]
|
|
10
|
+
- Updated dependencies [204c626]
|
|
11
|
+
- @modern-js/runtime-core@1.0.0-rc.5
|
|
12
|
+
|
|
3
13
|
## 1.0.0-rc.4
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -28,7 +28,7 @@ const state = config => createPlugin(() => ({
|
|
|
28
28
|
|
|
29
29
|
init({
|
|
30
30
|
context
|
|
31
|
-
}) {
|
|
31
|
+
}, next) {
|
|
32
32
|
const storeConfig = config || {};
|
|
33
33
|
|
|
34
34
|
if (typeof window !== 'undefined') {
|
|
@@ -38,6 +38,9 @@ const state = config => createPlugin(() => ({
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
context.store = createStore(storeConfig);
|
|
41
|
+
next({
|
|
42
|
+
context
|
|
43
|
+
});
|
|
41
44
|
},
|
|
42
45
|
|
|
43
46
|
pickContext({
|
|
@@ -53,7 +53,7 @@ const state = config => (0, _runtimeCore.createPlugin)(() => ({
|
|
|
53
53
|
|
|
54
54
|
init({
|
|
55
55
|
context
|
|
56
|
-
}) {
|
|
56
|
+
}, next) {
|
|
57
57
|
const storeConfig = config || {};
|
|
58
58
|
|
|
59
59
|
if (typeof window !== 'undefined') {
|
|
@@ -63,6 +63,9 @@ const state = config => (0, _runtimeCore.createPlugin)(() => ({
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
context.store = (0, _store.createStore)(storeConfig);
|
|
66
|
+
next({
|
|
67
|
+
context
|
|
68
|
+
});
|
|
66
69
|
},
|
|
67
70
|
|
|
68
71
|
pickContext({
|
|
@@ -26,7 +26,7 @@ var state = function state(config) {
|
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
},
|
|
29
|
-
init: function init(_ref2) {
|
|
29
|
+
init: function init(_ref2, next) {
|
|
30
30
|
var context = _ref2.context;
|
|
31
31
|
var storeConfig = config || {};
|
|
32
32
|
|
|
@@ -37,6 +37,9 @@ var state = function state(config) {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
context.store = createStore(storeConfig);
|
|
40
|
+
next({
|
|
41
|
+
context: context
|
|
42
|
+
});
|
|
40
43
|
},
|
|
41
44
|
pickContext: function pickContext(_ref3, next) {
|
|
42
45
|
var context = _ref3.context,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modern-js/plugin-state",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.5",
|
|
4
4
|
"jsnext:source": "./src/index.ts",
|
|
5
5
|
"types": "./type.d.ts",
|
|
6
6
|
"main": "./dist/js/node/runtime/index.js",
|
|
@@ -45,26 +45,26 @@
|
|
|
45
45
|
"redux-logger": "^3.0.6"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@modern-js/core": "^1.0.0-rc.
|
|
49
|
-
"@modern-js/plugin": "^1.0.0-rc.
|
|
50
|
-
"@modern-js/runtime-core": "^1.0.0-rc.
|
|
51
|
-
"@modern-js/utils": "^1.0.0-rc.
|
|
48
|
+
"@modern-js/core": "^1.0.0-rc.5",
|
|
49
|
+
"@modern-js/plugin": "^1.0.0-rc.5",
|
|
50
|
+
"@modern-js/runtime-core": "^1.0.0-rc.5",
|
|
51
|
+
"@modern-js/utils": "^1.0.0-rc.5",
|
|
52
52
|
"@types/jest": "^26",
|
|
53
53
|
"@types/node": "^14",
|
|
54
54
|
"@types/react": "^17",
|
|
55
55
|
"@types/react-dom": "^17",
|
|
56
56
|
"react": "^17.0.2",
|
|
57
57
|
"typescript": "^4",
|
|
58
|
-
"@modern-js/plugin-testing": "^1.0.0-rc.
|
|
59
|
-
"@modern-js/module-tools": "^1.0.0-rc.
|
|
58
|
+
"@modern-js/plugin-testing": "^1.0.0-rc.5",
|
|
59
|
+
"@modern-js/module-tools": "^1.0.0-rc.5"
|
|
60
60
|
},
|
|
61
61
|
"sideEffects": false,
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@modern-js/runtime-core": "^1.0.0-rc.
|
|
63
|
+
"@modern-js/runtime-core": "^1.0.0-rc.5",
|
|
64
64
|
"react": "^17.0.2"
|
|
65
65
|
},
|
|
66
66
|
"modernConfig": {},
|
|
67
|
-
"
|
|
67
|
+
"publishConfig": {
|
|
68
68
|
"registry": "https://registry.npmjs.org/",
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
package/src/runtime/plugin.tsx
CHANGED
|
@@ -42,7 +42,7 @@ const state = (config: PluginProps) =>
|
|
|
42
42
|
},
|
|
43
43
|
});
|
|
44
44
|
},
|
|
45
|
-
init({ context }) {
|
|
45
|
+
init({ context }, next) {
|
|
46
46
|
const storeConfig = config || {};
|
|
47
47
|
|
|
48
48
|
if (typeof window !== 'undefined') {
|
|
@@ -53,6 +53,8 @@ const state = (config: PluginProps) =>
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
context.store = createStore(storeConfig);
|
|
56
|
+
|
|
57
|
+
next({ context });
|
|
56
58
|
},
|
|
57
59
|
pickContext({ context, pickedContext }, next) {
|
|
58
60
|
return next({
|