Repository navigation
Update package model - #6311
Merged
jgonz120 merged 3 commits intoMar 12, 2025
Merged
Update package model#6311
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the package model by adding additional fields and capabilities related to embedded resources and vulnerabilities, along with new tests to validate the changes.
- Introduces tests for EmbeddedResourcesCapability and VulnerableCapability.
- Implements a new VulnerableCapability class for ordering and exposing package vulnerabilities.
- Exposes GetEmbeddedFileAsync as a public static helper in the NuGetPackageFileService.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/NuGet.Clients.Tests/NuGet.PackageManagement.UI.Test/Models/Package/EmbeddedResourcesCapabilityTests.cs | New tests validating EmbeddedResourcesCapability behavior. |
| src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/VulnerableCapability.cs | New capability implementation for handling package vulnerabilities. |
| test/NuGet.Clients.Tests/NuGet.PackageManagement.UI.Test/Models/Package/VulnerableCapabilityTests.cs | Tests ensuring proper vulnerability ordering and error handling. |
| src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/IEmbeddedResources.cs | New interface added for embedded resource operations. |
| test/NuGet.Clients.Tests/NuGet.PackageManagement.UI.Test/Models/Package/PackageModelTests.cs | Tests verifying the PackageModel functionality. |
| src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/EmbeddedResourcesCapability.cs | Implementation for fetching embedded package resources. |
| src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/IVulnerable.cs | Interface for exposing vulnerability details. |
| src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/PackageModel.cs | Updates to the base package model with additional fields. |
| test/NuGet.Clients.Tests/NuGet.PackageManagement.UI.Test/Models/Package/TestPackageModel.cs | Test implementation for PackageModel. |
| src/NuGet.Clients/NuGet.PackageManagement.VisualStudio/Services/NuGetPackageFileService.cs | Modified GetEmbeddedFileAsync visibility and static modifier. |
martinrrm
approved these changes
Mar 11, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the base package model by adding additional fields that support enhanced package metadata.
- Added new parameters and properties: Owners, OwnersList, packageDependencyGroups, and Summary.
- Introduced logic to derive OwnersList from Owners and vice versa, and to process package dependency groups.
Comments suppressed due to low confidence (1)
src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/PackageModel.cs:39
- Consider handling the case where both Owners and OwnersList are provided but contain conflicting data. Explicitly validating or prioritizing one over the other could prevent unexpected behavior.
if (Owners != null && OwnersList == null)
jebriede
pushed a commit
that referenced
this pull request
Mar 24, 2025
* Add new fields * added summary * only use ownerlist
jebriede
pushed a commit
that referenced
this pull request
Apr 16, 2025
* Add new fields * added summary * only use ownerlist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Fixes:
Description
Added additional fields to base package model
PR Checklist