@modern-js/runtime 1.21.5 → 1.22.1

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,31 @@
1
1
  # @modern-js/runtime
2
2
 
3
+ ## 1.22.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [5d92b31]
8
+ - Updated dependencies [3971dd6]
9
+ - @modern-js/webpack@1.22.1
10
+ - @modern-js/plugin@1.22.1
11
+ - @modern-js/utils@1.22.1
12
+
13
+ ## 1.21.6
14
+
15
+ ### Patch Changes
16
+
17
+ - bb7788d: fix: bootstrap func ReactDOM params type when use react18
18
+
19
+ fix: 修复当使用 React18 时, bootstrap 函数 ReactDOM 参数类型
20
+
21
+ - e951ac1: fix: state runtime plugin init hook not return next function
22
+
23
+ fix: 修复 state runtime 插件 init 钩子未返回 next 函数
24
+
25
+ - @modern-js/webpack@1.21.6
26
+ - @modern-js/plugin@1.21.6
27
+ - @modern-js/utils@1.21.6
28
+
3
29
  ## 1.21.5
4
30
 
5
31
  ### Patch Changes
@@ -62,7 +62,7 @@ const state = config => ({
62
62
  }
63
63
 
64
64
  context.store = createStore(storeConfig);
65
- next({
65
+ return next({
66
66
  context
67
67
  });
68
68
  },
@@ -92,7 +92,7 @@ const state = config => ({
92
92
  }
93
93
 
94
94
  context.store = (0, _store.createStore)(storeConfig);
95
- next({
95
+ return next({
96
96
  context
97
97
  });
98
98
  },
@@ -60,7 +60,7 @@ var state = function state(config) {
60
60
  }
61
61
 
62
62
  context.store = createStore(storeConfig);
63
- next({
63
+ return next({
64
64
  context: context
65
65
  });
66
66
  },
@@ -7,8 +7,16 @@ export declare type CreateAppOptions = {
7
7
  export declare const createApp: ({
8
8
  plugins
9
9
  }: CreateAppOptions) => (App?: React.ComponentType<any>) => React.ComponentType<any>;
10
+ export interface Root {
11
+ render: (children: React.ReactNode) => void;
12
+ unmount: () => void;
13
+ }
14
+ export interface HydrationOptions {
15
+ identifierPrefix?: string;
16
+ onRecoverableError?: (error: unknown) => void;
17
+ }
10
18
  interface HydrateFunc {
11
- (container: Element | Document, initialChildren: React.ReactNode): void;
19
+ (container: Element | Document, initialChildren: React.ReactNode, options?: HydrationOptions): Root;
12
20
  (initialChildren: React.ReactNode, container: Element | Document, callback?: () => void): void;
13
21
  }
14
22
  declare type BootStrap<T = unknown> = (App: React.ComponentType, id: string | Record<string, any> | HTMLElement, root?: any, ReactDOM?: {
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.21.5",
14
+ "version": "1.22.1",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./type.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -128,9 +128,9 @@
128
128
  "@types/redux-logger": "^3.0.9",
129
129
  "@types/loadable__component": "^5.13.4",
130
130
  "@types/styled-components": "^5.1.14",
131
- "@modern-js/plugin": "1.21.5",
132
- "@modern-js/webpack": "1.21.5",
133
- "@modern-js/utils": "1.21.5"
131
+ "@modern-js/plugin": "1.22.1",
132
+ "@modern-js/webpack": "1.22.1",
133
+ "@modern-js/utils": "1.22.1"
134
134
  },
135
135
  "peerDependencies": {
136
136
  "react": ">=17",
@@ -151,11 +151,11 @@
151
151
  "@testing-library/react-hooks": "^7.0.1",
152
152
  "@types/hoist-non-react-statics": "^3.3.1",
153
153
  "@types/invariant": "^2.2.30",
154
- "@modern-js/core": "1.21.5",
155
- "@modern-js/types": "1.21.5",
156
- "@modern-js/utils": "1.21.5",
157
- "@scripts/build": "1.21.5",
158
- "@scripts/jest-config": "1.21.5"
154
+ "@modern-js/core": "1.22.1",
155
+ "@modern-js/types": "1.22.1",
156
+ "@modern-js/utils": "1.22.1",
157
+ "@scripts/build": "1.22.1",
158
+ "@scripts/jest-config": "1.22.1"
159
159
  },
160
160
  "sideEffects": false,
161
161
  "modernConfig": {},