@modern-js/plugin-garfish 2.5.0 → 2.7.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/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # @modern-js/plugin-garfish
2
2
 
3
+ ## 2.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - dcad887024: feat: support deferred data for streaming ssr
8
+ feat: 流式渲染支持 deferred data
9
+
10
+ ### Patch Changes
11
+
12
+ - 7fff9020e1: chore: make file naming consistent
13
+
14
+ chore: 统一文件命名为小驼峰格式
15
+
16
+ - Updated dependencies [0f15fc597c]
17
+ - Updated dependencies [dcad887024]
18
+ - Updated dependencies [a4672f7c16]
19
+ - Updated dependencies [7fff9020e1]
20
+ - Updated dependencies [1eea234fdd]
21
+ - Updated dependencies [84bfb439b8]
22
+ - @modern-js/utils@2.7.0
23
+ - @modern-js/runtime@2.7.0
24
+
25
+ ## 2.6.0
26
+
27
+ ### Patch Changes
28
+
29
+ - Updated dependencies [671477d]
30
+ - Updated dependencies [e1f799e]
31
+ - Updated dependencies [7915ab3]
32
+ - Updated dependencies [a909ad1]
33
+ - Updated dependencies [49fa0b1]
34
+ - Updated dependencies [0fe658a]
35
+ - Updated dependencies [1906d7b]
36
+ - @modern-js/runtime@2.6.0
37
+ - @modern-js/utils@2.6.0
38
+
3
39
  ## 2.5.0
4
40
 
5
41
  ### Patch Changes
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
package/dist/cjs/index.js CHANGED
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  };
19
19
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -97,16 +97,20 @@ function Loadable(WrapComponent) {
97
97
  [state]
98
98
  );
99
99
  const showLoading = (state.isLoading || state.error) && LoadingComponent;
100
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
101
- children: [
102
- showLoading && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoadingComponent, {
100
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
101
+ showLoading && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
102
+ LoadingComponent,
103
+ {
103
104
  isLoading: state.isLoading,
104
105
  pastDelay: state.pastDelay,
105
106
  timedOut: state.timedOut,
106
107
  error: state == null ? void 0 : state.error,
107
108
  retry
108
- }),
109
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(WrapComponent, {
109
+ }
110
+ ),
111
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
112
+ WrapComponent,
113
+ {
110
114
  style: { display: showLoading ? "none" : "block" },
111
115
  setLoadingState: (props2) => {
112
116
  if (props2.error && !LoadingComponent) {
@@ -115,9 +119,9 @@ function Loadable(WrapComponent) {
115
119
  setStateWithMountCheck(props2);
116
120
  },
117
121
  ...otherProps
118
- })
119
- ]
120
- });
122
+ }
123
+ )
124
+ ] });
121
125
  };
122
126
  };
123
127
  }
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -115,12 +119,7 @@ var plugin_default = (config) => ({
115
119
  }
116
120
  render() {
117
121
  (0, import_util.logger)("GarfishProvider state", this.state);
118
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Context.GarfishProvider, {
119
- value: this.state,
120
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(App, {
121
- ...this.props
122
- })
123
- });
122
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Context.GarfishProvider, { value: this.state, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(App, { ...this.props }) });
124
123
  }
125
124
  }
126
125
  return next({
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -151,11 +155,7 @@ function generateMApp(options, manifest) {
151
155
  render() {
152
156
  const { style } = this.props;
153
157
  const { SubModuleComponent } = this.state;
154
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
155
- style: { ...style },
156
- id: (0, import_util.generateSubAppContainerKey)(),
157
- children: SubModuleComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SubModuleComponent, {})
158
- });
158
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { ...style }, id: (0, import_util.generateSubAppContainerKey)(), children: SubModuleComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SubModuleComponent, {}) });
159
159
  }
160
160
  }
161
161
  return (0, import_loadable.Loadable)(MApp)(manifest == null ? void 0 : manifest.loadable);
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -185,12 +189,7 @@ function getAppInstance(options, appInfo, manifest) {
185
189
  }
186
190
  };
187
191
  }, []);
188
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
189
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
190
- id: domId,
191
- children: SubModuleComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SubModuleComponent, {})
192
- })
193
- });
192
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { id: domId, children: SubModuleComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SubModuleComponent, {}) }) });
194
193
  }
195
194
  return (0, import_loadable.Loadable)(MicroApp)(manifest == null ? void 0 : manifest.loadable);
196
195
  }
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
package/dist/cjs/util.js CHANGED
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -75,16 +75,20 @@ function Loadable(WrapComponent) {
75
75
  [state]
76
76
  );
77
77
  const showLoading = (state.isLoading || state.error) && LoadingComponent;
78
- return /* @__PURE__ */ jsxs(Fragment, {
79
- children: [
80
- showLoading && /* @__PURE__ */ jsx(LoadingComponent, {
78
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
79
+ showLoading && /* @__PURE__ */ jsx(
80
+ LoadingComponent,
81
+ {
81
82
  isLoading: state.isLoading,
82
83
  pastDelay: state.pastDelay,
83
84
  timedOut: state.timedOut,
84
85
  error: state == null ? void 0 : state.error,
85
86
  retry
86
- }),
87
- /* @__PURE__ */ jsx(WrapComponent, {
87
+ }
88
+ ),
89
+ /* @__PURE__ */ jsx(
90
+ WrapComponent,
91
+ {
88
92
  style: { display: showLoading ? "none" : "block" },
89
93
  setLoadingState: (props2) => {
90
94
  if (props2.error && !LoadingComponent) {
@@ -93,9 +97,9 @@ function Loadable(WrapComponent) {
93
97
  setStateWithMountCheck(props2);
94
98
  },
95
99
  ...otherProps
96
- })
97
- ]
98
- });
100
+ }
101
+ )
102
+ ] });
99
103
  };
100
104
  };
101
105
  }
@@ -87,12 +87,7 @@ var plugin_default = (config) => ({
87
87
  }
88
88
  render() {
89
89
  logger("GarfishProvider state", this.state);
90
- return /* @__PURE__ */ jsx(GarfishProvider, {
91
- value: this.state,
92
- children: /* @__PURE__ */ jsx(App, {
93
- ...this.props
94
- })
95
- });
90
+ return /* @__PURE__ */ jsx(GarfishProvider, { value: this.state, children: /* @__PURE__ */ jsx(App, { ...this.props }) });
96
91
  }
97
92
  }
98
93
  return next({
@@ -123,11 +123,7 @@ function generateMApp(options, manifest) {
123
123
  render() {
124
124
  const { style } = this.props;
125
125
  const { SubModuleComponent } = this.state;
126
- return /* @__PURE__ */ jsx("div", {
127
- style: { ...style },
128
- id: generateSubAppContainerKey(),
129
- children: SubModuleComponent && /* @__PURE__ */ jsx(SubModuleComponent, {})
130
- });
126
+ return /* @__PURE__ */ jsx("div", { style: { ...style }, id: generateSubAppContainerKey(), children: SubModuleComponent && /* @__PURE__ */ jsx(SubModuleComponent, {}) });
131
127
  }
132
128
  }
133
129
  return Loadable(MApp)(manifest == null ? void 0 : manifest.loadable);
@@ -156,12 +156,7 @@ function getAppInstance(options, appInfo, manifest) {
156
156
  }
157
157
  };
158
158
  }, []);
159
- return /* @__PURE__ */ jsx(Fragment, {
160
- children: /* @__PURE__ */ jsx("div", {
161
- id: domId,
162
- children: SubModuleComponent && /* @__PURE__ */ jsx(SubModuleComponent, {})
163
- })
164
- });
159
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("div", { id: domId, children: SubModuleComponent && /* @__PURE__ */ jsx(SubModuleComponent, {}) }) });
165
160
  }
166
161
  return Loadable(MicroApp)(manifest == null ? void 0 : manifest.loadable);
167
162
  }
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "2.5.0",
14
+ "version": "2.7.0",
15
15
  "jsnext:source": "./src/cli/index.ts",
16
16
  "types": "./dist/types/cli/index.d.ts",
17
17
  "typesVersions": {
@@ -62,10 +62,10 @@
62
62
  "garfish": "^1.8.1",
63
63
  "hoist-non-react-statics": "^3.3.2",
64
64
  "react-loadable": "^5.5.0",
65
- "@modern-js/utils": "2.5.0"
65
+ "@modern-js/utils": "2.7.0"
66
66
  },
67
67
  "peerDependencies": {
68
- "@modern-js/runtime": "^2.5.0"
68
+ "@modern-js/runtime": "^2.7.0"
69
69
  },
70
70
  "peerDependenciesMeta": {
71
71
  "@modern-js/runtime": {
@@ -84,16 +84,16 @@
84
84
  "jest-fetch-mock": "^3.0.3",
85
85
  "react": "^18",
86
86
  "react-dom": "^18",
87
- "react-router-dom": "^6.6.0",
87
+ "react-router-dom": "^6.8.1",
88
88
  "typescript": "^4",
89
89
  "webpack-chain": "^6.5.1",
90
- "@modern-js/app-tools": "2.5.0",
91
- "@modern-js/core": "2.5.0",
92
- "@modern-js/runtime": "2.5.0",
93
- "@modern-js/plugin-router-v5": "2.5.0",
94
- "@modern-js/types": "2.5.0",
95
- "@scripts/build": "2.5.0",
96
- "@scripts/jest-config": "2.5.0"
90
+ "@modern-js/app-tools": "2.7.0",
91
+ "@modern-js/core": "2.7.0",
92
+ "@modern-js/plugin-router-v5": "2.7.0",
93
+ "@modern-js/runtime": "2.7.0",
94
+ "@modern-js/types": "2.7.0",
95
+ "@scripts/build": "2.7.0",
96
+ "@scripts/jest-config": "2.7.0"
97
97
  },
98
98
  "sideEffects": false,
99
99
  "modernConfig": {},