Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
c19f3fc
fix(rstest-plugin): force cjs output for federation tests
ScriptedAlchemy Jan 27, 2026
3d722f0
fix(rstest-plugin): avoid NarrowedRspackConfig type in dts
ScriptedAlchemy Jan 27, 2026
bb39d1f
test(rstest-plugin): use rstest instead of vitest
ScriptedAlchemy Jan 27, 2026
46cce5b
fix(rstest-plugin): compose existing tools.rspack hooks
ScriptedAlchemy Jan 27, 2026
e7965cf
Merge main into rstest-plugin
ScriptedAlchemy Jan 29, 2026
063a07d
Merge remote-tracking branch 'origin/main' into rstest-plugin
ScriptedAlchemy Jan 30, 2026
cfbb817
Merge remote-tracking branch 'origin/main' into rstest-plugin
ScriptedAlchemy Feb 5, 2026
817e7ff
chore: fix lockfile for CI
ScriptedAlchemy Feb 5, 2026
5af39e9
Merge remote-tracking branch 'origin/main' into rstest-plugin
ScriptedAlchemy Feb 6, 2026
1404048
Merge remote-tracking branch 'origin/main' into rstest-plugin
ScriptedAlchemy Feb 7, 2026
502505b
fix(core): use direct actionlint binary install instead of raven-actions
ScriptedAlchemy Feb 7, 2026
a6b75bb
Merge remote-tracking branch 'origin/main' into HEAD
ScriptedAlchemy Feb 8, 2026
5f84255
Merge branch 'main' into rstest-plugin
ScriptedAlchemy Feb 9, 2026
0124a27
Merge branch 'rstest-plugin' of github.com:module-federation/core int…
ScriptedAlchemy Feb 9, 2026
e7de8f9
Merge remote-tracking branch 'origin/main' into rstest-plugin
ScriptedAlchemy Feb 9, 2026
94d0cb9
Merge remote-tracking branch 'origin/main' into rstest-plugin
ScriptedAlchemy Feb 12, 2026
00ebcd0
chore(core): add changeset coverage for pr #4320
ScriptedAlchemy Feb 12, 2026
650a315
chore(rstest-plugin): remove redundant auto changeset
ScriptedAlchemy Feb 12, 2026
380df87
chore(core): merge origin/main
ScriptedAlchemy Feb 14, 2026
8b75ecb
chore(rstest-plugin): merge origin/main
ScriptedAlchemy Feb 14, 2026
20bb4e0
Merge branch 'main' into rstest-plugin
ScriptedAlchemy Feb 14, 2026
d675b3c
Merge remote-tracking branch 'origin/main' into rstest-plugin
ScriptedAlchemy Feb 16, 2026
064fe10
Merge origin/main into rstest-plugin
ScriptedAlchemy Feb 16, 2026
89799b1
chore: merge main into rstest-plugin
ScriptedAlchemy Feb 16, 2026
9cad34a
feat(rstest-plugin): port federation parity behavior
ScriptedAlchemy Feb 16, 2026
296cfcd
fix(rstest-plugin): add publint wiring and fix option lookup
ScriptedAlchemy Feb 16, 2026
3a5e9f5
fix(retry-plugin): type loadEntryError hook args
ScriptedAlchemy Feb 16, 2026
31833a5
fix(rstest-plugin): support mf-manifest remotes and stabilize preview…
ScriptedAlchemy Feb 16, 2026
c2f4b72
fix(core): use sha-based pkg.pr.new comment links
ScriptedAlchemy Feb 16, 2026
3d97a05
feat(rstest-plugin): auto-apply ModuleFederationPlugin options
ScriptedAlchemy Feb 16, 2026
3fe0a1a
fix(core): update lockfile for rstest-plugin preview workflow
ScriptedAlchemy Feb 16, 2026
f7d86c7
feat(module-federation): add rstest demo apps and CI job
ScriptedAlchemy Feb 17, 2026
7de3e2b
fix(module-federation): harden rstest demo setup for codeql
ScriptedAlchemy Feb 17, 2026
e245672
Merge branch 'main' into rstest-plugin
ScriptedAlchemy Feb 19, 2026
05ecae0
Merge origin/main into rstest-plugin
ScriptedAlchemy Feb 19, 2026
de91235
Merge remote-tracking branch 'origin/main' into rstest-plugin
ScriptedAlchemy Feb 24, 2026
26c6a62
fix(dts-plugin): align workspace entrypoints and RawSource typing
ScriptedAlchemy Feb 24, 2026
3e8f2ff
Merge branch 'main' into rstest-plugin
ScriptedAlchemy Feb 25, 2026
4bf12d8
fix(core): sync lockfile for frozen install checks
ScriptedAlchemy Feb 25, 2026
1d2366d
fix(sdk): align package entrypoints with emitted artifacts
ScriptedAlchemy Feb 25, 2026
0c0a2ee
Merge remote-tracking branch 'origin/main' into rstest-plugin
ScriptedAlchemy Feb 25, 2026
71f8f25
Merge origin/main into rstest-plugin
ScriptedAlchemy Feb 26, 2026
f5b5f96
Merge branch 'main' into rstest-plugin
ScriptedAlchemy Feb 26, 2026
97e94cc
Merge branch 'main' into rstest-plugin
ScriptedAlchemy Feb 27, 2026
7a73b3c
Merge branch 'main' into rstest-plugin
ScriptedAlchemy Feb 27, 2026
04c4ae8
Merge branch 'main' into rstest-plugin
ScriptedAlchemy Feb 28, 2026
1ca8aff
Merge origin/main into rstest-plugin
ScriptedAlchemy Feb 28, 2026
6d8acc3
Merge branch 'main' into rstest-plugin
ScriptedAlchemy Mar 2, 2026
d9fc707
Merge origin/main into rstest-plugin
ScriptedAlchemy Mar 3, 2026
ad959f4
Merge branch 'main' into rstest-plugin
ScriptedAlchemy Mar 5, 2026
1367eaf
Merge remote-tracking branch 'origin/main' into rstest-plugin
ScriptedAlchemy Mar 18, 2026
acdbf18
chore(rstest): rename package and reset retry-plugin
ScriptedAlchemy Mar 18, 2026
c6f6220
fix(rstest): resolve node runtime plugin from package (#4573)
ScriptedAlchemy Mar 19, 2026
1893d42
Merge branch 'main' into rstest-plugin
ScriptedAlchemy Mar 19, 2026
4f98139
chore: refresh pnpm lockfile
ScriptedAlchemy Mar 19, 2026
b4bbb75
fix(rstest): infer remote transport defaults
ScriptedAlchemy Mar 19, 2026
517741e
fix(rstest): keep resolved runtime plugin bundled
ScriptedAlchemy Mar 19, 2026
1b77b1a
Merge branch 'main' into rstest-plugin
Jun 11, 2026
940fac8
refactor(rstest): split federation adapter internals
Jun 12, 2026
a516e39
fix(rstest): apply review fixes to the federation plugin
Jun 12, 2026
057447f
chore(rstest): support rsbuild 2.x and align engines with rstest
Jun 12, 2026
996100f
docs(rstest): document rstest pairing and stable plugin name
Jun 12, 2026
e87b169
chore(rstest): adopt rstest federation canary in demos
Jun 12, 2026
5a6de69
chore(rstest): bump rstest canary to 773bf1f
Jun 12, 2026
c0bb63a
test(modern-js): stabilize SSR plugin spec timeout
Jun 12, 2026
58cc69a
fix(rsbuild-plugin): preserve unnamed node containers
Jun 12, 2026
8415e6f
Merge origin/main into rstest-plugin
Jun 12, 2026
e3ce492
Merge remote-tracking branch 'origin/main' into rstest-plugin
Jun 23, 2026
cccc0be
refactor(rstest): slim plugin API and remove dead demo scaffolding
Jul 2, 2026
a48a1fa
Merge remote-tracking branch 'origin/main' into rstest-plugin
Jul 2, 2026
17b5b7a
chore(rstest): adopt rstest federation canary 647b5d0
Jul 2, 2026
725cadc
Merge remote-tracking branch 'origin/main' into rstest-plugin
Jul 2, 2026
142cc7c
Merge remote-tracking branch 'origin/main' into rstest-plugin
ScriptedAlchemy Jul 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/bright-ducks-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@module-federation/rstest": patch
---

Treat the node runtime plugin as an internal default, and warn when it is configured manually instead of duplicating it.
5 changes: 5 additions & 0 deletions .changeset/clean-rstest-surface.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@module-federation/rstest': patch
---

Slim the public API to `federation`, `FEDERATION_PLUGIN_NAME`, and the option types: drop the `pluginModuleFederation` alias and stop re-exporting the internal `shouldKeepBundledForFederation` predicate.
1 change: 1 addition & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@module-federation/modern-js-v3",
"@module-federation/retry-plugin",
"@module-federation/rsbuild-plugin",
"@module-federation/rstest",
"@module-federation/error-codes",
"@module-federation/inject-external-runtime-core-plugin",
"@module-federation/runtime-core",
Expand Down
5 changes: 5 additions & 0 deletions .changeset/pretty-horses-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@module-federation/rstest': patch
---

Infer remote transport from remote declarations in rstest federation mode and always enable async startup defaults.
5 changes: 5 additions & 0 deletions .changeset/quiet-remotes-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@module-federation/rsbuild-plugin': patch
---

Avoid wrapping Node-target Module Federation containers under the package name when the library name is not explicitly configured.
5 changes: 5 additions & 0 deletions .changeset/tidy-schema-family.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@module-federation/enhanced': patch
---

Sync the JSON schema for `dts.remote.family` with the generated TypeScript schema by allowing `0` (auto address-family selection) alongside `4` and `6`.
5 changes: 5 additions & 0 deletions .changeset/wise-donuts-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@module-federation/rstest': patch
---

Add `@module-federation/rstest` as the package-level Rsbuild federation plugin, port the richer federation behavior from rstest core, and resolve the Node runtime plugin from the package's own context so consumers do not need to install `@module-federation/node` directly. This includes remote-name-aware externals bypassing, container-reference request handling, and node-target defaults that inject the resolved runtime plugin automatically.
Binary file added .cursor-screenshots/claude-desktop-fixed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .cursor-screenshots/claude-desktop-v2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .cursor-screenshots/claude-desktop-v3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .cursor-screenshots/claude-desktop-window.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ jobs:
uses: ./.github/workflows/e2e-router.yml
secrets: inherit

e2e-rstest:
needs: checkout-install
uses: ./.github/workflows/e2e-rstest.yml
secrets: inherit

e2e-metro:
needs:
- checkout-install
Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/e2e-rstest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: E2E Test for Rstest Demos

on:
workflow_call:

permissions:
contents: read

jobs:
e2e-rstest:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout Repository
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
fetch-depth: 0

- name: Cache Tool Downloads
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
with:
path: ~/.cache
key: ${{ runner.os }}-toolcache-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-toolcache-

- name: Setup pnpm
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4

- name: Setup Node.js 20
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: '20'
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'

- name: Set SKIP_DEVTOOLS_POSTINSTALL environment variable
run: echo "SKIP_DEVTOOLS_POSTINSTALL=true" >> "$GITHUB_ENV"

- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: Run condition check script
id: check-ci
run: |
ci_status=0
node tools/scripts/ci-is-affected.mjs --appName=rstest-demo,rstest-remote-demo,rstest-rsbuild-demo,rstest-rslib-demo || ci_status=$?
if [ "$ci_status" -eq 0 ]; then
echo "run-e2e=true" >> "$GITHUB_OUTPUT"
elif [ "$ci_status" -eq 1 ]; then
echo "run-e2e=false" >> "$GITHUB_OUTPUT"
else
echo "ci-is-affected failed with unexpected exit code: $ci_status" >&2
exit "$ci_status"
fi

- name: Install Playwright
if: steps.check-ci.outputs.run-e2e == 'true'
run: pnpm exec playwright install --with-deps chromium

- name: Run Build for Rstest Demos
if: steps.check-ci.outputs.run-e2e == 'true'
run: pnpm exec turbo run build --filter=rstest-demo --filter=rstest-remote-demo --filter=rstest-rsbuild-demo --filter=rstest-rslib-demo --concurrency=20

- name: E2E Test for rstest demos
if: steps.check-ci.outputs.run-e2e == 'true'
run: |
npx kill-port --port 3015,3016,3025,3035,3115,3125,3135 || true
pnpm --filter rstest-demo run test:node
pnpm --filter rstest-demo run test:browser
pnpm --filter rstest-rsbuild-demo run test:node
pnpm --filter rstest-rsbuild-demo run test:browser
pnpm --filter rstest-rslib-demo run test:node
pnpm --filter rstest-rslib-demo run test:browser
lsof -ti tcp:3015,3016,3025,3035,3115,3125,3135 | xargs kill || true
Comment thread Fixed
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ migrations.json
# build contnt
packages/**/dist
apps/**/dist
apps/rstest-remote/dist-node/

**/@mf-types/**
**/cypress/downloads
Expand Down
25 changes: 25 additions & 0 deletions apps/rstest-remote/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# rstest remote demo

Federated remote used by rstest demo apps.

## Running demo

- remote: [localhost:3016](http://localhost:3016/)

## How to start

```bash
# from repo root
pnpm i
pnpm --filter rstest-remote-demo run serve
```

## Build targets

```bash
pnpm --filter rstest-remote-demo run build
pnpm --filter rstest-remote-demo run build:node
```

- `build` emits browser remote output
- `build:node` emits node/commonjs remote output for federation node tests
20 changes: 20 additions & 0 deletions apps/rstest-remote/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "rstest-remote-demo",
"private": true,
"scripts": {
"build": "rspack build --config rspack.config.js",
"build:node": "rspack build --config rspack.node.config.js",
"serve": "rspack serve --config rspack.config.js --host 127.0.0.1 --port 3016"
},
"dependencies": {
"@module-federation/enhanced": "workspace:*",
"@module-federation/node": "workspace:*",
"react": "^19.2.3",
"react-dom": "^19.2.3"
},
"devDependencies": {
"@rspack/cli": "^1.6.8",
"@rspack/core": "^1.6.8",
"typescript": "^5.9.3"
}
}
70 changes: 70 additions & 0 deletions apps/rstest-remote/rspack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
const path = require('node:path');
const {
ModuleFederationPlugin,
} = require('@module-federation/enhanced/rspack');

/** @type {import('@rspack/core').Configuration} */
module.exports = {
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
context: __dirname,
entry: './src/index.ts',
devtool: false,
output: {
clean: true,
publicPath: 'http://127.0.0.1:3016/',
path: path.resolve(__dirname, 'dist'),
},
resolve: {
extensions: ['.tsx', '.ts', '.jsx', '.js'],
},
module: {
rules: [
{
test: /\.[jt]sx?$/,
use: [
{
loader: 'builtin:swc-loader',
options: {
jsc: {
parser: {
syntax: 'typescript',
tsx: true,
},
transform: {
react: {
runtime: 'automatic',
},
},
},
},
},
],
},
],
},
plugins: [
new ModuleFederationPlugin({
name: 'rstest_remote',
dts: false,
filename: 'remoteEntry.js',
exposes: {
'./Button': './src/Button.tsx',
},
shared: {
react: {
singleton: true,
},
'react-dom': {
singleton: true,
},
},
}),
],
devServer: {
host: '127.0.0.1',
port: 3016,
headers: {
'Access-Control-Allow-Origin': '*',
},
},
};
72 changes: 72 additions & 0 deletions apps/rstest-remote/rspack.node.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
const path = require('node:path');
const {
ModuleFederationPlugin,
} = require('@module-federation/enhanced/rspack');

/** @type {import('@rspack/core').Configuration} */
module.exports = {
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
context: __dirname,
entry: './src/index.ts',
target: 'async-node',
devtool: false,
output: {
clean: true,
publicPath: 'auto',
path: path.resolve(__dirname, 'dist-node'),
library: {
type: 'commonjs-module',
},
},
resolve: {
extensions: ['.tsx', '.ts', '.jsx', '.js'],
},
module: {
rules: [
{
test: /\.[jt]sx?$/,
use: [
{
loader: 'builtin:swc-loader',
options: {
jsc: {
parser: {
syntax: 'typescript',
tsx: true,
},
transform: {
react: {
runtime: 'automatic',
},
},
},
},
},
],
},
],
},
plugins: [
new ModuleFederationPlugin({
name: 'rstest_remote',
dts: false,
filename: 'remoteEntry.js',
library: { type: 'commonjs-module' },
remoteType: 'commonjs-module',
runtimePlugins: [
require.resolve('@module-federation/node/runtimePlugin'),
],
exposes: {
'./Button': './src/Button.tsx',
},
shared: {
react: {
singleton: true,
},
'react-dom': {
singleton: true,
},
},
}),
],
};
7 changes: 7 additions & 0 deletions apps/rstest-remote/src/Button.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function Button() {
return (
<button type="button" data-testid="remote-button">
Remote Button
</button>
);
}
1 change: 1 addition & 0 deletions apps/rstest-remote/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as Button } from './Button';
8 changes: 8 additions & 0 deletions apps/rstest-remote/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"jsx": "react-jsx",
"types": ["node"]
},
"include": ["src/**/*", "*.ts", "*.tsx"]
}
34 changes: 34 additions & 0 deletions apps/rstest-rsbuild/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# rstest rsbuild adapter demo

Demonstrates `@rstest/adapter-rsbuild` with module federation test flows.

## Running demo

- host: [localhost:3025](http://localhost:3025/)
- remote: [localhost:3016](http://localhost:3016/)

## How to start

```bash
# from repo root
pnpm i

# terminal 1
pnpm --filter rstest-remote-demo run serve

# terminal 2
pnpm --filter rstest-rsbuild-demo run serve
```

## Test commands

```bash
pnpm --filter rstest-rsbuild-demo run test:node
pnpm --filter rstest-rsbuild-demo run test:browser
```

## What this covers

- rstest config extension via `withRsbuildConfig`
- federation node tests with node remote output
- browser mode tests with adapter-derived build settings
Loading
Loading