@modern-js/plugin-garfish 1.4.8 → 1.4.9
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/.eslintrc.js +2 -1
- package/CHANGELOG.md +20 -0
- package/dist/js/modern/runtime/index.js +1 -1
- package/dist/js/modern/runtime/utils/apps.js +5 -2
- package/dist/js/node/runtime/index.js +6 -0
- package/dist/js/node/runtime/utils/apps.js +5 -2
- package/dist/js/treeshaking/runtime/index.js +1 -1
- package/dist/js/treeshaking/runtime/utils/apps.js +6 -2
- package/dist/types/runtime/index.d.ts +1 -1
- package/package.json +8 -8
package/.eslintrc.js
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @modern-js/plugin-garfish
|
|
2
2
|
|
|
3
|
+
## 1.4.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5e15976e: fix(garfish-plugin): garfish unregister undefined and export garfish instance
|
|
8
|
+
- 895fa0ff: chore: using "workspace:\*" in devDependencies
|
|
9
|
+
- Updated dependencies [2d155c4c]
|
|
10
|
+
- Updated dependencies [123e432d]
|
|
11
|
+
- Updated dependencies [e5a9b26d]
|
|
12
|
+
- Updated dependencies [0b26b93b]
|
|
13
|
+
- Updated dependencies [123e432d]
|
|
14
|
+
- Updated dependencies [f9f66ef9]
|
|
15
|
+
- Updated dependencies [592edabc]
|
|
16
|
+
- Updated dependencies [895fa0ff]
|
|
17
|
+
- Updated dependencies [3578913e]
|
|
18
|
+
- Updated dependencies [1c3beab3]
|
|
19
|
+
- @modern-js/utils@1.6.0
|
|
20
|
+
- @modern-js/plugin-router@1.2.11
|
|
21
|
+
- @modern-js/runtime-core@1.4.3
|
|
22
|
+
|
|
3
23
|
## 1.4.8
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -37,7 +37,8 @@ function getAppInstance(options, appInfo, manifest) {
|
|
|
37
37
|
appInstance: null,
|
|
38
38
|
domId: generateSubAppContainerKey(appInfo)
|
|
39
39
|
};
|
|
40
|
-
|
|
40
|
+
|
|
41
|
+
this.unregisterHistoryListener = () => {};
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
@@ -132,10 +133,12 @@ function getAppInstance(options, appInfo, manifest) {
|
|
|
132
133
|
}
|
|
133
134
|
|
|
134
135
|
async componentWillUnmount() {
|
|
136
|
+
var _this$unregisterHisto;
|
|
137
|
+
|
|
135
138
|
const {
|
|
136
139
|
appInstance
|
|
137
140
|
} = this.state;
|
|
138
|
-
this.unregisterHistoryListener();
|
|
141
|
+
(_this$unregisterHisto = this.unregisterHistoryListener) === null || _this$unregisterHisto === void 0 ? void 0 : _this$unregisterHisto.call(this);
|
|
139
142
|
|
|
140
143
|
if (appInstance) {
|
|
141
144
|
const {
|
|
@@ -15,6 +15,12 @@ Object.defineProperty(exports, "default", {
|
|
|
15
15
|
return _plugin.default;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
+
Object.defineProperty(exports, "garfish", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _garfish.default;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
18
24
|
Object.defineProperty(exports, "useModuleApp", {
|
|
19
25
|
enumerable: true,
|
|
20
26
|
get: function () {
|
|
@@ -43,7 +43,8 @@ function getAppInstance(options, appInfo, manifest) {
|
|
|
43
43
|
appInstance: null,
|
|
44
44
|
domId: (0, _util.generateSubAppContainerKey)(appInfo)
|
|
45
45
|
};
|
|
46
|
-
|
|
46
|
+
|
|
47
|
+
this.unregisterHistoryListener = () => {};
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
@@ -138,10 +139,12 @@ function getAppInstance(options, appInfo, manifest) {
|
|
|
138
139
|
}
|
|
139
140
|
|
|
140
141
|
async componentWillUnmount() {
|
|
142
|
+
var _this$unregisterHisto;
|
|
143
|
+
|
|
141
144
|
const {
|
|
142
145
|
appInstance
|
|
143
146
|
} = this.state;
|
|
144
|
-
this.unregisterHistoryListener();
|
|
147
|
+
(_this$unregisterHisto = this.unregisterHistoryListener) === null || _this$unregisterHisto === void 0 ? void 0 : _this$unregisterHisto.call(this);
|
|
145
148
|
|
|
146
149
|
if (appInstance) {
|
|
147
150
|
const {
|
|
@@ -76,7 +76,9 @@ function getAppInstance(options, appInfo, manifest) {
|
|
|
76
76
|
appInstance: null,
|
|
77
77
|
domId: generateSubAppContainerKey(appInfo)
|
|
78
78
|
};
|
|
79
|
-
|
|
79
|
+
|
|
80
|
+
_this.unregisterHistoryListener = function () {};
|
|
81
|
+
|
|
80
82
|
return _this;
|
|
81
83
|
}
|
|
82
84
|
|
|
@@ -212,6 +214,8 @@ function getAppInstance(options, appInfo, manifest) {
|
|
|
212
214
|
key: "componentWillUnmount",
|
|
213
215
|
value: function () {
|
|
214
216
|
var _componentWillUnmount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
217
|
+
var _this$unregisterHisto;
|
|
218
|
+
|
|
215
219
|
var appInstance, _appInfo;
|
|
216
220
|
|
|
217
221
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
@@ -219,7 +223,7 @@ function getAppInstance(options, appInfo, manifest) {
|
|
|
219
223
|
switch (_context2.prev = _context2.next) {
|
|
220
224
|
case 0:
|
|
221
225
|
appInstance = this.state.appInstance;
|
|
222
|
-
this.unregisterHistoryListener();
|
|
226
|
+
(_this$unregisterHisto = this.unregisterHistoryListener) === null || _this$unregisterHisto === void 0 ? void 0 : _this$unregisterHisto.call(this);
|
|
223
227
|
|
|
224
228
|
if (appInstance) {
|
|
225
229
|
_appInfo = appInstance.appInfo;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default } from './plugin';
|
|
2
2
|
export { useModuleApps, useModuleApp } from './useModuleApps';
|
|
3
3
|
export type { Manifest, ModuleInfo } from './useModuleApps';
|
|
4
|
-
export { default as Garfish } from 'garfish';
|
|
4
|
+
export { default as Garfish, default as garfish } from 'garfish';
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.4.
|
|
14
|
+
"version": "1.4.9",
|
|
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",
|
|
53
|
-
"@modern-js/utils": "^1.
|
|
53
|
+
"@modern-js/utils": "^1.6.0",
|
|
54
54
|
"@types/debug": "^4.1.7",
|
|
55
55
|
"@types/react-loadable": "^5.5.6",
|
|
56
56
|
"debug": "^4.3.2",
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"react-loadable": "^5.5.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@modern-js/core": "1.
|
|
63
|
-
"@modern-js/plugin-router": "
|
|
64
|
-
"@modern-js/runtime-core": "1.4.
|
|
65
|
-
"@modern-js/types": "
|
|
62
|
+
"@modern-js/core": "1.9.0",
|
|
63
|
+
"@modern-js/plugin-router": "1.2.11",
|
|
64
|
+
"@modern-js/runtime-core": "1.4.3",
|
|
65
|
+
"@modern-js/types": "1.5.1",
|
|
66
66
|
"@scripts/build": "0.0.0",
|
|
67
67
|
"@scripts/jest-config": "0.0.0",
|
|
68
68
|
"@testing-library/jest-dom": "^5.16.1",
|
|
@@ -83,8 +83,8 @@
|
|
|
83
83
|
"webpack-chain": "^6.5.1"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
|
-
"@modern-js/plugin-router": "^1.2.
|
|
87
|
-
"@modern-js/runtime-core": "^1.4.
|
|
86
|
+
"@modern-js/plugin-router": "^1.2.11",
|
|
87
|
+
"@modern-js/runtime-core": "^1.4.3",
|
|
88
88
|
"react": "^17"
|
|
89
89
|
},
|
|
90
90
|
"sideEffects": false,
|