Skip to content

V0.10.0/dotnet nuget update - #40

Open
gimlichael wants to merge 6 commits into
mainfrom
v0.10.0/dotnet-nuget-update
Open

V0.10.0/dotnet nuget update#40
gimlichael wants to merge 6 commits into
mainfrom
v0.10.0/dotnet-nuget-update

Conversation

@gimlichael

Copy link
Copy Markdown
Member

This pull request introduces the new dotnet-nuget-update skill, a deterministic tool for auditing and updating NuGet dependencies in .NET repositories. It ensures every declared package version is accounted for before any update, supports both central and project-level package management, preserves compatibility markers, and offers both interactive and automated update modes. The update also adds comprehensive documentation, test coverage, and offline-testable scripts.

New skill: dotnet-nuget-update

  • Introduces the dotnet-nuget-update skill for complete NuGet dependency auditing and updating, supporting central and project-level versioning, TFM-band awareness, stable/prerelease intent inference, and two interactive modes (normal and yolo). [1] [2]
  • Bundles deterministic scripts for dependency graph enumeration, package version resolution, TFM matrix discovery, and minimal XML edits that preserve comments and structure.
  • Implements per-process memoization for NuGet feeds and supports deterministic offline testing via filesystem fixtures.
  • Enforces a complete-audit invariant and preserves XML comments as update notes, requiring explicit attention for rationale-marked updates.
  • Documents the skill in the README.md with catalog entry, installation instructions, and a detailed "Why dotnet-nuget-update?" section explaining its approach to dependency management. [1] [2] [3]

Release and documentation updates

  • Adds a new 0.10.0 release entry in CHANGELOG.md describing the new skill and its features.
  • Links the new release in the version history section.

aicia-bot and others added 3 commits September 7, 2026 23:00
Introduce complete NuGet dependency audit and update workflow with support for central package management and project-level versioning. Handles TFM-aware updates, stable/prerelease intent tracking, major version approval batching, and offline-testable scenarios. Includes bundled scripts for audit, comparison, and structured file edits.
Add dotnet-nuget-update to the Available Skills catalog table with full skill description, include the npx installation command in the setup section, and add a 'Why dotnet-nuget-update?' community health section explaining the need for complete dependency graph auditing, TFM-band awareness, and preservation of intentional pins and compatibility markers.
@gimlichael gimlichael self-assigned this Sep 7, 2026
@greptile-apps

greptile-apps Bot commented Sep 7, 2026

Copy link
Copy Markdown

Greptile Summary

This PR introduces the dotnet-nuget-update skill and its deterministic PowerShell tooling for auditing, resolving, and applying NuGet dependency updates.

  • Supports central and project-level package declarations.
  • Adds TFM-band and stable/prerelease-aware resolution.
  • Preserves targeted XML structure and formatting during updates.
  • Adds offline fixtures, regression tests, documentation, and the 0.10.0 changelog entry.
  • The change since the previous review decodes raw XML condition text before matching it against audit output.

Confidence Score: 4/5

The PR is not yet safe to merge because target-framework discovery can still resolve one project’s property-based TFM using properties collected from another project.

The outstanding previous finding in Get-TargetFrameworks.ps1 remains untouched: repository-wide merging of properties from unrelated .props and .targets files can produce an incorrect validation framework for multi-project repositories. Twelve other previous threads were manually resolved without explanatory replies and do not remain outstanding.

Files Needing Attention: skills/dotnet-nuget-update/scripts/Get-TargetFrameworks.ps1

Important Files Changed

Filename Overview
skills/dotnet-nuget-update/scripts/Apply-PackageUpdates.ps1 Adds XML-entity decoding to align raw condition matching with XML-parsed audit conditions; no new defect was identified.
skills/dotnet-nuget-update/scripts/Get-DependencyAudit.ps1 Implements complete central and project-level declaration enumeration and update classification.
skills/dotnet-nuget-update/scripts/Get-TargetFrameworks.ps1 Discovers the validation TFM matrix, but the unresolved previous finding about globally shared project properties remains.
skills/dotnet-nuget-update/scripts/_common.ps1 Provides shared version, feed, TFM-band, XML-comment, and text-preservation helpers.
skills/dotnet-nuget-update/SKILL.md Defines the complete-audit-first NuGet update workflow, operating modes, safeguards, validation, and reporting contract.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    A[Enumerate package declarations] --> B[Complete dependency audit]
    B --> C[Resolve compatible versions]
    C --> D{Update class}
    D -->|Current| E[Report unchanged]
    D -->|Patch, minor, revision, prerelease| F[Apply targeted XML edit]
    D -->|Major| G[Approve or hold]
    D -->|Unresolved| H[Report manual follow-up]
    F --> I[Re-audit and validate]
    G --> I
Loading

Reviews (4): Last reviewed commit: "🐛 fix xml entity decoding in condition ..." | Re-trigger Greptile

Comment thread skills/dotnet-nuget-update/scripts/Apply-PackageUpdates.ps1
Comment thread skills/dotnet-nuget-update/scripts/Apply-PackageUpdates.ps1 Outdated
Comment thread skills/dotnet-nuget-update/scripts/Get-DependencyAudit.ps1
Comment thread skills/dotnet-nuget-update/scripts/_common.ps1
Comment thread skills/dotnet-nuget-update/scripts/_common.ps1
Comment thread skills/dotnet-nuget-update/scripts/_common.ps1
Comment thread skills/dotnet-nuget-update/scripts/_common.ps1
Comment thread skills/dotnet-nuget-update/scripts/_common.ps1 Outdated
Comment thread skills/dotnet-nuget-update/scripts/Get-TargetFrameworks.ps1
Enhance file encoding detection to support UTF-32 and UTF-16 variants. Improve line-ending preservation with better handling of mixed styles. Refactor XML and NuGet version parsing with more sophisticated patterns and error handling. Strengthen cross-line tag parsing and version validation for edge cases in package updates and audit workflows.
Comment thread skills/dotnet-nuget-update/scripts/Get-DependencyAudit.ps1
Comment on lines +135 to +145
$propertyMap = @{}
foreach ($propsFile in @($propsFiles | Sort-Object { $_.FullName.Length })) {
foreach ($entry in (Get-PropertyMap -Path $propsFile.FullName).GetEnumerator()) {
$propertyMap[$entry.Key] = $entry.Value
}
}
if (Test-Path -LiteralPath $directoryBuildProps) {
foreach ($entry in (Get-PropertyMap -Path $directoryBuildProps).GetEnumerator()) {
$propertyMap[$entry.Key] = $entry.Value
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Project Properties Leak Globally

In a multi-project repository with conflicting nested properties, this code merges properties from every .props and .targets file into one global map and applies it to every project, regardless of the project's actual imports. A property-based TFM can therefore resolve using another project's value, causing validation to omit the real framework or test the wrong one.

Prompt To Fix With AI
This is a comment left during a code review.
Path: skills/dotnet-nuget-update/scripts/Get-TargetFrameworks.ps1
Line: 135-145

Comment:
**Project Properties Leak Globally**

In a multi-project repository with conflicting nested properties, this code merges properties from every `.props` and `.targets` file into one global map and applies it to every project, regardless of the project's actual imports. A property-based TFM can therefore resolve using another project's value, causing validation to omit the real framework or test the wrong one.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Codex

Comment thread skills/dotnet-nuget-update/scripts/Apply-PackageUpdates.ps1 Outdated
Improve central vs project package declaration routing to correctly handle updates targeting project files. Enhance conflict reporting to enumerate all conflicting sources when unspecified. Fix property resolution precedence to preserve first-matched declarations instead of overwriting with later files.
Comment thread skills/dotnet-nuget-update/scripts/Apply-PackageUpdates.ps1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants