Skip to content

Commit 8ae3507

Browse files
authored
Merge branch 'main' into main
2 parents 693e02c + 8a55b4c commit 8ae3507

File tree

142 files changed

+1051
-299
lines changed

Some content is hidden

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

142 files changed

+1051
-299
lines changed

.changeset/config.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@
2828
"@module-federation/runtime-core",
2929
"create-module-federation",
3030
"@module-federation/cli",
31-
"@module-federation/rspress-plugin"
31+
"@module-federation/rspress-plugin",
32+
"@module-federation/metro",
33+
"@module-federation/metro-plugin-rnef",
34+
"@module-federation/metro-plugin-rnc-cli"
3235
]
3336
],
3437
"ignorePatterns": ["^alpha|^beta"],

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Build Affected Packages
22

3+
permissions:
4+
contents: read
5+
36
on:
47
pull_request:
58
branches: [main, '**']
@@ -72,7 +75,10 @@ jobs:
7275
[ "$pkg" != "packages/core" ] && \
7376
[ "$pkg" != "packages/esbuild" ] && \
7477
[ "$pkg" != "packages/modernjs" ] && \
75-
[ "$pkg" != "packages/utilities" ]; then
78+
[ "$pkg" != "packages/utilities" ] && \
79+
[ "$pkg" != "packages/metro-core" ] && \
80+
[ "$pkg" != "packages/metro-plugin-rnef" ] && \
81+
[ "$pkg" != "packages/metro-plugin-rnc-cli" ]; then
7682
echo "Checking $pkg..."
7783
npx publint "$pkg"
7884
fi
@@ -134,3 +140,8 @@ jobs:
134140
needs: checkout-install
135141
uses: ./.github/workflows/e2e-router.yml
136142
secrets: inherit
143+
144+
build-metro:
145+
needs: checkout-install
146+
uses: ./.github/workflows/build-metro.yml
147+
secrets: inherit

.github/workflows/build-metro.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Build Metro Packages
2+
3+
on:
4+
workflow_call:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
build-metro:
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 15
13+
steps:
14+
- name: Checkout Repository
15+
uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Install Pnpm
20+
run: |
21+
corepack prepare [email protected] --activate
22+
corepack enable
23+
24+
- name: Setup Node.js 18
25+
uses: actions/setup-node@v3
26+
with:
27+
node-version: '18'
28+
cache: 'pnpm'
29+
30+
- name: Set Nx SHA
31+
uses: nrwl/nx-set-shas@v3
32+
33+
- name: Install Dependencies
34+
run: pnpm install
35+
36+
- name: Build All Required Packages
37+
run: |
38+
npx nx run-many --targets=build --projects=tag:type:pkg,tag:type:metro --parallel=4
39+
40+
- name: Test Metro Packages
41+
uses: nick-fields/retry@v3
42+
with:
43+
max_attempts: 2
44+
timeout_minutes: 5
45+
command: npx nx affected -t test --parallel=2 --exclude='*,!tag:type:metro'
46+
47+
- name: Lint Metro Packages
48+
run: npx nx run-many --targets=lint --projects=tag:type:metro --parallel=2
49+
50+
- name: Check Metro Package Publishing Compatibility
51+
run: |
52+
for pkg in packages/metro-*; do
53+
if [ -f "$pkg/package.json" ]; then
54+
echo "Checking $pkg..."
55+
npx publint "$pkg"
56+
fi
57+
done

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949
run: |
5050
git fetch origin main
5151
npx nx run-many --targets=build --projects=tag:type:pkg --skip-nx-cache
52+
npx nx run-many --targets=build --projects=tag:type:metro
5253
ls -l packages/*/dist packages/*/package.json
5354
5455
- name: Release

apps/metro-example-host/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"@babel/runtime": "^7.25.0",
3232
"@module-federation/metro": "workspace:*",
3333
"@module-federation/metro-plugin-rnef": "workspace:*",
34-
"@module-federation/runtime": "^0.15.0",
34+
"@module-federation/runtime": "workspace:*",
3535
"@react-native/babel-preset": "0.80.0",
3636
"@react-native/eslint-config": "0.80.0",
3737
"@react-native/metro-config": "0.80.0",

apps/metro-example-mini/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"@babel/runtime": "^7.25.0",
3030
"@module-federation/metro": "workspace:*",
3131
"@module-federation/metro-plugin-rnef": "workspace:*",
32-
"@module-federation/runtime": "^0.15.0",
32+
"@module-federation/runtime": "workspace:*",
3333
"@react-native-community/cli": "^19.1.0",
3434
"@react-native/babel-preset": "0.80.0",
3535
"@react-native/eslint-config": "0.80.0",

apps/metro-example-nested-mini/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"@babel/runtime": "^7.25.0",
3030
"@module-federation/metro": "workspace:*",
3131
"@module-federation/metro-plugin-rnef": "workspace:*",
32-
"@module-federation/runtime": "^0.15.0",
32+
"@module-federation/runtime": "workspace:*",
3333
"@react-native/babel-preset": "0.80.0",
3434
"@react-native/eslint-config": "0.80.0",
3535
"@react-native/metro-config": "0.80.0",
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset';
2+
import { defineConfig } from 'cypress';
3+
4+
export default defineConfig({
5+
e2e: {
6+
...nxE2EPreset(__filename, { cypressDir: 'cypress' }),
7+
baseUrl: 'http://localhost:8080',
8+
injectDocumentDomain: true,
9+
},
10+
defaultCommandTimeout: 20000,
11+
retries: {
12+
runMode: 2,
13+
openMode: 1,
14+
},
15+
});
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
describe('ModernJS SSR Dynamic Nested Remote', () => {
2+
it('should load the app', () => {
3+
cy.visit('http://localhost:8080');
4+
cy.contains('dynamic-nested-remote');
5+
});
6+
});
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// This file is processed and loaded automatically before your test files.
2+
// You can change the location of this file or turn off processing it by setting the
3+
// "supportFile" option to false.
4+
// You can read more here: https://on.cypress.io/configuration

0 commit comments

Comments
 (0)