@mf-toolkit/shared-inspector 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +20 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,9 +4,9 @@
4
4
  [![license](https://img.shields.io/npm/l/@mf-toolkit/shared-inspector?color=blue)](https://github.com/zvitaly7/mf-toolkit/blob/main/LICENSE)
5
5
  [![node](https://img.shields.io/node/v/@mf-toolkit/shared-inspector?color=339933&logo=node.js)](https://nodejs.org)
6
6
 
7
- **Stop debugging Module Federation in production.**
7
+ **Validate Module Federation `shared` config at build time.**
8
8
 
9
- `shared` config breaks in silencewrong versions ship, duplicate React copies can end up in the bundle, singleton negotiation fails, and teams get paged for "Invalid hook call" on Friday night. `shared-inspector` catches these mistakes at build time. Every finding comes with a risk score and a ready-to-paste fix.
9
+ `shared` config errors are silentmismatched versions, broken singleton negotiation, duplicate instances in the bundle. `shared-inspector` surfaces these issues before they reach production. Every finding includes a risk score and a ready-to-paste fix.
10
10
 
11
11
  ## The problem
12
12
 
@@ -556,6 +556,24 @@ Extends all `buildProjectManifest` options (except `name`, auto-resolved from co
556
556
  | `hostGaps` | 🟠 MEDIUM | Package used by 2+ MFs but not declared in `shared` by anyone |
557
557
  | `ghostShares` | 🟡 LOW | Package in `shared` of one MF, unused/unshared by all others |
558
558
 
559
+ ## How it works
560
+
561
+ Four steps, no magic:
562
+
563
+ 1. **Scan** — statically extracts import/require statements from source files
564
+ 2. **Normalize** — reads your declared `shared` config (explicit or auto-extracted from `ModuleFederationPlugin`)
565
+ 3. **Resolve** — reads installed versions from `node_modules` to detect `requiredVersion` drift
566
+ 4. **Cross-reference** — produces findings, a risk score, and optionally a `project-manifest.json` for federation analysis
567
+
568
+ No webpack build required. Runs in seconds on the source tree directly.
569
+
570
+ ## When not to use this tool
571
+
572
+ - You are not using Module Federation (webpack or rspack)
573
+ - Your `shared` config is intentionally empty or minimal by design
574
+ - You only need bundle size analysis — use [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer) instead
575
+ - Your MF setup uses dynamic runtime sharing with non-standard orchestration that doesn't rely on the `shared` config
576
+
559
577
  ## Known limitations
560
578
 
561
579
  - **TypeScript path aliases without `tsconfigPath`**: aliased imports are treated as external package names.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mf-toolkit/shared-inspector",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Stop debugging Module Federation in production. Audit shared config at build time.",
5
5
  "author": "Vitaly Zheltko",
6
6
  "license": "MIT",