added basic reproduction for 'enforce-module-boundaries' es-lint rule…
… error in angular secondary entrypoints library
Basic steps for reproduction:
-
Generate angular library (Note that it has to generate a package.json and allow secondary entrypoints) nx generate @nrwl/angular:library --name=example-lib --importPath=@example/lib --publishable
-
Generate two secondary entrypoints for library (models/abstract and models/implementations) nx generate @nrwl/angular:library-secondary-entry-point --name=models/abstract --library=example-lib --skipModule nx generate @nrwl/angular:library-secondary-entry-point --name=models/implementations --library=example-lib --skipModule
-
Create some exported file in first entrypoint. Example example-model.ts:
export interface ExampleModel {
someField: string;
}
- Use exported file in second entrypoint:
import {ExampleModel as IExampleModel} from '@example/lib/models/abstract';
export class ExampleModel implements IExampleModel {
someField!: string;
}
- Second file in secondary entrypoint should get a linting error
✔️ Deploy Preview for nrwl-nx-examples-dep-graph ready!
🔨 Explore the source changes: f307124355bf4e25f2357dcab14defcfa5713443
🔍 Inspect the deploy log: https://app.netlify.com/sites/nrwl-nx-examples-dep-graph/deploys/61e56ec790587000076dc6e5
😎 Browse the preview: https://deploy-preview-179--nrwl-nx-examples-dep-graph.netlify.app
☁️ Nx Cloud Report
CI ran the following commands for commit f307124355bf4e25f2357dcab14defcfa5713443. Click to see the status, the terminal output, and the build insights.
📂 See all runs for this branch
| 🟥 Failed Commands |
|---|
nx affected:lint --base f35694809ad4ce8e2073d46bcd0fe76592673d9a --parallel |
✅ Successfully ran 3 targets
nx affected:e2e --base f35694809ad4ce8e2073d46bcd0fe76592673d9a --configuration production --parallel false -- --headlessnx affected:build --base f35694809ad4ce8e2073d46bcd0fe76592673d9a --parallel --configuration productionnx affected:test --base f35694809ad4ce8e2073d46bcd0fe76592673d9a --parallel -- --ci --code-coverage
Sent with 💌 from NxCloud.