Skip to content

Commit 114e631

Browse files
chore: package refresh (#4413)
* chore: refresh packages via repotools * chore: update pnpm lockfile 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * chore(bi-directional): inline mf config * chore: refresh deps * chore: update remix pnpm lockfile 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * chore: update pnpm lockfile after modernjs upgrades 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: inline module federation config for modernjs-ssr apps Move MF configuration inline to modern.config.ts files and remove external module-federation.config.ts files to fix the "mfConfig.name can not be empty" error during builds. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * chore: update pnpm lockfile 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: migrate modernjs-ssr to new createLazyComponent API Replace deprecated createRemoteSSRComponent with createLazyComponent from @module-federation/modern-js/react per updated documentation. Also use getInstance and loadRemote from @module-federation/modern-js/runtime. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: improve e2e test reliability for CI - Add waitForLoadState('networkidle') to comprehensive-demo-react18 tests - Increase shell prewarm timeout from 5min to 10min in federated-css-react-ssr 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix(comprehensive-demo-react18): correct ReactRefresh plugin condition ReactRefreshWebpackPlugin should only be used in development mode (!isProd), not production mode (isProd). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix(comprehensive-demo-react18): filter undefined plugins and increase webServer timeout - Use .filter(Boolean) to remove undefined from plugins array in production - Increase playwright webServer timeout from 120s to 180s for CI reliability 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix(comprehensive-demo-react18): filter undefined plugins in app-02 rspack config Apply the same fix from app-01 to app-02 - conditionally include ReactRefreshWebpackPlugin only in development mode and filter out falsy values from the plugins array. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix(comprehensive-demo-react18): remove experiments.css to align rspack with webpack configs The experiments.css feature was causing issues with first-visit rendering. Removed experiments: { css: true } from app-02 and app-04 rspack configs to match webpack behavior. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix(ci): centralize Playwright browser installation in CI workflows - Remove playwright install --with-deps from all e2e:ci scripts across 34 packages - CI now installs Playwright browsers once in setup job, cached by version - Add Playwright version extraction from root package.json for consistent cache keys - Add PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 to pnpm install to avoid redundant downloads - Add @playwright/test and playwright to repotools.js for version refresh - Add ci:playwright:install and ci:playwright:install-deps scripts to root package.json - Standardize e2e:ci scripts to use pnpm exec playwright test 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix(comprehensive-demo-react18): use CssExtractRspackPlugin for Svelte CSS Replace experiments.css with CssExtractRspackPlugin in app-04 rspack config to match webpack's MiniCssExtractPlugin approach. This ensures consistent CSS handling between webpack and rspack builds. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * chore: update @playwright/test to 1.57.0 in nextjs-host-react-remote 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * chore: update @playwright/test and playwright to 1.57.0 across all packages - Add @playwright/ and playwright to ALWAYS_UPDATE_SCOPES in repotools.js - Update @playwright/test from ^1.54.2 to 1.57.0 in 63 packages - Update playwright from ^1.54.2 to 1.57.0 where present 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * remove cypress, align playwright, stabilize e2e * stabilize e2e startup and scripts * defer app_05 load and harden comprehensive demo e2e * lazy-load app_03/app_04 remotes in comprehensive demo * Fix React shared versions in comprehensive demo * Fix React shared versions in react16 demo * Relax React version checks in comprehensive demos * Eager-load shared React in comprehensive demos * chore: add no-op e2e scripts for native-federation tests * fix: stabilize clo e2e webservers * chore: remove playwright ui/debug scripts * fix: remove unused deps variables flagged by CodeQL Remove unused `deps` variable declarations from app-03 config files in comprehensive-demo-react16 and comprehensive-demo-react18 examples. Addresses github-advanced-security bot review comments. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent f21c2df commit 114e631

1,371 files changed

Lines changed: 11466 additions & 52583 deletions

File tree

Some content is hidden

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

.github/workflows/on-pull-request.yml

Lines changed: 27 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,14 @@ jobs:
103103
ref: ${{ github.event.pull_request.head.ref }}
104104
fetch-depth: 0
105105

106+
- name: Get Playwright version
107+
id: playwright-version
108+
shell: bash
109+
run: |
110+
# Use the repo-pinned Playwright version as cache key input.
111+
version="$(node -p "String(require('./package.json').devDependencies['@playwright/test']||'').replace(/^[^0-9]*/, '')")"
112+
echo "version=$version" >> "$GITHUB_OUTPUT"
113+
106114
- name: Setup pnpm
107115
uses: pnpm/action-setup@v4
108116
with:
@@ -130,20 +138,12 @@ jobs:
130138
restore-keys: |
131139
pnpm-store-${{ runner.os }}-
132140
133-
- name: Cache Cypress binary
134-
uses: actions/cache@v4
135-
with:
136-
path: ~/.cache/Cypress
137-
key: cypress-${{ runner.os }}-cypress-13.12.0
138-
restore-keys: |
139-
cypress-${{ runner.os }}-
140-
141141
- name: Cache Playwright browsers
142142
uses: actions/cache@v4
143143
id: playwright-cache
144144
with:
145145
path: ~/.cache/ms-playwright
146-
key: playwright-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
146+
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}
147147
restore-keys: |
148148
playwright-${{ runner.os }}-
149149
@@ -153,21 +153,12 @@ jobs:
153153
- name: Install dependencies
154154
run: |
155155
echo "Installing all dependencies to populate cache..."
156-
pnpm install --frozen-lockfile --prefer-offline
157-
158-
- name: Install Cypress
159-
run: npx cypress install
156+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 pnpm install --frozen-lockfile --prefer-offline
160157
161158
- name: Install Playwright browsers
162159
run: |
163-
# Install Playwright browsers for projects that have it as a dependency
164-
# This prepares the cache for future migration
165-
if command -v playwright &> /dev/null || [ -f "$(npm root -g)/playwright/cli.js" ]; then
166-
echo "Installing Playwright browsers..."
167-
npx playwright install --with-deps chromium
168-
else
169-
echo "Playwright not found in dependencies, skipping browser installation"
170-
fi
160+
# Populate the shared browser cache once per workflow run (no system deps here).
161+
pnpm exec playwright install chromium
171162
172163
- name: Create matrix
173164
id: set-matrix
@@ -178,7 +169,7 @@ jobs:
178169
echo $matrix
179170
echo "matrix=$matrix" >> $GITHUB_OUTPUT
180171
181-
# Run Cypress e2e tests for changed samples (additionally install deps for all changed samples if there is no any created cache in master branch) + Create artifacts for Cypress screenshots and videos
172+
# Run e2e tests for changed samples (additionally install deps for all changed samples if there is no any created cache in master branch)
182173
run-e2e-test:
183174
needs: [setup-matrix]
184175
if: ${{ needs.setup-matrix.outputs.matrix != '{"container":[]}' }}
@@ -195,6 +186,13 @@ jobs:
195186
ref: ${{ github.event.pull_request.head.ref }}
196187
fetch-depth: 1
197188

189+
- name: Get Playwright version
190+
id: playwright-version
191+
shell: bash
192+
run: |
193+
version="$(node -p "String(require('./package.json').devDependencies['@playwright/test']||'').replace(/^[^0-9]*/, '')")"
194+
echo "version=$version" >> "$GITHUB_OUTPUT"
195+
198196
- name: Setup pnpm
199197
uses: pnpm/action-setup@v4
200198
with:
@@ -225,23 +223,12 @@ jobs:
225223
pnpm-store-${{ runner.os }}-
226224
fail-on-cache-miss: false
227225

228-
- name: Restore Cypress cache
229-
uses: actions/cache/restore@v4
230-
id: cypress-cache
231-
with:
232-
path: ~/.cache/Cypress
233-
key: cypress-${{ runner.os }}-cypress-13.12.0
234-
restore-keys: |
235-
cypress-${{ runner.os }}-
236-
fail-on-cache-miss: false
237-
238226
- name: Restore Playwright cache
239-
if: matrix.container == 'bi-directional'
240227
uses: actions/cache/restore@v4
241228
id: playwright-cache
242229
with:
243230
path: ~/.cache/ms-playwright
244-
key: playwright-${{ runner.os }}-1.54.2
231+
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}
245232
restore-keys: |
246233
playwright-${{ runner.os }}-
247234
fail-on-cache-miss: false
@@ -253,35 +240,13 @@ jobs:
253240
FORCE_COLOR: 3
254241
run: |
255242
echo "Installing dependencies from cached pnpm store..."
256-
pnpm install --frozen-lockfile --prefer-offline
257-
258-
# Verify Cypress if needed
259-
if [ "${{ steps.cypress-cache.outputs.cache-hit }}" != "true" ]; then
260-
echo "Installing Cypress binary..."
261-
npx cypress install
262-
else
263-
echo "Cypress binary already cached"
264-
npx cypress verify || true
265-
fi
266-
243+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 pnpm install --frozen-lockfile --prefer-offline
244+
267245
- name: Install Playwright browsers for projects that use it
268246
run: |
269-
echo "Installing Playwright browsers for projects that use it..."
270-
271-
# Install Playwright package first if not already available
272-
if ! command -v playwright &> /dev/null; then
273-
echo "Installing Playwright package..."
274-
npm install -g playwright@^1.54.2
275-
fi
276-
277-
# Check if we need to install Playwright browsers
278-
if [ ! -d "$HOME/.cache/ms-playwright" ] || [ -z "$(ls -A $HOME/.cache/ms-playwright 2>/dev/null)" ]; then
279-
echo "Installing Playwright browsers and dependencies..."
280-
npx playwright install --with-deps chromium
281-
else
282-
echo "Playwright browsers already cached, installing system dependencies only..."
283-
npx playwright install-deps chromium
284-
fi
247+
# Ensure system deps are present on the runner, then ensure the browser is installed.
248+
pnpm exec playwright install-deps chromium
249+
pnpm exec playwright install chromium
285250
286251
- name: Run sample webpack e2e tests
287252
timeout-minutes: 30
@@ -306,7 +271,7 @@ jobs:
306271
with:
307272
name: test-results-${{ matrix.container }}
308273
path: |
309-
${{ matrix.container }}/cypress/results/allure-results
274+
playwright-e2e/results/allure-results
310275
${{ matrix.container }}/playwright-report
311276
${{ matrix.container }}/test-results
312277
retention-days: 7

.github/workflows/on-push.yml

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ jobs:
4848
ref: ${{ github.event.pull_request.head.ref }}
4949
fetch-depth: 0
5050

51+
- name: Get Playwright version
52+
id: playwright-version
53+
shell: bash
54+
run: |
55+
version="$(node -p "String(require('./package.json').devDependencies['@playwright/test']||'').replace(/^[^0-9]*/, '')")"
56+
echo "version=$version" >> "$GITHUB_OUTPUT"
57+
5158
- name: Free up some space
5259
run: ${{ env.FILES_TO_DELETE }}
5360

@@ -86,20 +93,12 @@ jobs:
8693
restore-keys: |
8794
pnpm-store-${{ runner.os }}-
8895
89-
- name: Cache Cypress binary
90-
uses: actions/cache@v4
91-
with:
92-
path: ~/.cache/Cypress
93-
key: cypress-${{ runner.os }}-cypress-13.12.0
94-
restore-keys: |
95-
cypress-${{ runner.os }}-
96-
9796
- name: Cache Playwright browsers
9897
uses: actions/cache@v4
9998
id: playwright-cache
10099
with:
101100
path: ~/.cache/ms-playwright
102-
key: playwright-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
101+
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}
103102
restore-keys: |
104103
playwright-${{ runner.os }}-
105104
@@ -112,24 +111,9 @@ jobs:
112111
FORCE_COLOR: 3
113112
run: |
114113
echo "Installing dependencies from pnpm store..."
115-
pnpm install --frozen-lockfile --prefer-offline
116-
117-
- name: Install Cypress
118-
run: |
119-
# Install Cypress binary if not cached
120-
if [ -z "$(ls -A ~/.cache/Cypress 2>/dev/null)" ]; then
121-
echo "Installing Cypress binary..."
122-
npx cypress install
123-
else
124-
echo "Cypress binary already cached"
125-
fi
126-
114+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 pnpm install --frozen-lockfile --prefer-offline
115+
127116
- name: Install Playwright browsers
128117
run: |
129-
# Install Playwright browsers for projects that have it as a dependency
130-
if command -v playwright &> /dev/null || [ -f "$(npm root -g)/playwright/cli.js" ]; then
131-
echo "Installing Playwright browsers..."
132-
npx playwright install --with-deps chromium
133-
else
134-
echo "Playwright not found in dependencies, skipping browser installation"
135-
fi
118+
# Populate the shared browser cache (no system deps here).
119+
pnpm exec playwright install chromium

advanced-api/automatic-vendor-sharing/app1/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
"@babel/core": "7.24.7",
66
"@babel/preset-react": "7.24.7",
77
"@babel/preset-typescript": "^7.24.7",
8-
"@module-federation/enhanced": "^0.17.1",
8+
"@module-federation/enhanced": "0.22.0",
99
"@types/react": "^18.3.3",
1010
"@types/react-dom": "^18.3.0",
1111
"typescript": "^5.5.4",
12-
"@rspack/cli": "1.4.11",
13-
"@rspack/core": "1.4.11",
14-
"@rspack/dev-server": "1.1.3",
12+
"@rspack/cli": "1.6.8",
13+
"@rspack/core": "1.6.8",
14+
"@rspack/dev-server": "1.1.4",
1515
"babel-loader": "9.1.3",
1616
"html-webpack-plugin": "5.6.0",
1717
"serve": "14.2.3",
18-
"webpack": "5.101.0",
18+
"webpack": "5.104.1",
1919
"webpack-cli": "5.1.4",
2020
"webpack-dev-server": "5.0.4"
2121
},

advanced-api/automatic-vendor-sharing/app1/rspack.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ module.exports = {
5656
new ModuleFederationPlugin({
5757
name: 'app1',
5858
filename: 'remoteEntry.js',
59+
dts: false,
5960
remotes: {
6061
app2: 'app2@http://localhost:3002/remoteEntry.js',
6162
},

advanced-api/automatic-vendor-sharing/app1/webpack.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ module.exports = {
3030
new ModuleFederationPlugin({
3131
name: 'app1',
3232
filename: 'remoteEntry.js',
33+
dts: false,
3334
remotes: {
3435
app2: 'app2@http://localhost:3002/remoteEntry.js',
3536
},

advanced-api/automatic-vendor-sharing/app1/webpack.prod.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ module.exports = {
6262
new ModuleFederationPlugin({
6363
name: 'app1',
6464
filename: 'remoteEntry.js',
65+
dts: false,
6566
remotes: {
6667
app2: 'app2@/remoteEntry.js', // Use relative URL for production
6768
},
@@ -108,4 +109,4 @@ module.exports = {
108109
},
109110
}),
110111
],
111-
};
112+
};

advanced-api/automatic-vendor-sharing/app2/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
"@babel/core": "7.24.7",
66
"@babel/preset-react": "7.24.7",
77
"@babel/preset-typescript": "^7.24.7",
8-
"@module-federation/enhanced": "^0.17.1",
8+
"@module-federation/enhanced": "0.22.0",
99
"@types/react": "^18.3.3",
1010
"@types/react-dom": "^18.3.0",
1111
"typescript": "^5.5.4",
12-
"@rspack/cli": "1.4.11",
13-
"@rspack/core": "1.4.11",
14-
"@rspack/dev-server": "1.1.3",
12+
"@rspack/cli": "1.6.8",
13+
"@rspack/core": "1.6.8",
14+
"@rspack/dev-server": "1.1.4",
1515
"babel-loader": "9.1.3",
1616
"html-webpack-plugin": "5.6.0",
1717
"serve": "14.2.3",
18-
"webpack": "5.101.0",
18+
"webpack": "5.104.1",
1919
"webpack-cli": "5.1.4",
2020
"webpack-dev-server": "5.0.4"
2121
},

advanced-api/automatic-vendor-sharing/app2/rspack.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ module.exports = {
5656
new ModuleFederationPlugin({
5757
name: 'app2',
5858
filename: 'remoteEntry.js',
59+
dts: false,
5960
remotes: {
6061
app1: 'app1@http://localhost:3001/remoteEntry.js',
6162
},
@@ -77,4 +78,4 @@ module.exports = {
7778
template: './public/index.html',
7879
}),
7980
],
80-
};
81+
};

advanced-api/automatic-vendor-sharing/app2/webpack.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ module.exports = {
3030
new ModuleFederationPlugin({
3131
name: 'app2',
3232
filename: 'remoteEntry.js',
33+
dts: false,
3334
remotes: {
3435
app1: 'app1@http://localhost:3001/remoteEntry.js',
3536
},

advanced-api/automatic-vendor-sharing/app2/webpack.prod.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ module.exports = {
6262
new ModuleFederationPlugin({
6363
name: 'app2',
6464
filename: 'remoteEntry.js',
65+
dts: false,
6566
remotes: {
6667
app1: 'app1@/remoteEntry.js', // Use relative URL for production
6768
},
@@ -108,4 +109,4 @@ module.exports = {
108109
},
109110
}),
110111
],
111-
};
112+
};

0 commit comments

Comments
 (0)