ln-712-nuget-upgrader
L3 Worker - Upgrades .NET NuGet packages
Main Workflow
stateDiagram-v2
[*] --> FindProjects: Start
FindProjects --> SecurityAudit: Projects Found
SecurityAudit --> CheckOutdated: Audit Pass
SecurityAudit --> Report: Critical CVE Found
CheckOutdated --> IdentifyBreaking: Outdated Found
CheckOutdated --> Report: All Up-to-date
IdentifyBreaking --> ApplyUpgrades: Breaking Changes Mapped
ApplyUpgrades --> RestoreBuild: Packages Updated
RestoreBuild --> Report: Build Pass
RestoreBuild --> Rollback: Build Fail
Rollback --> ApplyUpgrades: Retry Next Package
Report --> [*]: Complete
Project Discovery
flowchart TD
Start([Receive Context]) --> CheckSln{Has .sln file?}
CheckSln -->|Yes| ParseSln[dotnet sln list]
CheckSln -->|No| FindCsproj[Find *.csproj files]
ParseSln --> Projects([List of Projects])
FindCsproj --> Projects
Projects --> ForEach{For Each Project}
ForEach --> CheckOutdated[dotnet outdated]
CheckOutdated --> NextProject{More Projects?}
NextProject -->|Yes| ForEach
NextProject -->|No| Aggregate([Aggregate Results])
classDef decision fill:#FFE4B5
classDef action fill:#90EE90
class CheckSln,NextProject decision
class ParseSln,FindCsproj,CheckOutdated action
Upgrade Priority Order
flowchart LR
P1[1. SDK/Runtime] --> P2[2. Framework]
P2 --> P3[3. EF Core]
P3 --> P4[4. Logging]
P4 --> P5[5. Other Packages]
classDef critical fill:#FF6B6B
classDef high fill:#FFE66D
classDef normal fill:#4ECDC4
class P1 critical
class P2,P3 high
class P4,P5 normal
Build Verification
sequenceDiagram
participant W as Worker
participant DN as dotnet CLI
participant Ctx as Context7/Ref
W->>DN: dotnet restore
DN-->>W: Restore Complete
W->>DN: dotnet build --configuration Release
DN-->>W: Build Result
alt Build Fails
W->>Ctx: Query migration guide
Ctx-->>W: Migration steps
W->>W: Apply fixes
W->>DN: Rebuild
end
W->>DN: dotnet test
DN-->>W: Test Results