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
Implement advanced scenarios that validate complex move-file behavior: path alias handling, export management, idempotence, and project graph updates. These scenarios ensure correctness in edge cases and complex import/export scenarios.
Objectives
Verify path alias rewrites work correctly across multiple libraries
Validate index.ts export management (additions and removals)
Ensure generator is idempotent (re-running doesn't cause duplicates)
Confirm Nx project graph updates correctly after moves
Scope / Scenario Details
1. PATH-ALIASES - Workspace with 3 libs; multiple alias moves
Purpose: Verify path alias handling across multiple libraries
Setup:
Workspace with 3 libraries (lib-a, lib-b, lib-c)
Each library has path alias in tsconfig.base.json
Files import from each other using aliases (@nxworker/lib-a, etc.)
Implementation:
Move file from lib-a to lib-b (used by lib-c)
Move file from lib-b to lib-c (used by lib-a)
Assertions:
All path aliases updated correctly
No broken imports
tsconfig.base.json paths remain valid
All libraries still build successfully
2. EXPORTS - Move exported file and verify index updated
Purpose: Verify index.ts export updates after move
Setup:
Workspace with 2 libraries (lib-source, lib-target)
Parent: #319
Summary
Implement advanced scenarios that validate complex move-file behavior: path alias handling, export management, idempotence, and project graph updates. These scenarios ensure correctness in edge cases and complex import/export scenarios.
Objectives
Scope / Scenario Details
1. PATH-ALIASES - Workspace with 3 libs; multiple alias moves
Purpose: Verify path alias handling across multiple libraries
Setup:
@nxworker/lib-a, etc.)Implementation:
Assertions:
2. EXPORTS - Move exported file and verify index updated
Purpose: Verify index.ts export updates after move
Setup:
Implementation:
Assertions:
@nxworker/lib-sourceupdated to@nxworker/lib-target3. REPEAT-MOVE - Re-run MOVE-PROJECT-DIR ensuring no duplicates
Purpose: Verify idempotence (running generator twice has no side effects)
Setup:
Implementation:
Assertions:
Notes: This is critical for ensuring the generator can be safely re-run (e.g., in CI retries or user error).
4. GRAPH-REACTION - Force project graph rebuild after moves
Purpose: Verify Nx project graph updates correctly after moves
Setup:
Implementation:
Assertions:
nx affectedcorrectly identifies affected projectsTasks
Acceptance Criteria
Dependencies
Out of Scope
Definition of Done
Advanced scenario implementations merged; orchestrator executes them with real assertions; all tests passing; import/export correctness validated.