Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
cf2c46a
feat: add rslib monorepo harness runner
cursoragent Feb 16, 2026
018a831
test: add coverage for rslib harness resolver
cursoragent Feb 16, 2026
e5e5a1b
test: expand rslib harness parser and args coverage
cursoragent Feb 16, 2026
47d7921
docs: add rslib harness usage examples
cursoragent Feb 16, 2026
bbd8664
ci: run rslib harness tests in ci-local jobs
cursoragent Feb 16, 2026
6c8b8e6
chore: add rslib harness list and inspect scripts
cursoragent Feb 16, 2026
1ab9fef
docs: document harness inspect command usage
cursoragent Feb 16, 2026
7ac934d
fix: use fast-glob for node20 harness compatibility
cursoragent Feb 16, 2026
217b4b6
ci: verify rslib harness coverage in local pipeline
cursoragent Feb 16, 2026
fae10d4
test: cover harness ignore patterns
cursoragent Feb 16, 2026
758f2e1
feat: add json output mode for harness listing
cursoragent Feb 16, 2026
af1ac71
test: validate harness json list output
cursoragent Feb 16, 2026
a065fd5
test: add harness dedupe and filter failure coverage
cursoragent Feb 16, 2026
20e992a
ci: run harness checks in build-and-test workflow
cursoragent Feb 16, 2026
290057d
ci: verify harness checks are wired in workflows
cursoragent Feb 16, 2026
3415554
feat: make json mode auto-enable project listing
cursoragent Feb 16, 2026
7980100
feat: emit structured command plans for json dry-runs
cursoragent Feb 16, 2026
99da960
test: enforce deterministic harness project ordering
cursoragent Feb 16, 2026
77d329b
test: assert sorted json dry-run command plans
cursoragent Feb 16, 2026
a044010
fix: require dry-run for json command output
cursoragent Feb 16, 2026
200ff0a
fix: validate harness config entry shapes
cursoragent Feb 16, 2026
af59ac2
test: expand parser and filter validation coverage
cursoragent Feb 16, 2026
980a43d
fix: reject unknown harness config keys
cursoragent Feb 16, 2026
15ae47b
test: broaden parseCliArgs failure case coverage
cursoragent Feb 16, 2026
66b1040
test: cover nested schema validation errors
cursoragent Feb 16, 2026
8067503
fix: validate harness root type
cursoragent Feb 16, 2026
efdd0f3
fix: reject array defaults in harness config
cursoragent Feb 16, 2026
32bb5ea
feat: support inline config and root options
cursoragent Feb 16, 2026
3673ee9
fix: validate explicit project config filenames
cursoragent Feb 16, 2026
b46cf17
fix: harden object entry path validation
cursoragent Feb 16, 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
9 changes: 9 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ jobs:
- name: Verify Publint Workflow Coverage
run: node tools/scripts/verify-publint-workflow-coverage.mjs

- name: Run Rslib Harness Tests
run: pnpm run test:rslib-harness

- name: Verify Rslib Harness Coverage
run: pnpm run verify:rslib-harness

- name: Verify Rslib Harness Workflow Coverage
run: pnpm run verify:rslib-harness:workflow

- name: Print Number of CPU Cores
run: nproc

Expand Down
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,62 @@ To get started with Module Federation, see the [Quick Start](https://module-fede

Come and chat with us on [Discussions](https://github.com/module-federation/universe/discussions) or [Discord](https://discord.gg/n69NnT3ACV)! The Module federation team and users are active there, and we're always looking for contributions.

## 🧪 Rslib Monorepo Harness

This repository includes a workspace-level Rslib harness that can orchestrate
multiple `rslib.config.*` projects from the repo root (including nested project
definitions via harness config files).

Quick examples:

- List resolved projects:

```bash
pnpm run rslib:harness list
```

- List resolved projects as JSON:

```bash
pnpm run rslib:harness list --json
```

`--json` also implies list output when used with other commands.

- Emit a machine-readable dry-run command plan:

```bash
pnpm run rslib:harness:build --project create-module-federation --json --dry-run
```

For non-`list` commands, `--json` is only supported with `--dry-run`.

- Build a single project by name/path filter:

```bash
pnpm run rslib:harness:build --project create-module-federation
```

- Show commands without executing:

```bash
pnpm run rslib:harness:build --project create-module-federation --dry-run
```

- Inspect one project's generated config outputs:

```bash
pnpm run rslib:harness:inspect --project create-module-federation
```

- Verify harness coverage against repo Rslib configs:

```bash
pnpm run verify:rslib-harness
```

The default root harness config is `rslib.harness.config.mjs`.

## 🤝 Contribution

> New contributors welcome!
Expand Down
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@
"lint": "nx run-many --target=lint",
"test": "nx run-many --target=test",
"build": "NX_TUI=false nx run-many --target=build --parallel=5 --projects=tag:type:pkg",
"rslib:harness": "node ./scripts/rslib-harness.mjs",
"rslib:harness:list": "node ./scripts/rslib-harness.mjs list",
"rslib:harness:build": "node ./scripts/rslib-harness.mjs build",
"rslib:harness:inspect": "node ./scripts/rslib-harness.mjs inspect",
"test:rslib-harness": "node --test ./scripts/__tests__/rslib-harness.test.mjs",
"verify:rslib-harness": "node ./tools/scripts/verify-rslib-harness-coverage.mjs",
"verify:rslib-harness:workflow": "node ./tools/scripts/verify-rslib-harness-workflow-coverage.mjs",
"build:pkg": "NX_TUI=false nx run-many --targets=build --projects=tag:type:pkg --skip-nx-cache",
"test:pkg": "NX_TUI=false nx run-many --targets=test --projects=tag:type:pkg --skip-nx-cache",
"lint-fix": "nx format:write --uncommitted",
Expand Down
30 changes: 30 additions & 0 deletions rslib.harness.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* Rslib monorepo harness configuration.
*
* Supported project entry forms:
* - string path / glob:
* - directory (auto-detect rslib.config.*)
* - explicit rslib.config.* file
* - nested rslib.harness.config.* file
* - object:
* {
* name?: string;
* root?: string;
* config?: string;
* args?: string[];
* ignore?: string[];
* projects?: (string | object)[];
* }
*
* Notes:
* - `<rootDir>` token is supported in path values.
* - this root harness intentionally targets publishable package projects and
* app-level rslib projects in apps/.
*/
export default {
ignore: ['**/dist/**', '**/.{idea,cache,output,temp}/**'],
projects: [
'packages/*/rslib.config.{mjs,ts,js,cjs,mts,cts}',
'apps/**/rslib.config.{mjs,ts,js,cjs,mts,cts}',
],
};
Loading
Loading