You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -478,22 +478,24 @@ When a feature is removed from a client config, its initializer disappears autom
478
478
479
479
## Platform Governance
480
480
481
-
To ensure each client build is a hermetically sealed artifact, the pre-build engine enforces strict governance. When a feature is loaded from the registry by version, the script enforces that the feature's `peerDependencies` are satisfied by the shell's installed dependencies.
481
+
To ensure each client build is a **hermetically sealed** artifact, the pre-build engine enforces strict dependency governance on every feature — catching incompatibilities at build time, long before a bad artifact reaches your deployment pipeline.
482
482
483
-
This prevents "Module Federation version mismatch" errors by catching framework or library version mismatches (e.g. an Angular 18 feature in an Angular 21 shell) before a bad build ever reaches your deployment pipeline.
483
+
When `prepare-build` resolves a feature's `package.json`, it iterates over **all**`peerDependencies` declared by that feature and verifies each one is satisfied by the shell's installed dependencies. This applies universally — both versioned registry packages and local workspace features are checked. (In practice, local features naturally satisfy their peers because they share the workspace's `node_modules`, but the check remains as a safety net.)
484
484
485
-
The enforced peers are: `@angular/core`, `@angular/common`, `@angular/router`, `rxjs`.
486
-
487
-
If a violation is detected, the build fails immediately with a clear message:
485
+
This semantic governance loop prevents framework or library version mismatches (e.g. an Angular 18 feature composed into an Angular 21 shell) from silently producing a broken build. The build fails immediately with a typed `NacsGovernanceError` and an actionable message:
488
486
489
487
```
490
-
❌ STRICT GOVERNANCE FAILURE: Version mismatch in @nacs/feature-a@1.0.0
491
-
The shell's core dependencies do not satisfy the feature's peer requirements:
488
+
❌ NACS GOVERNANCE FAILURE: Version mismatch in @nacs/feature-a@1.0.0
489
+
The shell's dependencies do not satisfy the feature's peer requirements:
0 commit comments