Skip to content

Commit 7157642

Browse files
chore: x
1 parent 86f956f commit 7157642

File tree

7 files changed

+98
-101
lines changed

7 files changed

+98
-101
lines changed

.github/workflows/devtools.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
run: npx cypress install
5454

5555
- name: Run Affected Build
56-
run: npx nx run-many --targets=build --projects=tag:type:pkg --skip-nx-cache
56+
run: npx nx run-many --targets=build --projects=tag:type:pkg
5757

5858
- name: Configuration xvfb
5959
shell: bash

packages/chrome-devtools/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@
5656
"dependencies": {
5757
"@arco-design/web-react": "^2.64.1",
5858
"@modern-js/runtime": "2.68.2",
59-
"@module-federation/runtime": "workspace:*",
60-
"@module-federation/runtime-core": "workspace:*",
6159
"@module-federation/sdk": "workspace:*",
6260
"ahooks": "^3.7.10",
6361
"dagre": "^0.8.5",
@@ -72,6 +70,7 @@
7270
"@modern-js/module-tools": "2.68.2",
7371
"@modern-js/storybook": "2.68.2",
7472
"@modern-js/tsconfig": "2.68.2",
73+
"@module-federation/runtime": "workspace:*",
7574
"@playwright/test": "1.49.1",
7675
"@types/chrome": "^0.0.272",
7776
"@types/dagre": "^0.7.52",

packages/chrome-devtools/src/init.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,9 @@ declare global {
77
}
88
}
99

10-
import type { ModuleFederationRuntimePlugin } from '@module-federation/runtime';
11-
1210
declare module '@module-federation/runtime' {
1311
export interface Federation {
1412
originModuleInfo: GlobalModuleInfo;
15-
__GLOBAL_PLUGIN__: Array<ModuleFederationRuntimePlugin>;
1613
}
1714
}
1815

packages/chrome-devtools/src/utils/chrome/fast-refresh.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
import type { ModuleFederationRuntimePlugin } from '@module-federation/runtime';
1+
import type {
2+
ModuleFederationRuntimePlugin,
3+
Shared,
4+
} from '@module-federation/runtime/types';
25
import { loadScript } from '@module-federation/sdk';
36

47
import { isObject, getUnpkgUrl } from '../index';
@@ -8,7 +11,7 @@ import { __FEDERATION_DEVTOOLS__ } from '../../template';
811
const fastRefreshPlugin = (): ModuleFederationRuntimePlugin => {
912
return {
1013
name: 'mf-fast-refresh-plugin',
11-
beforeInit({ userOptions, ...args }: any) {
14+
beforeInit({ userOptions, ...args }) {
1215
const shareInfo = userOptions.shared;
1316
const twinsShareInfo = args.shareInfo;
1417
let enableFastRefresh: boolean;
@@ -31,11 +34,11 @@ const fastRefreshPlugin = (): ModuleFederationRuntimePlugin => {
3134
});
3235
Object.keys(shareInfo).forEach(async (share) => {
3336
// @ts-ignore legacy runtime shareInfo[share] is shared , and latest i shard[]
34-
const sharedArr: any[] = Array.isArray(shareInfo[share])
37+
const sharedArr: Shared[] = Array.isArray(shareInfo[share])
3538
? shareInfo[share]
3639
: [shareInfo[share]];
3740

38-
let twinsSharedArr: any[];
41+
let twinsSharedArr: Shared[];
3942
if (twinsShareInfo) {
4043
// @ts-ignore
4144
twinsSharedArr = Array.isArray(twinsShareInfo[share])

packages/chrome-devtools/src/utils/chrome/post-message.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import helpers from '@module-federation/runtime/helpers';
2-
import type { ModuleFederationRuntimePlugin } from '@module-federation/runtime';
2+
import type { ModuleFederationRuntimePlugin } from '@module-federation/runtime/types';
33

44
import { definePropertyGlobalVal } from '../sdk';
55

66
const getModuleInfo = (): ModuleFederationRuntimePlugin => {
77
return {
88
name: 'mf-devtool-getModuleInfo-plugin',
9-
loadRemoteSnapshot({ options, moduleInfo, remoteSnapshot, ...res }: any) {
9+
loadRemoteSnapshot({ options, moduleInfo, remoteSnapshot, ...res }) {
1010
const globalSnapshot = helpers.global.getGlobalSnapshot();
1111
if (!options || options.inBrowser) {
1212
window.postMessage(

packages/chrome-devtools/src/utils/chrome/snapshot-plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { MODULE_DEVTOOL_IDENTIFIER } from '@module-federation/sdk';
22
import runtimeHelpers from '@module-federation/runtime/helpers';
33

4-
import type { ModuleFederationRuntimePlugin } from '@module-federation/runtime';
4+
import type { ModuleFederationRuntimePlugin } from '@module-federation/runtime/types';
55

66
import { definePropertyGlobalVal } from '../sdk';
77

@@ -13,7 +13,7 @@ declare global {
1313
const chromeDevtoolsPlugin: () => ModuleFederationRuntimePlugin = function () {
1414
return {
1515
name: 'mf-chrome-devtools-inject-snapshot-plugin',
16-
beforeLoadRemoteSnapshot({ options }: any) {
16+
beforeLoadRemoteSnapshot({ options }) {
1717
const { nativeGlobal } = runtimeHelpers.global;
1818

1919
if (!options || options.inBrowser) {

0 commit comments

Comments
 (0)