@modern-js/plugin-state 1.0.0-alpha.5 → 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,8 +1,29 @@
1
1
  # @modern-js/plugin-state
2
2
 
3
- ## 1.0.0-alpha.3
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
+
13
+ ## 1.0.0-rc.4
14
+
15
+ ### Patch Changes
16
+
17
+ - fix server route match
18
+ - 204c626: feat: initial
19
+ - Updated dependencies [undefined]
20
+ - Updated dependencies [204c626]
21
+ - @modern-js/runtime-core@1.0.0-rc.4
22
+
23
+ ## 1.0.0-rc.3
24
+
4
25
  ### Patch Changes
5
26
 
6
27
  - feat: initial
7
28
  - Updated dependencies [undefined]
8
- - @modern-js/runtime-core@1.0.0-alpha.3
29
+ - @modern-js/runtime-core@1.0.0-rc.3
@@ -5,6 +5,6 @@
5
5
  // eslint-disable-next-line filenames/match-exported
6
6
  import statePlugin from "./plugin";
7
7
  export * from '@modern-js-reduck/react';
8
- export { model } from '@modern-js-reduck/store';
8
+ export { model, createStore } from '@modern-js-reduck/store';
9
9
  export * from "./plugin";
10
10
  export default statePlugin;
@@ -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({
@@ -4,8 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  var _exportNames = {
7
- model: true
7
+ model: true,
8
+ createStore: true
8
9
  };
10
+ Object.defineProperty(exports, "createStore", {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _store.createStore;
14
+ }
15
+ });
9
16
  exports.default = void 0;
10
17
  Object.defineProperty(exports, "model", {
11
18
  enumerable: true,
@@ -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({
@@ -5,6 +5,6 @@
5
5
  // eslint-disable-next-line filenames/match-exported
6
6
  import statePlugin from "./plugin";
7
7
  export * from '@modern-js-reduck/react';
8
- export { model } from '@modern-js-reduck/store';
8
+ export { model, createStore } from '@modern-js-reduck/store';
9
9
  export * from "./plugin";
10
10
  export default statePlugin;
@@ -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,
@@ -1,5 +1,5 @@
1
1
  import statePlugin from './plugin';
2
2
  export * from '@modern-js-reduck/react';
3
- export { model } from '@modern-js-reduck/store';
3
+ export { model, createStore } from '@modern-js-reduck/store';
4
4
  export * from './plugin';
5
5
  export default statePlugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modern-js/plugin-state",
3
- "version": "1.0.0-alpha.5",
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,25 +45,29 @@
45
45
  "redux-logger": "^3.0.6"
46
46
  },
47
47
  "devDependencies": {
48
- "@modern-js/core": "1.0.0-alpha.5",
49
- "@modern-js/plugin": "1.0.0-alpha.5",
50
- "@modern-js/runtime-core": "1.0.0-alpha.5",
51
- "@modern-js/utils": "1.0.0-alpha.5",
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-alpha.3",
59
- "@modern-js/module-tools": "^1.0.0-alpha.3"
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-alpha.5",
63
+ "@modern-js/runtime-core": "^1.0.0-rc.5",
64
64
  "react": "^17.0.2"
65
65
  },
66
66
  "modernConfig": {},
67
+ "publishConfig": {
68
+ "registry": "https://registry.npmjs.org/",
69
+ "access": "public"
70
+ },
67
71
  "scripts": {
68
72
  "new": "modern new",
69
73
  "build": "modern build",
@@ -7,7 +7,7 @@
7
7
  import statePlugin from './plugin';
8
8
 
9
9
  export * from '@modern-js-reduck/react';
10
- export { model } from '@modern-js-reduck/store';
10
+ export { model, createStore } from '@modern-js-reduck/store';
11
11
 
12
12
  export * from './plugin';
13
13
 
@@ -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({
package/type.d.ts CHANGED
@@ -3,4 +3,4 @@
3
3
  /// <reference types="@modern-js-reduck/plugin-effects" />
4
4
  /// <reference types="@modern-js-reduck/plugin-immutable" />
5
5
 
6
- export * from "./dist/types/runtime/index";
6
+ export * from './dist/types/runtime';