@modern-js/plugin-garfish 1.6.2 → 1.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,38 @@
1
1
  # @modern-js/plugin-garfish
2
2
 
3
+ ## 1.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 4fc801f: chore(runtime): merge `@modern-js/plugin-router` to `@modern-js/runtime`
8
+
9
+ chore(runtime): 合并 `@modern-js/plugin-router` 到 `@modern-js/runtime`
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [1421965]
14
+ - Updated dependencies [4fc801f]
15
+ - Updated dependencies [b8ea9cd]
16
+ - Updated dependencies [4fc801f]
17
+ - Updated dependencies [4fc801f]
18
+ - Updated dependencies [4fc801f]
19
+ - Updated dependencies [4fc801f]
20
+ - Updated dependencies [16eaebd]
21
+ - Updated dependencies [8f046e8]
22
+ - Updated dependencies [c8614b8]
23
+ - @modern-js/runtime@1.4.0
24
+ - @modern-js/utils@1.8.0
25
+
26
+ ## 1.6.2
27
+
28
+ ### Patch Changes
29
+
30
+ - 7b9e302: fix: incorrect @babel/runtime version
31
+ - Updated dependencies [dc37349]
32
+ - Updated dependencies [a90bc96]
33
+ - @modern-js/plugin-router@1.2.16
34
+ - @modern-js/utils@1.7.9
35
+
3
36
  ## 1.6.0
4
37
 
5
38
  ### Minor Changes
@@ -1,5 +1,4 @@
1
- const _excluded = ["setLoadingState", "style"],
2
- _excluded2 = ["beforeLoad", "beforeMount", "errorLoadApp", "errorMountApp", "errorUnmountApp"];
1
+ const _excluded = ["beforeLoad", "beforeMount", "errorLoadApp", "errorMountApp", "errorUnmountApp"];
3
2
 
4
3
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
4
 
@@ -31,13 +30,9 @@ export function generateMApp(options, manifest) {
31
30
  const {
32
31
  domId
33
32
  } = this.state;
34
-
35
- const _this$props = this.props,
36
- {
37
- setLoadingState,
38
- style
39
- } = _this$props,
40
- userProps = _objectWithoutProperties(_this$props, _excluded);
33
+ const {
34
+ setLoadingState
35
+ } = this.props;
41
36
 
42
37
  const {
43
38
  beforeLoad,
@@ -46,7 +41,7 @@ export function generateMApp(options, manifest) {
46
41
  errorMountApp,
47
42
  errorUnmountApp
48
43
  } = options,
49
- otherOptions = _objectWithoutProperties(options, _excluded2); // start auto render able
44
+ otherOptions = _objectWithoutProperties(options, _excluded); // start auto render able
50
45
 
51
46
 
52
47
  Garfish.router.setRouterConfig({
@@ -118,7 +113,6 @@ export function generateMApp(options, manifest) {
118
113
  }
119
114
 
120
115
  }, otherOptions), {}, {
121
- props: _objectSpread(_objectSpread({}, otherOptions.props || {}), userProps),
122
116
  insulationVariable: [...(otherOptions.insulationVariable || []), '_SERVER_DATA'],
123
117
  customLoader: provider => {
124
118
  const {
@@ -15,7 +15,7 @@ import path from 'path';
15
15
  import React from 'react'; // eslint-disable-next-line import/no-named-as-default
16
16
 
17
17
  import Garfish from 'garfish';
18
- import { withRouter } from '@modern-js/plugin-router'; // import Loadable from 'react-loadable';
18
+ import { withRouter } from '@modern-js/runtime/router'; // import Loadable from 'react-loadable';
19
19
 
20
20
  import { logger, generateSubAppContainerKey } from "../../util";
21
21
  import { Loadable } from "../loadable";
@@ -15,8 +15,7 @@ var _loadable = require("../loadable");
15
15
 
16
16
  var _jsxRuntime = require("react/jsx-runtime");
17
17
 
18
- const _excluded = ["setLoadingState", "style"],
19
- _excluded2 = ["beforeLoad", "beforeMount", "errorLoadApp", "errorMountApp", "errorUnmountApp"];
18
+ const _excluded = ["beforeLoad", "beforeMount", "errorLoadApp", "errorMountApp", "errorUnmountApp"];
20
19
 
21
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22
21
 
@@ -44,13 +43,9 @@ function generateMApp(options, manifest) {
44
43
  const {
45
44
  domId
46
45
  } = this.state;
47
-
48
- const _this$props = this.props,
49
- {
50
- setLoadingState,
51
- style
52
- } = _this$props,
53
- userProps = _objectWithoutProperties(_this$props, _excluded);
46
+ const {
47
+ setLoadingState
48
+ } = this.props;
54
49
 
55
50
  const {
56
51
  beforeLoad,
@@ -59,7 +54,7 @@ function generateMApp(options, manifest) {
59
54
  errorMountApp,
60
55
  errorUnmountApp
61
56
  } = options,
62
- otherOptions = _objectWithoutProperties(options, _excluded2); // start auto render able
57
+ otherOptions = _objectWithoutProperties(options, _excluded); // start auto render able
63
58
 
64
59
 
65
60
  _garfish.default.router.setRouterConfig({
@@ -131,7 +126,6 @@ function generateMApp(options, manifest) {
131
126
  }
132
127
 
133
128
  }, otherOptions), {}, {
134
- props: _objectSpread(_objectSpread({}, otherOptions.props || {}), userProps),
135
129
  insulationVariable: [...(otherOptions.insulationVariable || []), '_SERVER_DATA'],
136
130
  customLoader: provider => {
137
131
  const {
@@ -11,7 +11,7 @@ var _react = _interopRequireDefault(require("react"));
11
11
 
12
12
  var _garfish = _interopRequireDefault(require("garfish"));
13
13
 
14
- var _pluginRouter = require("@modern-js/plugin-router");
14
+ var _router = require("@modern-js/runtime/router");
15
15
 
16
16
  var _util = require("../../util");
17
17
 
@@ -193,7 +193,7 @@ function getAppInstance(options, appInfo, manifest) {
193
193
 
194
194
  }
195
195
 
196
- return (0, _loadable.Loadable)((0, _pluginRouter.withRouter)(MicroApp))(manifest === null || manifest === void 0 ? void 0 : manifest.loadable);
196
+ return (0, _loadable.Loadable)((0, _router.withRouter)(MicroApp))(manifest === null || manifest === void 0 ? void 0 : manifest.loadable);
197
197
  }
198
198
 
199
199
  function generateApps(options, manifest) {
@@ -7,8 +7,7 @@ import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitial
7
7
  import _inherits from "@babel/runtime/helpers/esm/inherits";
8
8
  import _createSuper from "@babel/runtime/helpers/esm/createSuper";
9
9
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
10
- var _excluded = ["setLoadingState", "style"],
11
- _excluded2 = ["beforeLoad", "beforeMount", "errorLoadApp", "errorMountApp", "errorUnmountApp"];
10
+ var _excluded = ["beforeLoad", "beforeMount", "errorLoadApp", "errorMountApp", "errorUnmountApp"];
12
11
  import React from 'react'; // eslint-disable-next-line import/no-named-as-default
13
12
 
14
13
  import Garfish from 'garfish';
@@ -45,18 +44,14 @@ export function generateMApp(options, manifest) {
45
44
  var _this2 = this;
46
45
 
47
46
  var domId = this.state.domId;
48
-
49
- var _this$props = this.props,
50
- setLoadingState = _this$props.setLoadingState,
51
- style = _this$props.style,
52
- userProps = _objectWithoutProperties(_this$props, _excluded);
47
+ var setLoadingState = this.props.setLoadingState;
53
48
 
54
49
  var _beforeLoad = options.beforeLoad,
55
50
  _beforeMount = options.beforeMount,
56
51
  _errorLoadApp = options.errorLoadApp,
57
52
  _errorMountApp = options.errorMountApp,
58
53
  _errorUnmountApp = options.errorUnmountApp,
59
- otherOptions = _objectWithoutProperties(options, _excluded2); // start auto render able
54
+ otherOptions = _objectWithoutProperties(options, _excluded); // start auto render able
60
55
 
61
56
 
62
57
  Garfish.router.setRouterConfig({
@@ -142,7 +137,6 @@ export function generateMApp(options, manifest) {
142
137
  return _errorUnmountApp === null || _errorUnmountApp === void 0 ? void 0 : _errorUnmountApp.apply(void 0, [error, appInfo].concat(args));
143
138
  }
144
139
  }, otherOptions), {}, {
145
- props: _objectSpread(_objectSpread({}, otherOptions.props || {}), userProps),
146
140
  insulationVariable: [].concat(_toConsumableArray(otherOptions.insulationVariable || []), ['_SERVER_DATA']),
147
141
  customLoader: function customLoader(provider) {
148
142
  var render = provider.render,
@@ -15,7 +15,7 @@ import path from 'path';
15
15
  import React from 'react'; // eslint-disable-next-line import/no-named-as-default
16
16
 
17
17
  import Garfish from 'garfish';
18
- import { withRouter } from '@modern-js/plugin-router'; // import Loadable from 'react-loadable';
18
+ import { withRouter } from '@modern-js/runtime/router'; // import Loadable from 'react-loadable';
19
19
 
20
20
  import { logger, generateSubAppContainerKey } from "../../util";
21
21
  import { Loadable } from "../loadable";
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { RouteComponentProps } from '@modern-js/plugin-router';
2
+ import { RouteComponentProps } from '@modern-js/runtime/router';
3
3
  import { LoadableConfig, MicroComponentProps } from './useModuleApps';
4
4
  export interface MicroProps extends RouteComponentProps {
5
5
  setLoadingState: (state: {
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.6.2",
14
+ "version": "1.7.0",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/runtime/index.d.ts",
17
17
  "typesVersions": {
@@ -50,7 +50,7 @@
50
50
  },
51
51
  "dependencies": {
52
52
  "@babel/runtime": "^7.18.0",
53
- "@modern-js/utils": "^1.7.8",
53
+ "@modern-js/utils": "^1.8.0",
54
54
  "@types/debug": "^4.1.7",
55
55
  "@types/react-loadable": "^5.5.6",
56
56
  "debug": "^4.3.2",
@@ -59,18 +59,18 @@
59
59
  "react-loadable": "^5.5.0"
60
60
  },
61
61
  "peerDependencies": {
62
- "@modern-js/plugin-router": "^1.2.15"
62
+ "@modern-js/runtime": "^1.4.0"
63
63
  },
64
64
  "peerDependenciesMeta": {
65
- "@modern-js/plugin-router": {
65
+ "@modern-js/runtime": {
66
66
  "optional": true
67
67
  }
68
68
  },
69
69
  "devDependencies": {
70
- "@modern-js/core": "1.12.1",
71
- "@modern-js/plugin-router": "1.2.15",
72
- "@modern-js/runtime-core": "1.5.1",
73
- "@modern-js/types": "1.5.4",
70
+ "@modern-js/core": "1.13.1",
71
+ "@modern-js/runtime-core": "1.5.4",
72
+ "@modern-js/runtime": "1.4.0",
73
+ "@modern-js/types": "1.6.0",
74
74
  "@scripts/build": "0.0.0",
75
75
  "@scripts/jest-config": "0.0.0",
76
76
  "@testing-library/jest-dom": "^5.16.1",