Skip to content

Commit fabb05f

Browse files
fix: kill ports before next e2e (#2661)
Co-authored-by: ScriptedAlchemy <[email protected]>
1 parent c2b7385 commit fabb05f

File tree

8 files changed

+34
-52
lines changed

8 files changed

+34
-52
lines changed

.github/workflows/build-and-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
run: npx nx affected -t lint --parallel=7 --exclude='*,!tag:type:pkg'
4545

4646
- name: Run Affected Test
47-
run: npx nx affected -t test --parallel=3 --exclude='*,!tag:type:pkg' --skip-nx-cache
47+
run: npx nx run-many -t test --parallel=3 --exclude='*,!tag:type:pkg' --skip-nx-cache
4848

4949
# - name: E2E Test for Next.js Dev
5050
# run: |
@@ -71,7 +71,7 @@ jobs:
7171
run: npx nx run-many --target=test:e2e --projects=modernjs --parallel=1 && lsof -ti tcp:4001 | xargs kill
7272

7373
- name: E2E Test for 3005-runtime-host
74-
run: pnpm run app:runtime:dev & echo "done" && sleep 20 && npx nx run-many --target=test:e2e --projects=3005-runtime-host --parallel=1 && lsof -ti tcp:3005,3006,3007 | xargs kill
74+
run: lsof -ti tcp:3005,3006,3007 | xargs kill & pnpm run app:runtime:dev & echo "done" && sleep 20 && npx nx run-many --target=test:e2e --projects=3005-runtime-host --parallel=1 && lsof -ti tcp:3005,3006,3007 | xargs kill
7575

7676
- name: E2E Test for 3008-webpack-host
7777
run: pnpm run app:manifest:dev & echo "done" && npx wait-on tcp:3009 && npx wait-on tcp:3012 && npx nx run-many --target=e2e --projects=3008-webpack-host --parallel=1 && lsof -ti tcp:3008,3009,3010,3011,3012 | xargs kill
Lines changed: 23 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,23 @@
1-
import type {
2-
PackageType as PackageType_0,
3-
RemoteKeys as RemoteKeys_0,
4-
} from './remote1/apis.d.ts';
5-
declare module '@module-federation/runtime' {
6-
type RemoteKeys = RemoteKeys_0;
7-
type PackageType<T, Y = any> = T extends RemoteKeys_0 ? PackageType_0<T> : Y;
8-
export function loadRemote<T extends RemoteKeys, Y>(
9-
packageName: T,
10-
): Promise<PackageType<T, Y>>;
11-
export function loadRemote<T extends string, Y>(
12-
packageName: T,
13-
): Promise<PackageType<T, Y>>;
14-
}
15-
declare module '@module-federation/enhanced/runtime' {
16-
type RemoteKeys = RemoteKeys_0;
17-
type PackageType<T, Y = any> = T extends RemoteKeys_0 ? PackageType_0<T> : Y;
18-
export function loadRemote<T extends RemoteKeys, Y>(
19-
packageName: T,
20-
): Promise<PackageType<T, Y>>;
21-
export function loadRemote<T extends string, Y>(
22-
packageName: T,
23-
): Promise<PackageType<T, Y>>;
24-
}
25-
declare module '@module-federation/runtime-tools' {
26-
type RemoteKeys = RemoteKeys_0;
27-
type PackageType<T, Y = any> = T extends RemoteKeys_0 ? PackageType_0<T> : Y;
28-
export function loadRemote<T extends RemoteKeys, Y>(
29-
packageName: T,
30-
): Promise<PackageType<T, Y>>;
31-
export function loadRemote<T extends string, Y>(
32-
packageName: T,
33-
): Promise<PackageType<T, Y>>;
34-
}
1+
import type { PackageType as PackageType_0,RemoteKeys as RemoteKeys_0 } from './remote1/apis.d.ts';
2+
declare module "@module-federation/runtime" {
3+
type RemoteKeys = RemoteKeys_0;
4+
type PackageType<T, Y=any> = T extends RemoteKeys_0 ? PackageType_0<T> :
5+
Y ;
6+
export function loadRemote<T extends RemoteKeys,Y>(packageName: T): Promise<PackageType<T, Y>>;
7+
export function loadRemote<T extends string,Y>(packageName: T): Promise<PackageType<T, Y>>;
8+
}
9+
declare module "@module-federation/enhanced/runtime" {
10+
type RemoteKeys = RemoteKeys_0;
11+
type PackageType<T, Y=any> = T extends RemoteKeys_0 ? PackageType_0<T> :
12+
Y ;
13+
export function loadRemote<T extends RemoteKeys,Y>(packageName: T): Promise<PackageType<T, Y>>;
14+
export function loadRemote<T extends string,Y>(packageName: T): Promise<PackageType<T, Y>>;
15+
}
16+
declare module "@module-federation/runtime-tools" {
17+
type RemoteKeys = RemoteKeys_0;
18+
type PackageType<T, Y=any> = T extends RemoteKeys_0 ? PackageType_0<T> :
19+
Y ;
20+
export function loadRemote<T extends RemoteKeys,Y>(packageName: T): Promise<PackageType<T, Y>>;
21+
export function loadRemote<T extends string,Y>(packageName: T): Promise<PackageType<T, Y>>;
22+
}
23+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
export * from './compiled-types/apps/runtime-demo/3006-runtime-remote/src/components/WebpackPng';
2-
export { default } from './compiled-types/apps/runtime-demo/3006-runtime-remote/src/components/WebpackPng';
2+
export { default } from './compiled-types/apps/runtime-demo/3006-runtime-remote/src/components/WebpackPng';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
export * from './compiled-types/apps/runtime-demo/3006-runtime-remote/src/components/WebpackSvg';
2-
export { default } from './compiled-types/apps/runtime-demo/3006-runtime-remote/src/components/WebpackSvg';
2+
export { default } from './compiled-types/apps/runtime-demo/3006-runtime-remote/src/components/WebpackSvg';
Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
export type RemoteKeys =
2-
| 'remote1/useCustomRemoteHook'
3-
| 'remote1/WebpackSvg'
4-
| 'remote1/WebpackPng';
5-
type PackageType<T> = T extends 'remote1/WebpackPng'
6-
? typeof import('remote1/WebpackPng')
7-
: T extends 'remote1/WebpackSvg'
8-
? typeof import('remote1/WebpackSvg')
9-
: T extends 'remote1/useCustomRemoteHook'
10-
? typeof import('remote1/useCustomRemoteHook')
11-
: any;
1+
2+
export type RemoteKeys = 'remote1/useCustomRemoteHook' | 'remote1/WebpackSvg' | 'remote1/WebpackPng';
3+
type PackageType<T> = T extends 'remote1/WebpackPng' ? typeof import('remote1/WebpackPng') :T extends 'remote1/WebpackSvg' ? typeof import('remote1/WebpackSvg') :T extends 'remote1/useCustomRemoteHook' ? typeof import('remote1/useCustomRemoteHook') :any;
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
export default function WebpackPng(): import('react/jsx-runtime').JSX.Element;
1+
import './a.css';
2+
export default function WebpackPng(): import("react/jsx-runtime").JSX.Element;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export default function WebpackSvg(): import('react/jsx-runtime').JSX.Element;
1+
export default function WebpackSvg(): import("react/jsx-runtime").JSX.Element;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
export * from './compiled-types/apps/runtime-demo/3006-runtime-remote/src/components/useCustomRemoteHook';
2-
export { default } from './compiled-types/apps/runtime-demo/3006-runtime-remote/src/components/useCustomRemoteHook';
2+
export { default } from './compiled-types/apps/runtime-demo/3006-runtime-remote/src/components/useCustomRemoteHook';

0 commit comments

Comments
 (0)