From 795766389e143e2ab323a54e47d693a73c9ce338 Mon Sep 17 00:00:00 2001 From: Matthew Donoughe Date: Fri, 12 Apr 2024 16:47:55 -0400 Subject: [PATCH] fix nuget case sensitivity --- PURL-TYPES.rst | 6 +++++- test-suite-data.json | 30 +++++++++++++++++++++++++++--- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/PURL-TYPES.rst b/PURL-TYPES.rst index 2bf69af..343bc54 100644 --- a/PURL-TYPES.rst +++ b/PURL-TYPES.rst @@ -423,9 +423,13 @@ nuget - The default repository is ``https://www.nuget.org``. - There is no ``namespace`` per se even if the common convention is to use dot-separated package names where the first segment is ``namespace``-like. +- The ``name`` is the package ID. It is not case sensitive and must be + lowercased. - Examples:: - pkg:nuget/EnterpriseLibrary.Common@6.0.1304 + pkg:nuget/enterpriselibrary.common@6.0.1304 + pkg:nuget/polly@8.0.0-beta.2 + pkg:nuget/awssdk.core@3.7.303.14 qpkg ---- diff --git a/test-suite-data.json b/test-suite-data.json index a819fc8..a420232 100644 --- a/test-suite-data.json +++ b/test-suite-data.json @@ -156,17 +156,41 @@ "is_invalid": false }, { - "description": "nuget names are case sensitive", + "description": "nuget names are not case sensitive", "purl": "pkg:Nuget/EnterpriseLibrary.Common@6.0.1304", - "canonical_purl": "pkg:nuget/EnterpriseLibrary.Common@6.0.1304", + "canonical_purl": "pkg:nuget/enterpriselibrary.common@6.0.1304", "type": "nuget", "namespace": null, - "name": "EnterpriseLibrary.Common", + "name": "enterpriselibrary.common", "version": "6.0.1304", "qualifiers": null, "subpath": null, "is_invalid": false }, + { + "description": "nuget names do not always contain separators", + "purl": "pkg:nuget/polly@8.0.0-beta.2", + "canonical_purl": "pkg:nuget/polly@8.0.0-beta.2", + "type": "nuget", + "namespace": null, + "name": "polly", + "version": "8.0.0-beta.2", + "qualifiers": null, + "subpath": null, + "is_invalid": false + }, + { + "description": "nuget versions are extended semver", + "purl": "pkg:Nuget/awssdk.core@3.7.303.14", + "canonical_purl": "pkg:nuget/awssdk.core@3.7.303.14", + "type": "nuget", + "namespace": null, + "name": "awssdk.core", + "version": "3.7.303.14", + "qualifiers": null, + "subpath": null, + "is_invalid": false + }, { "description": "pypi names have special rules and not case sensitive", "purl": "pkg:PYPI/Django_package@1.11.1.dev1",