Skip to content

Commit 996100f

Browse files
author
ScriptedAlchemy
committed
docs(rstest): document rstest pairing and stable plugin name
State that federation: true requires the unreleased @rstest/core federation build (web-infra-dev/rstest#1407, pkg.pr.new canary), declare the rstest:federation plugin name a stable public contract, and reword the provenance blurb: the package is rstest federation mode's companion plugin, not an extraction from @rstest/core.
1 parent 057447f commit 996100f

1 file changed

Lines changed: 24 additions & 2 deletions

File tree

packages/rstest/README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,30 @@ This package contains the `federation()` Rsbuild plugin used by Rstest to enable
44
Module Federation compatibility mode for Node test environments
55
(JSDOM / Node workers) and browser mode.
66

7-
It is extracted from `rstest/packages/core/src/core/plugins/federation.ts` to allow shared ownership and versioning
8-
alongside other Module Federation tooling.
7+
It is the companion plugin for [Rstest](https://rstest.rs)'s federation mode,
8+
owned and versioned alongside the rest of the Module Federation tooling.
9+
10+
## Required @rstest/core version
11+
12+
The `federation: true` config key used below is **not available in any released
13+
`@rstest/core` version yet**. It ships with rstest's federation support
14+
([web-infra-dev/rstest#1407](https://github.com/web-infra-dev/rstest/pull/1407)).
15+
Until that release, pair this plugin with a pkg.pr.new canary build from that
16+
PR, for example:
17+
18+
```bash
19+
npm install https://pkg.pr.new/@rstest/core@40086e4
20+
```
21+
22+
Against released `@rstest/core` versions the config snippets below will not
23+
typecheck and `federation: true` is ignored.
24+
25+
## Stable plugin name
26+
27+
The plugin registers itself with the Rsbuild plugin name `rstest:federation`
28+
(exported as `FEDERATION_PLUGIN_NAME`). This name is a stable, public contract:
29+
rstest may detect the plugin by this name to enable federation-specific
30+
behavior. It will not be renamed without a major version bump.
931

1032
## Usage
1133

0 commit comments

Comments
 (0)