@mf-toolkit/shared-inspector 0.3.0 → 0.3.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 +18 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,11 +1,10 @@
1
1
  # `@mf-toolkit/shared-inspector`
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@mf-toolkit/shared-inspector?color=CB3837&logo=npm)](https://www.npmjs.com/package/@mf-toolkit/shared-inspector)
4
- [![status](https://img.shields.io/badge/status-in_development-orange)](https://github.com/zvitaly7/mf-toolkit)
5
4
  [![license](https://img.shields.io/badge/license-MIT-blue)](https://github.com/zvitaly7/mf-toolkit/blob/main/LICENSE)
6
5
  [![node](https://img.shields.io/badge/node-%E2%89%A518-339933?logo=node.js)](https://nodejs.org)
7
6
 
8
- > ⚠️ **Work in progress.** This package is fully tested (252 tests) and published to npm. The API is stable but may receive minor changes before the official stable release.
7
+ > **v0.3.0** published to npm. 252 tests. API is stable; minor changes possible before v1.0.
9
8
 
10
9
  Build-time analyser for Module Federation `shared` dependencies. Two-phase architecture: **collect facts → analyse facts**.
11
10
 
@@ -268,6 +267,22 @@ Accepts N `ProjectManifest` objects (one per microfrontend) and returns a `Feder
268
267
 
269
268
  Formats a `FederationReport` as a human-readable terminal string.
270
269
 
270
+ ### `MfSharedInspectorPlugin` options
271
+
272
+ Extends all `buildProjectManifest` options (except `name`, auto-resolved from compiler) plus:
273
+
274
+ | Option | Type | Default | Description |
275
+ |--------|------|---------|-------------|
276
+ | `sourceDirs` | `string[]` | — | Directories to scan |
277
+ | `sharedConfig` | `Record<string, SharedDepConfig>` | auto-extracted | Override auto-extraction from `ModuleFederationPlugin` |
278
+ | `tsconfigPath` | `string` | `undefined` | tsconfig.json for path alias resolution |
279
+ | `workspacePackages` | `string[]` | `[]` | Local monorepo packages to exclude |
280
+ | `warn` | `boolean` | `true` | Print findings to console |
281
+ | `failOn` | `'mismatch' \| 'unused' \| 'any'` | `undefined` | Fail the build when findings match |
282
+ | `writeManifest` | `boolean` | `false` | Write `project-manifest.json` to `outputDir` |
283
+ | `outputDir` | `string` | `'.'` | Directory for manifest output |
284
+ | `analysis` | `AnalysisOptions` | `{}` | Options forwarded to `analyzeProject` |
285
+
271
286
  ## Detection categories
272
287
 
273
288
  ### Per-project (`analyzeProject`)
@@ -296,6 +311,7 @@ Formats a `FederationReport` as a human-readable terminal string.
296
311
  - **TypeScript path aliases without `tsconfigPath`**: aliased imports are treated as external package names. Pass `tsconfigPath` to resolve them correctly.
297
312
  - **Dynamic imports with variables** (`import(moduleName)`): not analysed — requires runtime information.
298
313
  - **Exact tsconfig alias patterns** (non-wildcard, e.g. `"@root": ["."]`): not supported, only `"@alias/*"` wildcard form.
314
+ - **Subclassed `ModuleFederationPlugin`**: auto-extraction matches by constructor name. A custom subclass (`class MyMFP extends ModuleFederationPlugin`) won't be detected — pass `sharedConfig` explicitly in that case.
299
315
 
300
316
  ## Demo
301
317
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mf-toolkit/shared-inspector",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Build-time shared dependency analyzer for Module Federation.",
5
5
  "author": "Vitaly Zheltko",
6
6
  "license": "MIT",