Skip to content

Add self-hydration to the deprecation capability - #6329

Merged
jgonz120 merged 4 commits into
dev-feature-PackageDomainModelfrom
dev-jgonz120-AddSelfHydrationToDepreceation
Mar 20, 2025
Merged

jgonz120 merged 4 commits into
dev-feature-PackageDomainModelfrom
dev-jgonz120-AddSelfHydrationToDepreceation

Conversation

@jgonz120

Copy link
Copy Markdown
Contributor

Bug

Fixes:

Description

Add self-hydration to the deprecation capability

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.

@jgonz120
jgonz120 requested a review from a team as a code owner March 19, 2025 23:31
@jgonz120
jgonz120 requested a review from Copilot March 19, 2025 23:31
@jgonz120
jgonz120 changed the base branch from dev to dev-feature-PackageDomainModel March 19, 2025 23:32
@jgonz120
jgonz120 requested review from Copilot and removed request for Copilot March 19, 2025 23:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces self-hydration for the deprecation capability and updates several package capability models and their tests.

  • Add DeprecationPackageMetadataCapability with self-hydration logic
  • Introduce new capability models for vulnerability, known owners, and embedded resources
  • Update tests and adjust related services and models to support these changes

Reviewed Changes

Copilot reviewed 26 out of 29 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/DeprecationPackageMetadataCapability.cs Introduces self-hydration for deprecation metadata retrieval
src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/VulnerableCapability.cs Adds vulnerability capability; contains list initialization syntax issues
src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/KnownOwnersCapability.cs Implements known owners capability
src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/IKnownOwnersCapable.cs Defines interface for known owners capability
src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/IVulnerable.cs Defines interface for vulnerability capability
src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/IEmbeddedResources.cs Defines interface for embedded resources retrieval
src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/IDeprecationCapable.cs Defines interface for deprecation capability
src/NuGet.Core/NuGet.Protocol/Model/PackageDeprecationReasonEnum.cs Provides enum and constants for deprecation reasons
test/NuGet.Clients.Tests/NuGet.PackageManagement.UI.Test/Models/Package/DeprecationPackageMetadataCapabilityTests.cs Adds tests for the self-hydration deprecation capability
src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/EmbeddedResourcesCapability.cs Implements embedded resources via package file service
src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/TransitivelyReferencedPackageModel.cs Extends package model to include transitive origins
src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/ReferencedPackageModel.cs Integrates vulnerability capability with referenced package model
src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/RemotePackageModel.cs Augments remote package model with known owners and vulnerability capabilities
src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/PackageModel.cs Base package model updated to support embedded resources
src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/LocalPackageModel.cs Local package model integrates vulnerability capability
src/NuGet.Clients/NuGet.PackageManagement.VisualStudio/Services/NuGetPackageFileService.cs Adjusts accessibility of GetEmbeddedFileAsync to public static
src/NuGet.Clients/NuGet.PackageManagement.UI/Models/DetailControlModel.cs Removes redundant inner static deprecation reason class
Files not reviewed (3)
  • src/NuGet.Core/NuGet.Protocol/PublicAPI/net472/PublicAPI.Unshipped.txt: Language not supported
  • src/NuGet.Core/NuGet.Protocol/PublicAPI/net8.0/PublicAPI.Unshipped.txt: Language not supported
  • src/NuGet.Core/NuGet.Protocol/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt: Language not supported

@jebriede jebriede left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved with suggestions

@jgonz120
jgonz120 merged commit 75dd1f3 into dev-feature-PackageDomainModel Mar 20, 2025
@jgonz120
jgonz120 deleted the dev-jgonz120-AddSelfHydrationToDepreceation branch March 20, 2025 00:02
jebriede pushed a commit that referenced this pull request Mar 24, 2025
* Add self hydration to deprecation

* update deprecation

* add private

* add mock to constructor
jebriede pushed a commit that referenced this pull request Apr 16, 2025
* Add self hydration to deprecation

* update deprecation

* add private

* add mock to constructor
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.

3 participants