This repository has been archived by the owner on Jul 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In feed2catalog, default to empty string if the version range is miss…
…ing or invalid (#253) Fix NuGet/NuGetGallery#3482
- Loading branch information
1 parent
37a8043
commit 42558fa
Showing
13 changed files
with
394 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
84 changes: 84 additions & 0 deletions
84
tests/CatalogTests/TestData/EmptyDependencyVersionRange.0.1.0.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{ | ||
"@id": "http://example/data/2017.01.04.08.15.00/emptydependencyversionrange.0.1.0.json", | ||
"@type": [ | ||
"PackageDetails", | ||
"catalog:Permalink" | ||
], | ||
"authors": "EmptyDependencyVersionRange", | ||
"catalog:commitId": "4aee0ef4-a039-4460-bd5f-98f944e33289", | ||
"catalog:commitTimeStamp": "2017-01-04T08:15:00Z", | ||
"created": "2017-01-01T08:15:00Z", | ||
"description": "EmptyDependencyVersionRange", | ||
"id": "EmptyDependencyVersionRange", | ||
"isPrerelease": false, | ||
"lastEdited": "2017-01-02T08:15:00Z", | ||
"listed": true, | ||
"packageHash": "J1NrM0aeDXk3kdjY3Aby8duP+mAt1JN/srVW5AMDIFXJXhWjZgmwAnAKBBrO6VDWXg2hi1x+uaWLHI0dUXraUg==", | ||
"packageHashAlgorithm": "SHA512", | ||
"packageSize": 450, | ||
"published": "2017-01-03T08:15:00Z", | ||
"title": "EmptyDependencyVersionRange", | ||
"verbatimVersion": "0.1.0", | ||
"version": "0.1.0", | ||
"dependencyGroups": [ | ||
{ | ||
"@id": "http://example/data/2017.01.04.08.15.00/emptydependencyversionrange.0.1.0.json#dependencygroup", | ||
"@type": "PackageDependencyGroup", | ||
"dependencies": [ | ||
{ | ||
"@id": "http://example/data/2017.01.04.08.15.00/emptydependencyversionrange.0.1.0.json#dependencygroup/nuget.versioning", | ||
"@type": "PackageDependency", | ||
"id": "NuGet.Versioning", | ||
"range": "" | ||
} | ||
] | ||
} | ||
], | ||
"packageEntries": [ | ||
{ | ||
"@id": "http://example/data/2017.01.04.08.15.00/emptydependencyversionrange.0.1.0.json#EmptyDependencyVersionRange.nuspec", | ||
"@type": "PackageEntry", | ||
"compressedLength": 248, | ||
"fullName": "EmptyDependencyVersionRange.nuspec", | ||
"length": 504, | ||
"name": "EmptyDependencyVersionRange.nuspec" | ||
} | ||
], | ||
"@context": { | ||
"@vocab": "http://schema.nuget.org/schema#", | ||
"catalog": "http://schema.nuget.org/catalog#", | ||
"xsd": "http://www.w3.org/2001/XMLSchema#", | ||
"dependencies": { | ||
"@id": "dependency", | ||
"@container": "@set" | ||
}, | ||
"dependencyGroups": { | ||
"@id": "dependencyGroup", | ||
"@container": "@set" | ||
}, | ||
"packageEntries": { | ||
"@id": "packageEntry", | ||
"@container": "@set" | ||
}, | ||
"supportedFrameworks": { | ||
"@id": "supportedFramework", | ||
"@container": "@set" | ||
}, | ||
"tags": { | ||
"@id": "tag", | ||
"@container": "@set" | ||
}, | ||
"published": { | ||
"@type": "xsd:dateTime" | ||
}, | ||
"created": { | ||
"@type": "xsd:dateTime" | ||
}, | ||
"lastEdited": { | ||
"@type": "xsd:dateTime" | ||
}, | ||
"catalog:commitTimeStamp": { | ||
"@type": "xsd:dateTime" | ||
} | ||
} | ||
} |
Binary file added
BIN
+450 Bytes
tests/CatalogTests/TestData/EmptyDependencyVersionRange.0.1.0.nupkg
Binary file not shown.
84 changes: 84 additions & 0 deletions
84
tests/CatalogTests/TestData/InvalidDependencyVersionRange.0.1.0.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{ | ||
"@id": "http://example/data/2017.01.04.08.15.00/invaliddependencyversionrange.0.1.0.json", | ||
"@type": [ | ||
"PackageDetails", | ||
"catalog:Permalink" | ||
], | ||
"authors": "InvalidDependencyVersionRange", | ||
"catalog:commitId": "4aee0ef4-a039-4460-bd5f-98f944e33289", | ||
"catalog:commitTimeStamp": "2017-01-04T08:15:00Z", | ||
"created": "2017-01-01T08:15:00Z", | ||
"description": "InvalidDependencyVersionRange", | ||
"id": "InvalidDependencyVersionRange", | ||
"isPrerelease": false, | ||
"lastEdited": "2017-01-02T08:15:00Z", | ||
"listed": true, | ||
"packageHash": "RFCB7aV+m/vj0CYW3SmnLUd8jMYYJpOw+fz7hDNERlwUjz2rU+6lCVA2bdIko3YYc68jJN3n07S2OgKrUDwPBg==", | ||
"packageHashAlgorithm": "SHA512", | ||
"packageSize": 473, | ||
"published": "2017-01-03T08:15:00Z", | ||
"title": "InvalidDependencyVersionRange", | ||
"verbatimVersion": "0.1.0", | ||
"version": "0.1.0", | ||
"dependencyGroups": [ | ||
{ | ||
"@id": "http://example/data/2017.01.04.08.15.00/invaliddependencyversionrange.0.1.0.json#dependencygroup", | ||
"@type": "PackageDependencyGroup", | ||
"dependencies": [ | ||
{ | ||
"@id": "http://example/data/2017.01.04.08.15.00/invaliddependencyversionrange.0.1.0.json#dependencygroup/nuget.versioning", | ||
"@type": "PackageDependency", | ||
"id": "NuGet.Versioning", | ||
"range": "" | ||
} | ||
] | ||
} | ||
], | ||
"packageEntries": [ | ||
{ | ||
"@id": "http://example/data/2017.01.04.08.15.00/invaliddependencyversionrange.0.1.0.json#InvalidDependencyVersionRange.nuspec", | ||
"@type": "PackageEntry", | ||
"compressedLength": 267, | ||
"fullName": "InvalidDependencyVersionRange.nuspec", | ||
"length": 530, | ||
"name": "InvalidDependencyVersionRange.nuspec" | ||
} | ||
], | ||
"@context": { | ||
"@vocab": "http://schema.nuget.org/schema#", | ||
"catalog": "http://schema.nuget.org/catalog#", | ||
"xsd": "http://www.w3.org/2001/XMLSchema#", | ||
"dependencies": { | ||
"@id": "dependency", | ||
"@container": "@set" | ||
}, | ||
"dependencyGroups": { | ||
"@id": "dependencyGroup", | ||
"@container": "@set" | ||
}, | ||
"packageEntries": { | ||
"@id": "packageEntry", | ||
"@container": "@set" | ||
}, | ||
"supportedFrameworks": { | ||
"@id": "supportedFramework", | ||
"@container": "@set" | ||
}, | ||
"tags": { | ||
"@id": "tag", | ||
"@container": "@set" | ||
}, | ||
"published": { | ||
"@type": "xsd:dateTime" | ||
}, | ||
"created": { | ||
"@type": "xsd:dateTime" | ||
}, | ||
"lastEdited": { | ||
"@type": "xsd:dateTime" | ||
}, | ||
"catalog:commitTimeStamp": { | ||
"@type": "xsd:dateTime" | ||
} | ||
} | ||
} |
Binary file added
BIN
+473 Bytes
tests/CatalogTests/TestData/InvalidDependencyVersionRange.0.1.0.nupkg
Binary file not shown.
84 changes: 84 additions & 0 deletions
84
tests/CatalogTests/TestData/MissingDependencyVersionRange.0.1.0.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{ | ||
"@id": "http://example/data/2017.01.04.08.15.00/missingdependencyversionrange.0.1.0.json", | ||
"@type": [ | ||
"PackageDetails", | ||
"catalog:Permalink" | ||
], | ||
"authors": "MissingDependencyVersionRange", | ||
"catalog:commitId": "4aee0ef4-a039-4460-bd5f-98f944e33289", | ||
"catalog:commitTimeStamp": "2017-01-04T08:15:00Z", | ||
"created": "2017-01-01T08:15:00Z", | ||
"description": "MissingDependencyVersionRange", | ||
"id": "MissingDependencyVersionRange", | ||
"isPrerelease": false, | ||
"lastEdited": "2017-01-02T08:15:00Z", | ||
"listed": true, | ||
"packageHash": "7K0E8VKZX8of+E4LU2gpnQbjA74nubVDhVDPLOdiRuYyMecuOu3eZ33QmVJ+ZsqLpZB/jnVEUUmUvL7sA4Y+JA==", | ||
"packageHashAlgorithm": "SHA512", | ||
"packageSize": 450, | ||
"published": "2017-01-03T08:15:00Z", | ||
"title": "MissingDependencyVersionRange", | ||
"verbatimVersion": "0.1.0", | ||
"version": "0.1.0", | ||
"dependencyGroups": [ | ||
{ | ||
"@id": "http://example/data/2017.01.04.08.15.00/missingdependencyversionrange.0.1.0.json#dependencygroup", | ||
"@type": "PackageDependencyGroup", | ||
"dependencies": [ | ||
{ | ||
"@id": "http://example/data/2017.01.04.08.15.00/missingdependencyversionrange.0.1.0.json#dependencygroup/nuget.versioning", | ||
"@type": "PackageDependency", | ||
"id": "NuGet.Versioning", | ||
"range": "" | ||
} | ||
] | ||
} | ||
], | ||
"packageEntries": [ | ||
{ | ||
"@id": "http://example/data/2017.01.04.08.15.00/missingdependencyversionrange.0.1.0.json#MissingDependencyVersionRange.nuspec", | ||
"@type": "PackageEntry", | ||
"compressedLength": 244, | ||
"fullName": "MissingDependencyVersionRange.nuspec", | ||
"length": 501, | ||
"name": "MissingDependencyVersionRange.nuspec" | ||
} | ||
], | ||
"@context": { | ||
"@vocab": "http://schema.nuget.org/schema#", | ||
"catalog": "http://schema.nuget.org/catalog#", | ||
"xsd": "http://www.w3.org/2001/XMLSchema#", | ||
"dependencies": { | ||
"@id": "dependency", | ||
"@container": "@set" | ||
}, | ||
"dependencyGroups": { | ||
"@id": "dependencyGroup", | ||
"@container": "@set" | ||
}, | ||
"packageEntries": { | ||
"@id": "packageEntry", | ||
"@container": "@set" | ||
}, | ||
"supportedFrameworks": { | ||
"@id": "supportedFramework", | ||
"@container": "@set" | ||
}, | ||
"tags": { | ||
"@id": "tag", | ||
"@container": "@set" | ||
}, | ||
"published": { | ||
"@type": "xsd:dateTime" | ||
}, | ||
"created": { | ||
"@type": "xsd:dateTime" | ||
}, | ||
"lastEdited": { | ||
"@type": "xsd:dateTime" | ||
}, | ||
"catalog:commitTimeStamp": { | ||
"@type": "xsd:dateTime" | ||
} | ||
} | ||
} |
Binary file added
BIN
+450 Bytes
tests/CatalogTests/TestData/MissingDependencyVersionRange.0.1.0.nupkg
Binary file not shown.
Oops, something went wrong.