Skip to content

Commit f3ee19c

Browse files
committed
chore: merge main
2 parents c8d0f0c + 4c5757b commit f3ee19c

File tree

513 files changed

+30910
-7596
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

513 files changed

+30910
-7596
lines changed

.changeset/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"@module-federation/error-codes",
2727
"@module-federation/inject-external-runtime-core-plugin",
2828
"@module-federation/runtime-core",
29-
"create-module-federation"
29+
"create-module-federation",
30+
"@module-federation/cli"
3031
]
3132
],
3233
"ignorePatterns": ["^alpha|^beta"],

.changeset/nice-rice-count.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/swift-kiwis-argue.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@module-federation/bridge-shared': patch
3+
'@module-federation/bridge-vue3': patch
4+
---
5+
6+
vue.js has router option added to the vue3-bridge

.cursorignore

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,11 @@
55
**/dist/
66

77
# Documentation and config files
8-
**/*.md
98
**/*.yaml
109
**/*.yml
11-
**/.eslintrc*
12-
**/.prettierrc*
13-
**/.swcrc
14-
**/jest.config.*
15-
**/tsconfig.*
16-
**/*/stats.json
1710

18-
# First ignore everything
19-
*
20-
21-
# Then allow specific packages and their contents
22-
!packages/webpack-bundler-runtime/
23-
!packages/webpack-bundler-runtime/**/*
24-
!packages/sdk/
25-
!packages/sdk/**/*
26-
!packages/enhanced/
27-
!packages/enhanced/**/*
28-
29-
# Allow package.json files
30-
!package.json
31-
!packages/*/package.json
32-
!**/package.json
3311

3412
# Explicitly ignore specific packages
35-
packages/dts-plugin/
3613
packages/typescript/
3714
packages/native-*
3815
packages/core/
@@ -41,7 +18,6 @@ packages/native-federation-typescript/
4118
packages/esbuild/
4219

4320
# Ignore specific directories
44-
apps/
4521
webpack/tooling/
4622
webpack/setup/
4723
webpack/test/
@@ -52,7 +28,7 @@ tools/
5228
.vscode/
5329
.verdaccio/
5430

55-
!apps/manifest-demo/*.ts
31+
5632

5733
# Ignore specific files
5834
.cursorignore

.github/workflows/e2e-modern-ssr.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,16 @@ jobs:
4848
lsof -ti tcp:3050,3051,3052,3053,3054,3055,3056 | xargs -r kill &&
4949
pnpm run app:modern:dev &
5050
sleep 30 &&
51-
npx wait-on http://127.0.0.1:3051/mf-manifest.json &&
52-
npx wait-on http://127.0.0.1:3053/mf-manifest.json &&
53-
npx wait-on http://127.0.0.1:3055/mf-manifest.json &&
54-
npx wait-on http://127.0.0.1:3056/mf-manifest.json &&
55-
npx wait-on http://127.0.0.1:3054/mf-manifest.json &&
56-
npx wait-on http://127.0.0.1:3052/mf-manifest.json &&
57-
npx wait-on http://127.0.0.1:3050/mf-manifest.json &&
51+
# wait response content-type is application/json
52+
for port in 3050 3051 3052 3053 3054 3055 3056; do
53+
while true; do
54+
response=$(curl -s -I http://127.0.0.1:$port/mf-manifest.json)
55+
content_type=$(echo "$response" | grep -i "Content-Type" | awk '{print $2}' | tr -d '\r')
56+
if [[ $content_type != *"text/html"* ]]; then
57+
break
58+
fi
59+
sleep 1
60+
done
61+
done
5862
npx nx run modernjs-ssr-host:e2e &&
5963
lsof -ti tcp:3050,3051,3052,3053,3054,3055,3056 | xargs kill

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# dependencies
1111
node_modules
1212
./webpack-lib
13+
next.js
1314
# IDEs and editors
1415
/.idea
1516
.project
@@ -71,4 +72,6 @@ packages/enhanced/test/js
7172
!apps/rslib-module/@mf-types/**
7273

7374
**/vite.config.{js,ts,mjs,mts,cjs,cts}.timestamp*
74-
/webpack-lib/
75+
76+
# Federation
77+
**/.federation

apps/bundle-size/.babelrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"presets": [
3+
[
4+
"@nx/react/babel",
5+
{
6+
"runtime": "automatic"
7+
}
8+
]
9+
],
10+
"plugins": []
11+
}

apps/bundle-size/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# bundle-size
2+
3+
## 0.1.1
4+
5+
### Patch Changes
6+
7+
- 38f324f: Disable live bindings on cjs builds of the runtime packages
8+
9+
## 0.1.0
10+
11+
### Minor Changes
12+
13+
- c399b9a: Switch to esm modules by default

apps/bundle-size/cypress.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset';
2+
import { defineConfig } from 'cypress';
3+
4+
export default defineConfig({
5+
e2e: nxE2EPreset(__filename, { cypressDir: 'cypress' }),
6+
defaultCommandTimeout: 20000,
7+
});
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
import { getH1, getH3 } from '../support/app.po';
2+
3+
describe('3005-runtime-host/', () => {
4+
beforeEach(() => cy.visit('/'));
5+
6+
describe('Welcome message', () => {
7+
it('should display welcome message', () => {
8+
getH1().contains('Runtime Demo');
9+
});
10+
});
11+
12+
describe('Image checks', () => {
13+
it('should check that the home-webpack-png and remote1-webpack-png images are not 404', () => {
14+
// Get the src attribute of the home-webpack-png image
15+
cy.get('img.home-webpack-png')
16+
.invoke('attr', 'src')
17+
.then((src) => {
18+
if (!src) {
19+
throw new Error('src must not be empty');
20+
}
21+
cy.log(src);
22+
cy.request(src).its('status').should('eq', 200);
23+
});
24+
25+
// Get the src attribute of the shop-webpack-png image
26+
cy.get('img.remote1-webpack-png')
27+
.invoke('attr', 'src')
28+
.then((src) => {
29+
if (!src) {
30+
throw new Error('src must not be empty');
31+
}
32+
// Send a GET request to the src URL
33+
cy.request(src).its('status').should('eq', 200);
34+
});
35+
});
36+
37+
it('should check that the home-webpack-svg and remote1-webpack-svg images are not 404', () => {
38+
// Get the src attribute of the home-webpack-png image
39+
cy.get('img.home-webpack-svg')
40+
.invoke('attr', 'src')
41+
.then((src) => {
42+
if (!src) {
43+
throw new Error('src must not be empty');
44+
}
45+
cy.log(src);
46+
cy.request(src).its('status').should('eq', 200);
47+
});
48+
49+
// Get the src attribute of the shop-webpack-png image
50+
cy.get('img.remote1-webpack-svg')
51+
.invoke('attr', 'src')
52+
.then((src) => {
53+
if (!src) {
54+
throw new Error('src must not be empty');
55+
}
56+
// Send a GET request to the src URL
57+
cy.request(src).its('status').should('eq', 200);
58+
});
59+
});
60+
});
61+
62+
describe('Shared react hook check', () => {
63+
it('should display text which comes from remote1 hook', () => {
64+
cy.get('.remote1-text')
65+
.invoke('html')
66+
.should('equal', 'Custom hook from localhost:3006 works!');
67+
});
68+
});
69+
70+
describe('dynamic remote check', () => {
71+
describe('dynamic-remote/ButtonOldAnt', () => {
72+
it('should display remote button', () => {
73+
cy.get('button.test-remote2').contains('Button');
74+
});
75+
it('should use host shared(antd)', () => {
76+
cy.get('button.test-remote2').contains('Button from antd@4.24.15');
77+
});
78+
});
79+
});
80+
});

0 commit comments

Comments
 (0)