Skip to content

Reapply "Update packageurl-dotnet to 2.0.0-rc.2 (#1730)" (#1751)#1753

Merged
JamieMagee merged 1 commit into
mainfrom
users/jamagee/package-url-2.0.0
Mar 31, 2026
Merged

Reapply "Update packageurl-dotnet to 2.0.0-rc.2 (#1730)" (#1751)#1753
JamieMagee merged 1 commit into
mainfrom
users/jamagee/package-url-2.0.0

Conversation

@JamieMagee

Copy link
Copy Markdown
Member

This reverts commit a01a1ce.

@JamieMagee JamieMagee requested a review from a team as a code owner March 31, 2026 04:35
@JamieMagee JamieMagee requested review from Copilot and melotic March 31, 2026 04:35
@JamieMagee JamieMagee enabled auto-merge (squash) March 31, 2026 04:36
@JamieMagee JamieMagee requested a review from zhenghao104 March 31, 2026 04:37

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

Reapplies the package-url library upgrade across the Component Detection contracts by moving to packageurl-dotnet v2 and updating TypedComponent PURL generation and related tests/docs to match the new API (PackageUrl vs PackageURL) and formatting behavior.

Changes:

  • Bump packageurl-dotnet to a v2 prerelease and migrate usages from PackageURL to PackageUrl.
  • Adjust PURL generation in GoComponent to split module path into namespace/name per the golang PURL type definition.
  • Update affected unit tests and documentation snippets to match the new package-url behavior and API.

Reviewed changes

Copilot reviewed 20 out of 21 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Directory.Packages.props Updates central package pin for packageurl-dotnet (v2 prerelease).
src/Microsoft.ComponentDetection.Contracts/TypedComponent/TypedComponent.cs Switches base PackageUrl property type to v2 PackageUrl.
src/Microsoft.ComponentDetection.Contracts/TypedComponent/GoComponent.cs Updates golang PURL generation to include namespace/name splitting and prefer hash for version.
src/Microsoft.ComponentDetection.Contracts/TypedComponent/SwiftComponent.cs Migrates Swift PURL generation to PackageUrl type; comment updated.
src/Microsoft.ComponentDetection.Contracts/TypedComponent/PodComponent.cs Migrates CocoaPods PURL generation to PackageUrl type.
src/Microsoft.ComponentDetection.Contracts/TypedComponent/CppSdkComponent.cs Migrates CppSdk PURL generation to PackageUrl type.
src/Microsoft.ComponentDetection.Contracts/TypedComponent/VcpkgComponent.cs Migrates vcpkg PURL creation to PackageUrl type.
src/Microsoft.ComponentDetection.Contracts/TypedComponent/RubyGemsComponent.cs Migrates gem PURL generation to PackageUrl type.
src/Microsoft.ComponentDetection.Contracts/TypedComponent/PipComponent.cs Migrates PyPI PURL generation to PackageUrl type.
src/Microsoft.ComponentDetection.Contracts/TypedComponent/NugetComponent.cs Migrates NuGet PURL generation to PackageUrl type.
src/Microsoft.ComponentDetection.Contracts/TypedComponent/NpmComponent.cs Migrates npm PURL generation to PackageUrl type.
src/Microsoft.ComponentDetection.Contracts/TypedComponent/MavenComponent.cs Migrates Maven PURL generation to PackageUrl type.
src/Microsoft.ComponentDetection.Contracts/TypedComponent/LinuxComponent.cs Migrates Linux distro PURL generation to PackageUrl type.
src/Microsoft.ComponentDetection.Contracts/TypedComponent/ConanComponent.cs Migrates Conan PURL generation to PackageUrl type.
src/Microsoft.ComponentDetection.Contracts/TypedComponent/CargoComponent.cs Migrates Cargo PURL generation to PackageUrl type.
test/Microsoft.ComponentDetection.Contracts.Tests/PurlGenerationTests.cs Updates expected PURL strings (case/encoding behavior changes in v2).
test/Microsoft.ComponentDetection.Contracts.Tests/TypedComponentSerializationTests.cs Updates Go component test data to include a namespace in the module path.
test/Microsoft.ComponentDetection.Contracts.Tests/CppSdkComponentTests.cs Updates expectations for generic PURL name casing behavior.
test/Microsoft.ComponentDetection.Detectors.Tests/SwiftComponentTests.cs Migrates Swift PackageUrl expectations to the v2 PackageUrl type.
docs/creating-a-new-detector.md Updates example code to use PackageUrl v2 type.
docs/schema/manifest.schema.json Formatting-only change.

Comment thread Directory.Packages.props
Comment thread docs/creating-a-new-detector.md
@JamieMagee JamieMagee merged commit 7fb976c into main Mar 31, 2026
27 of 41 checks passed
@JamieMagee JamieMagee deleted the users/jamagee/package-url-2.0.0 branch March 31, 2026 16:36
@codecov

codecov Bot commented Mar 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.0%. Comparing base (a01a1ce) to head (f142a57).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff      @@
##   main   #1753   +/-   ##
============================
============================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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